log_shipping_secondary (Transact-SQL)

 

Updated: June 10, 2016

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

Stores one record per secondary ID. This table is stored in the msdb database.

Column nameData typeDescription
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.
backup_source_directorynvarchar(500)The directory where transaction log backup files from the primary server are stored.
backup_destination_directorynvarchar(500)The directory on the secondary server where backup files are copied to.
file_retention_periodintThe length of time, in minutes, that a backup file is retained on the secondary server before being deleted.
copy_job_iduniqueidentifierThe ID associated with the copy job on the secondary server.
restore_job_iduniqueidentifierThe ID associated with the restore job on the secondary server.
monitor_serversysnameThe name of the instance of the Microsoft SQL Server Database Engine being used as a monitor server in the log shipping configuration.
monitor_server_security_modebitThe security mode used to connect to the monitor server.

1 = Windows Authentication.

0 = SQL Server Authentication.
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.

Multiple secondary databases on the same secondary server for a given primary database share some settings in the log_shipping_secondary table. If a shared setting is altered for one of them, the setting is altered for all of them.

About Log Shipping (SQL Server)
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)
System Tables (Transact-SQL)

Community Additions

ADD
Show: