Log Shipping Process


Log Shipping uses SQL Agent on the participating servers to execute the processes that maintain a warm standby server. Three main processes drive log shipping:

  1. Back up the transaction log on the primary server. A SQL Agent job on the primary server backs up the transaction log at a user-configurable time interval to a file in a backup folder. By default, the filename is timestamped to provide uniqueness: for example, databasename_yyyymmd dhms.trn. The backup job by default is named LSBackup_databasename, and it executes an operating system command to backup the transaction log:

     "C:\Program Files\Microsoft SQL Server\90\Tools\Binn\sqllogship.exe" -Backup  -server SQLServer1 

  2. Copy the transaction log to the standby server. A SQL Agent job on the standby server uses UNC or shared drive to access the backup folder on the primary server to copy the transaction-log file to a local folder on the standby server. The copy job by default is named LSCopy_servername_databasename, and it executes an operating system command to copy the transaction-log file:

     "C:\Program Files\Microsoft SQL Server\90\Tools\Binn\sqllogship.exe" -Copy F2305BFA-B9E3- 4B1C-885D-3069D0D11998 -server SQLServer2 

  3. Restore the transaction log on standby server. A SQL Agent job on the standby server restores the transaction log on the standby server. To restore the transaction log, the database must be in either Standby or NoRecovery mode. The restore job by default is named LSRestore_server name_databasename, and it executes an operating system command to copy the transaction-log file:

     "C:\Program Files\Microsoft SQL Server\90\Tools\Binn\sqllogship.exe" -Restore  -server SQLServer2 

Note

Most of the log-shipping objects can be found in MSDB. For more information, see the SQL Server 2005 Books Online.



Professional SQL Server 2005 Administration
Professional SQL Server 2005 Administration (Wrox Professional Guides)
ISBN: 0470055200
EAN: 2147483647
Year: 2004
Pages: 193

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net