Transaction Backup

  • A client sent me one full back up and 20 consecuative transaction log backups. They will continue sending me transaction log backups.They will not be sending the full any more. I have manually restored the full backup and the 20 transaction log backups. They will be sending additional tranaction log backups tomorrow. How do I automate this process?

  • you said they will not be sending any more full backup so does that mean you have restored the database in norecovery/standby mode. Without this you will not be able to restore the further log backup.

    If above said yes, then you can follow below steps:-

    1) Create a folder and make sure every time your new log file(which require the restoration) copied to this location

    2) schedule a job by writing the sql script to restore the log file from the location created above.

    3) once successfully restored, delete/move the log file.

    4) For failure troubleshoot, you have two option.

    4.a) Dont accept any new log file in folder untill the latest get restored.

    or

    4.b) Restore the log file based on timeframe they copied.

    ----------
    Ashish

  • One important aspect of this is to identify the sequence of log backups. they must be restored in the order they were taken.

    Within your script, You'll need to find out the creation time of the files and sort them in ascending order before restoring.

    Other way is to read the header of all log backups and check for LSN and restore the files in ascending order.



    Pradeep Singh

Viewing 3 posts - 1 through 2 (of 2 total)

You must be logged in to reply to this topic. Login to reply