log_shipping_secondary_databases (Transact-SQL)


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

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

Column nameData typeDescription
secondary_databasesysnameThe name of the secondary database in the log shipping configuration.
secondary_iduniqueidentifierThe ID for the secondary server in the log shipping configuration.
restore_delayintThe amount of time, in minutes, that the secondary server will wait before restoring a given backup file. The default is 0 minutes.
restore_allbitIf set to 1, the secondary server will restore all available transaction log backups when the restore job runs. Otherwise, it stops after one file has been restored.
restore_modebitThe restore mode for the secondary database.

0 = Restore log with NORECOVERY.

1 = Restore log with STANDBY.
disconnect_usersbitIf set to 1, users will be disconnected from the secondary database when a restore operation is performed. The default = 0.
block_sizeintThe size, in bytes, that is used as the block size for the backup device.
buffer_countintThe total number of buffers used by the backup or restore operation.
max_transfer_sizeintThe size, in bytes, of the maximum input or output request which is issued by Microsoft SQL Server to the backup device.
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.

About Log Shipping (SQL Server)
sp_add_log_shipping_secondary_database (Transact-SQL)
sp_delete_log_shipping_secondary_database (Transact-SQL)
sp_help_log_shipping_secondary_database (Transact-SQL)
log_shipping_secondary (Transact-SQL)
System Tables (Transact-SQL)

Community Additions