Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2008 Forums
 SQL Server Administration (2008)
 error in restoring DB

Author  Topic 

missMac
Posting Yak Master

124 Posts

Posted - 2009-09-07 : 16:08:30
Hello guys,
am trying to restore my database back to a newly created db. But get this error



TITLE: Microsoft SQL Server Management Studio
------------------------------

Restore failed for Server 'S15348456\ONE'. (Microsoft.SqlServer.SmoExtended)

For help, click: http://go.microsoft.com/fwlink?ProdName=Microsoft+SQL+Server&ProdVer=10.0.1600.22+((SQL_PreRelease).080709-1414+)&EvtSrc=Microsoft.SqlServer.Management.Smo.ExceptionTemplates.FailedOperationExceptionText&EvtID=Restore+Server&LinkId=20476

------------------------------
ADDITIONAL INFORMATION:

System.Data.SqlClient.SqlError: The file 'D:\Program Files\Microsoft SQL Server\MSSQL10.ONE\one\DATA\db_database.mdf' cannot be overwritten. It is being used by database 'db_database'. (Microsoft.SqlServer.Smo)

For help, click: http://go.microsoft.com/fwlink?ProdName=Microsoft+SQL+Server&ProdVer=10.0.1600.22+((SQL_PreRelease).080709-1414+)&LinkId=20476

------------------------------
BUTTONS:

OK
------------------------------

webfred
Master Smack Fu Yak Hacker

8781 Posts

Posted - 2009-09-07 : 16:52:26
Maybe you have a query window open that is connected to the database?


No, you're never too old to Yak'n'Roll if you're too young to die.
Go to Top of Page

Peter99
Constraint Violating Yak Guru

498 Posts

Posted - 2009-09-09 : 13:30:04
while restoring select the option to overwrite existing database
Go to Top of Page
   

- Advertisement -