sp_help_log_shipping_monitor_secondary (Transact-SQL)

 

Updated: August 2, 2016

Returns information regarding a secondary database from the monitor tables.

Topic link icon Transact-SQL Syntax Conventions

  
sp_help_log_shipping_monitor_secondary  
[ @secondary_server = ] 'secondary_server',  
[ @secondary_database = ] 'secondary_database'  

[ @secondary_server = ] 'secondary_server'
Is the name of the secondary server. secondary_server is sysname, with no default.

[ @secondary_database = ] 'secondary_database'
Is the name of the secondary database. secondary_database is sysname, with no default.

0 (success) or 1 (failure)

ColumnDescription
secondary_serverThe name of the secondary instance of the Microsoft SQL Server Database Engine in the log shipping configuration.
secondary_databaseThe name of the secondary database in the log shipping configuration.
secondary_idThe ID for the secondary server in the log shipping configuration.
primary_serverThe name of the primary instance of the SQL Server Database Engine in the log shipping configuration.
primary_databaseThe name of the primary database in the log shipping configuration.
restore_thresholdThe number of minutes allowed to elapse between restore operations before an alert is generated.
threshold_alertThe alert to be raised when the restore threshold is exceeded.
threshold_alert_enabledDetermines if restore threshold alerts are enabled.

1 = Enabled.

0 = Disabled.
last_copied_fileThe filename of the last backup file copied to the secondary server.
last_copied_dateThe time and date of the last copy operation to the secondary server.
last_copied_date_utcThe time and date of the last copy operation to the secondary server, expressed in Coordinated Universal Time.
last_restored_fileThe filename of the last backup file restored to the secondary database.
last_restored_dateThe time and date of the last restore operation on the secondary database.
last_restored_date_utcThe time and date of the last restore operation on the secondary database, expressed in Coordinated Universal Time.
history_retention_periodThe amount of time, in minutes, that log shipping history records are retained for a given secondary database before being deleted.

sp_help_log_shipping_monitor_secondary must be run from the master database on the monitor server.

Only members of the sysadmin fixed server role can run this procedure.

About Log Shipping (SQL Server)
System Stored Procedures (Transact-SQL)

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

Community Additions

ADD
Show: