April 22, 2004 at 9:36 am
I'm new to SQL but have taken a couple classes. I know how to backup and restore a database, but I'm having trouble figuring out how to restore Transaction logs up to a given time. Can someone either point me in the right direction by either directing me to an article explaning how this is done or a clue for me to look up?
thanks,
Ronnie
April 22, 2004 at 10:42 am
In BOL look for RESTORE LOG.
Syntax of restore to point in time:
RESTORE LOG <dbname>
FROM <tranlogfile>
WITH RECOVERY, STOPAT = ' <date & time> '
April 22, 2004 at 6:20 pm
Thanks Stacenic! So basically it's restoring logs? This is good.
Ronnie
April 23, 2004 at 1:39 am
We had some problems with the restore to a point in time at first. When you specify the date and time, ensure you use the format yyyymmdd elsewise SQL can sometimes get confused when attempting to localise the date.
---------------------------------------
It is by caffeine alone I set my mind in motion.
It is by the Beans of Java that thoughts acquire speed,
the hands acquire shaking, the shaking becomes a warning.
It is by caffeine alone I set my mind in motion.
April 23, 2004 at 6:49 am
To add to this, you will most likely get to a point either restoring to the original db or to another db from the original db where you may have errors on the restore of a particular transaction log. Make sure you always restore the logs in proper sequence. Say you have 10 tlogs to restore. You will need to backtrack them in the order that they were produced from the last full backup.
April 23, 2004 at 8:51 am
Thanks guys! Let me give this a try.
Thanks again!!!
Viewing 6 posts - 1 through 5 (of 5 total)
You must be logged in to reply to this topic. Login to reply