Uploading Transaction logs from a share folder

  • From our vendor we received a full back up copy of a database to create a copy of the database on our end. We also receive daily transaction logs to be applied to our copy of the database. I have restored the full back file (.bak) to our copy. Now I have to apply all the transaction logs. I download a zip file daily and place them in a share folder. I can up-zip the file to place all the .trn files to a single folder. My question is there a script that I can use to load all of these sequentially? Currently I have 10 days of transaction logs accounting for almost 300 separate .trn files, and only growing day by day. Looking for a script that will go out to this share folder and process all the files.

    Thank you

    Stephen

  • Going forward, get regular differential backups so you have fewer transaction logs to restore.

    Some 3rd party backup tools would let you select all the t-logs in the restore GUI. Not sure how to do it in native sql restoring to a different system.

    How Up-to-date does your copy need to be ?

    • This reply was modified 2 years, 7 months ago by  homebrew01.
    • This reply was modified 2 years, 7 months ago by  homebrew01.
  • It sounds like your vendor needs to do a little work to make this easier for you.

    Here's my questions. Once you get these logs restored, and DB up to date, then what?  Do you need to keep it in a permanent state of waiting for more logs to be restored? Or are you going to need to set the DB online, and then re-do the process over and over?

    I'm guessing that you will need to restore this database, and do whatever you need with the data, and then "refresh" it with a newer backup so you can do whatever you need to do?  If that's the case, then why can't you get a daily full backup and restore that daily?  Restoring 300+ logs is nonsensical.

    You may want to look at this code, it has worked for well for me in the past.

    https://paulbrewer.wordpress.com/sp_restoregene/

    Michael L John
    If you assassinate a DBA, would you pull a trigger?
    To properly post on a forum:
    http://www.sqlservercentral.com/articles/61537/

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

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