I am doing log shipping since SQL Server 2000. I did it with SQL Server 2005. But for the 4 years that I worked with SQL Server 2008 R2, I did not work with Log shipping. Nothing has changed in SQL server 2012. But to refresh my memory, here I am writing down simple steps for setting up log shipping.
- Make sure database is in Full recovery mode. In this case primary server is PriSQL\Prod01 and primary database is PriDB.
- Pre-initialize the database at secondary. It means take the full backup of PriDB and a transaction log backup of primary database SecDB and restore on secondary SecSQL\DR01 in Standby mode.
- Right click the primary database, go to properties and select “Enable this as a primary database in a log shipping configuration”.
- Select how frequently you are going to do log backups in “Backup Settings” button. Also provide the path where log backup goes. Some other settings on this page are set as follows:
- Delete files older than: 72 hours
- Alert if no backup occurs within: 2 hours
- Backup schedule: Every 15 minutes
- Backup Path: E:\SQLBackups\PriDB_log
- Job name: LSBackup_PriDB
- Backup compression: Use default server setting.
- Add the secondary server. In this case it is SecSQL\DR01. Secondary database is SecDB.
- Tab- Initialize secondary Database:
- Select database is already initialized.
- Tab- Copy files:
- Destination folder for copied file F:\SQLBackups\LogShip
- Set 72 hours for Delete copied files.
- Copy job: LSCopy_PriSQL\prod01_PriDB
- Copy Schedule: Every 15 minutes.
- Tab- Restore Transaction Logs
- Restore job: LSRestore_PriSQL\prod01_PriDB
- Restore Schedule: Every 15 minutes
- Delay restoring: 1 minute
- Alert if no restore occurs: 2 hours
- Tab- Initialize secondary Database:
Leave a Reply