Backup and Restore SQL 2000

  • 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

  • In BOL look for RESTORE LOG.

    Syntax of restore to point in time:

    RESTORE LOG <dbname>

       FROM <tranlogfile>

       WITH RECOVERY, STOPAT = ' <date & time> '



    Shamless self promotion - read my blog http://sirsql.net

  • Thanks Stacenic! So basically it's restoring logs? This is good.

    Ronnie

  • 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.

  • 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.

  • 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