log_shipping_monitor_secondary (Transact-SQL)

 

THIS TOPIC APPLIES TO:yesSQL Server (starting with 2008)noAzure SQL DatabasenoAzure SQL Data Warehouse noParallel Data Warehouse

Stores one monitor record per secondary database in a log shipping configuration. This table is stored in the msdb database.

The tables related to history and monitoring are also used at the primary server and the secondary servers.

Column nameData typeDescription
secondary_serversysnameThe name of the secondary instance of the Microsoft SQL Server Database Engine in the log shipping configuration.
secondary_databasesysnameThe name of the secondary database in the log shipping configuration.
secondary_iduniqueidentifierThe ID for the secondary server in the log shipping configuration.
primary_serversysnameThe name of the primary instance of the SQL Server Database Engine in the log shipping configuration.
primary_databasesysnameThe name of the primary database in the log shipping configuration.
restore_thresholdintThe number of minutes allowed to elapse between restore operations before an alert is generated.
threshold_alertintThe alert to be raised when the restore threshold is exceeded.
threshold_alert_enabledbitDetermines if restore threshold alerts are enabled. 1 = Enabled.

0 = Disabled.
last_copied_filenvarchar(500)The filename of the last backup file copied to the secondary server.
last_copied_datedatetimeThe time and date of the last copy operation to the secondary server.
last_copied_date_utcdatetimeThe time and date of the last copy operation to the secondary server, expressed in Coordinated Universal Time.
last_restored_filenvarchar(500)The filename of the last backup file restored to the secondary database.
last_restored_datedatetimeThe time and date of the last restore operation on the secondary database.
last_restored_date_utcdatetimeThe time and date of the last restore operation on the secondary database, expressed in Coordinated Universal Time.
last_restored_latencyintThe amount of time, in minutes, that elapsed between when the log backup was created on the primary and when it was restored on the secondary.

The initial value is NULL.
history_retention_periodintThe amount of time, in minutes, that log shipping history records are retained for a given secondary database before being deleted.

In addition to being stored on the remote monitor server, and information related to a secondary server is also stored on the secondary server in its log_shipping_monitor_secondary table.

About Log Shipping (SQL Server)
sp_refresh_log_shipping_monitor (Transact-SQL)
sp_add_log_shipping_secondary_database (Transact-SQL)
sp_change_log_shipping_secondary_database (Transact-SQL)
sp_delete_log_shipping_secondary_database (Transact-SQL)
sp_help_log_shipping_secondary_database (Transact-SQL)
sp_help_log_shipping_monitor_secondary (Transact-SQL)
sp_refresh_log_shipping_monitor (Transact-SQL)
System Tables (Transact-SQL)

Community Additions

ADD
Show: