Restore Log shipping Log files continuously using script

  • Hi,

    log shipping is broken and I need to restore 2 days worth of log backup files manually.

    I have copied the log backup files to secondary server and tried to restore manually one by one but it taking several hours.

    Is there any script that can pick up the log backup (.trn) files and restore with norecovery till the last .trn file?

    Please advice

  • if there are 500 .trn files to apply to the database, then we have only have the option to restore manually one by one?

  • There are quite a few on the site. A search will turn up many.

    Here is one: http://www.sqlservercentral.com/scripts/T-Log/69750/

  • You don't need to restore the log backups. Take a new differential backup and restore it on the secondary using the norecovery option. This will span the unrestored log and the the log shipping job can continue normally.


    My blog: SQL Soldier[/url]
    SQL Server Best Practices:
    SQL Server Best Practices
    Twitter: @SQLSoldier
    My book: Pro SQL Server 2008 Mirroring[/url]
    Microsoft Certified Master: SQL Server, Data Platform MVP
    Database Engineer at BlueMountain Capital Management[/url]

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

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