Microsoft® SQL Server® 2012 Bible

(Ben Green) #1

678


Part V: Enterprise Data Management


Another method to monitor log shipping is to directly review the status of the log shipping
jobs. You can review the history of the transaction log backup job on the primary server
and the history of the copy and restore jobs on the secondary server.

Log shipping can also be monitored using several monitoring tables and stored procedures.
The information that can be retrieved from these sources includes the database name, last
backup, last restore, time since last restore, and whether the alerts are enabled.

The following is a list of the tables that can be used to monitor log shipping. These tables
exist in the MSDB database (because log shipping is mainly executed by a collection of jobs)
on all the servers involved in the log shipping confi guration.

■ msdb.dbo.log_shipping_monitor_alert

■ (^) msdb.dbo.log_shipping_monitor_error_detail
■ msdb.dbo.log_shipping_monitor_history_detail
■ (^) msdb.dbo.log_shipping_monitor_primary
■ msdb.dbo.log_shipping_monitor_secondary
■ (^) msdb.dbo.log_shipping_primary_databases
■ msdb.dbo.log_shipping_secondary_databases
The following is a list of stored procedures that can be used to monitor Log Shipping.
They exist on all the servers in the master database involved in the log shipping:
■ (^) master.sys.sp_help_log_shipping_monitor_primary
■ master.sys.sp_help_log_shipping_monitor_secondary
■ (^) master.sys.sp_help_log_shipping_alert_job
■ master.sys.sp_help_log_shipping_primary_database
■ (^) master.sys.sp_help_log_shipping_primary_secondary
■ master.sys.sp_help_log_shipping_secondary_database
■ (^) master.sys.sp_help_log_shipping_secondary_primary


Modifying or Removing Log Shipping


After confi guring log shipping you can edit, add, or remove a log shipping confi guration.
For example, you can add another secondary server to the log shipping confi guration. Or
you may want to change the schedule of the backup, copy, or restore jobs. At some times
you may need to remove a secondary server from the log shipping confi guration or remove
log shipping completely from all the participating servers.

c26.indd 678c26.indd 678 7/31/2012 9:49:20 AM7/31/2012 9:49:20 AM


http://www.it-ebooks.info
Free download pdf