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 MikeeOK on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

RESTORE HELP??!! 2

Status
Not open for further replies.

shannanl

IS-IT--Management
Apr 24, 2003
1,071
US
I had a database crash and I had to restore. I do a daily full database backup and a Tlog every two hours. I have recovered up to midnight last night (daily backup) but I can not recover the TLOG backup. Can someone please tell me how to do this?

Thanks,

Shannan
 
When you do the restore of the full backup be sure to check the box which says to leave the database in recovery mode.

That will allow you to restore the logs over it.

Then restore the logs making sure to check the same box for each restore. If you forget to check the box, you will need to start over from the full backup again.

If using QA to do the restore:
Code:
--Restore Full Database
restore database databasename from backup_device with recovery
--restore log (do this for each backup)
restore log databasename from backup_device with recovery
--to restore the last log backup you have
restore log databasename from backup_device

Check Books OnLine for more info about those commands. Look up restore database in the index.


Denny
 
You need to use WITH NORECOVERY until you RESTORE the very last file:

RESTORE DATABASE dbname
WITH NORECOVERY
RESTORE LOG dbname
WITH RECOVERY

WITH RECOVERY means the database is FULLY recovered at that time and can now be used. WITH NORECOVERY means the database is NOT recovered and there are more files to be restored.

Refer to the Books OnLine, use the Index tab and enter RESTORE DATABASE

-SQLBill
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top