log_shipping_primary_databases (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 for the primary database in a log shipping configuration. This table is stored in the msdb database.

Column nameData typeDescription
primary_iduniqueidentifierThe ID of the primary database for the log shipping configuration.
primary_databasesysnameThe name of the primary database in the log shipping configuration.
backup_directorynvarchar(500)The directory where transaction log backup files from the primary server are stored.
backup_sharenvarchar(500)The network or UNC path to the backup directory.
backup_retention_periodintThe length of time, in minutes, that a log backup file is retained in the backup directory before being deleted.
backup_job_iduniqueidentifierThe Microsoft SQL Server Agent job ID associated with the backup job on the primary 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_backup_filenvarchar(500)The absolute path of the most recent transaction log backup.
last_backup_datedatetimeThe time and date of the last log backup operation.
user_specified_monitorbitIdentified for informational purposes only. Not supported. Future compatibility is not guaranteed.

 sp_help_log_shipping_primary_database and sp_help_log_shipping_secondary_primary use this column to control the display of monitor settings in SQL Server Management Studio.

0 = When invoking either of these two stored procedures, the user did not specify an explicit value for the @monitor_server parameter.

1 = An explicit value was specified by the user.
backup_compressiontinyintIndicates whether the log shipping configuration overrides the server-level backup compression behavior.

0 = Disabled. Log backups are never compressed, regardless of the server-configured backup compression settings.

1 = Enabled. Log backups are always compressed, regardless of the server-configured backup compression settings.

2 = Uses the server configuration for the View or Configure the backup compression default Server Configuration Option server-configuration option. This is the default value.

Backup compression is supported only in the Enterprise edition of SQL Server.

About Log Shipping (SQL Server)
sp_add_log_shipping_primary_database (Transact-SQL)
sp_delete_log_shipping_primary_database (Transact-SQL)
sp_help_log_shipping_primary_database (Transact-SQL)
System Tables (Transact-SQL)

Community Additions