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 2005 Forums
 SQL Server Administration (2005)
 Restore Just from Full Backup and No Trans Logs

Author  Topic 

tubbie
Starting Member

2 Posts

Posted - 2008-12-19 : 03:30:37
I have a 2005 database with a full backup that was taken at 12:00pm and there have been 3 transaction logs taken since then. We had a problem between 12:00 and 1:00, and now I would like to do a full restore of the database. I would just like to restore from the full backup and do not want to apply the logs. What steps should I take and if anyone can provide some code, it would be very much appreciated. thx

Carat
Yak Posting Veteran

92 Posts

Posted - 2008-12-19 : 04:19:28
If you have your backup on disk you can use the following code:

restore database DBName
from disk = 'path'
with replace, recovery

If you have it on tape you must change the second line.
You use 'recovery' to bring your database online.
If you want to restore additional transaction logs you must use 'norecovery' except for the last one
where you should use 'recovery' again.
Go to Top of Page

tubbie
Starting Member

2 Posts

Posted - 2008-12-19 : 11:09:13
Do I need to do a tail end backup of the transaction log before I do the restore?
Go to Top of Page

tkizer
Almighty SQL Goddess

38200 Posts

Posted - 2008-12-19 : 11:16:01
If you don't want to apply any tlogs, then you don't need to perform a backup of the active tlog.

Tara Kizer
Microsoft MVP for Windows Server System - SQL Server
http://weblogs.sqlteam.com/tarad/

Subscribe to my blog
Go to Top of Page
   

- Advertisement -