Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

error when Restoring Transaction Log

Status
Not open for further replies.

ewin740

Technical User
Sep 2, 2005
49
US
using Enterprise Manager, I've successfully restored .BAK file of the user database but when I try to restore the .TRN transaction log file, this error pop up comes up:

"Microsoft SQL-DMO (ODBC SQLSTATE:42000) The Preceding restore operation did not specify WITH RECOVERY or WITH STANDBY. Restart the restore sequence, specifying with norecovery or with standby"

I'm not sure how to follow what's being suggested in this error message.
 
When your restore completed the database was not left in a state where you can apply more backups. You need to restore the database and leave it in a state where you can apply more logs. WITH NORECOVERY. If you are using the wizard from EM there is a radio button option for it.

- Paul
- If at first you don't succeed, find out if the loser gets anything.
 
Here's an example of restoring more than one file:

Code:
RESTORE DATABASE MyNwind
   FROM MyNwind_1
   WITH NORECOVERY
RESTORE DATABASE MyNwind
   FROM MyNwind_1

For more syntax information, use the Books OnLine (BOL), use the index tab and enter RESTORE DATABASE. Next, select the option in the list that has "Location Transact SQL"

-SQLBill

The following is part of my signature block and is only intended to be informational.
Posting advice: FAQ481-4875
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top