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 2000 Forums
 SQL Server Administration (2000)
 Restore Database Error

Author  Topic 

samnang
Starting Member

2 Posts

Posted - 2007-09-14 : 00:35:20
i've a sql database server that work normaly on my PC (backup & restore,....etc) and i got a problem when i take this database to restore on other Computers .

Title Message: Microsoft SQL-DMO (ODBC SQLState: 42000)
Message: The preceding restore operation did not specify WITH NORECOVERY or WITH STANDBY. Restart the restore sequence, specifying WITH NORECOVERY or WITH STANDBY for all but the final step. RESTORE DATABASE is terminating abnormally.


i have spent lots of time the solution it but i can't. sorry for very poor in english

PeterNeo
Constraint Violating Yak Guru

357 Posts

Posted - 2007-09-14 : 03:24:02
Hi,

if u r using Enterprise Manager to Restore then in "Options" tab make sure u checked the option
"Force Restore over Existing Database".

if u r using TSQL then read about options for RESTORE DATABASE <dbname> WITH NORECOVERY
Go to Top of Page

samnang
Starting Member

2 Posts

Posted - 2007-09-14 : 04:29:04
i checked "Box Force Restore over Existing Database" already but still can't restore, and also i've use TSQL and then reply me back the error message " Exclusive access could not be obtained because the database is in use.
RESTORE DATABASE is terminating abnormally".

my pc is stay alone.


quote:
Originally posted by PeterNeo

Hi,

if u r using Enterprise Manager to Restore then in "Options" tab make sure u checked the option
"Force Restore over Existing Database".

if u r using TSQL then read about options for RESTORE DATABASE <dbname> WITH NORECOVERY

Go to Top of Page

Kristen
Test

22859 Posts

Posted - 2007-09-14 : 04:40:28
"Exclusive access could not be obtained"

You can use ALTER DATABASE to force single user access.

See: http://www.sqlteam.com/forums/topic.asp?TOPIC_ID=55210&SearchTerms=RESTORE%20syntax%20/%20example,Restore

Kristen
Go to Top of Page

rmiao
Master Smack Fu Yak Hacker

7266 Posts

Posted - 2007-09-15 : 00:30:15
Are you restoring log? If so, you have to restore full backup with norecovery option first. And ensure you don't run restore under target db.
Go to Top of Page
   

- Advertisement -