October 19, 2004 at 6:17 pm
I kind of have an emergency on my hands here. I have a database that I would like to restore to 10 PM last night. I do not have a backup from last night. However, I do have a "Full" recovery model on the database, and the log file has not been backed up for a few weeks.
1) Can I restore this DB from the existing log file to a certain point in time?
2) How do I do it?
Any help is greatly appreciated. Obviously, I am not a SQL DBA, but I need to do this.
James Hamrick
SQL 2000 SP3
October 20, 2004 at 10:07 am
Do you have a full database backup from before the last transaction log backup? You can't restore a log backup until you've restored a full backup.
If you do have a full backup, do this:
1. Backup the transaction log
2. Restore the full backup WITH NORECOVERY
3. Restore the log backup WITH RECOVERY, STOPAT 'oct 19, 2004 10:00 PM'
The above can be done in Enterprise Manager, but I prefer using Query Analyzer. You can find the exact syntax by looking up 'RESTORE LOG'
in Books OnLine.
If you do not have a full backup, I'm afraid you won't be able to restore it to a point in time.
Greg
Greg
Viewing 2 posts - 1 through 2 (of 2 total)
You must be logged in to reply to this topic. Login to reply