Forum Discussion

Jeff Harlow's avatar
Jeff Harlow
Iron Contributor
Aug 26, 2020
Solved

DR Scenario - Restore DB to Azure with Transaction Logs

I am working on a DR Scenario (test) where I need to restore an active DB on-premise to Azure.  In testing, I need to be able to restore the database including up to the minute (15 min) transaction l...
  • bake13's avatar
    Aug 27, 2020

    Hi Jeff Harlow --

     

    Are you leaving the database in NORECOVERY mode after the initial restore of the FULL backup?  Setting the database to NORECOVERY allows additional differential and/or transaction log backups to be applied to the database, thereby facilitating point-in-time recovery.  Below is a quick example using TSQL.  Take care.

     

    RESTORE DATABASE [TestDatabase01] 
    	FROM DISK = 'C:\Program Files\Microsoft SQL Server\MSSQL14.MSSQLSERVER\MSSQL\Backup\TestDatabase.BAK'
    		WITH NORECOVERY
    
    RESTORE LOG [TestDatabase01]
    	FROM DISK = 'C:\Program Files\Microsoft SQL Server\MSSQL14.MSSQLSERVER\MSSQL\Backup\TestDatabase.TRN'
    		WITH RECOVERY