Retrieves primary database settings.
The ID of the primary database for the log shipping configuration.
The name of the primary database in the log shipping configuration.
The directory where transaction log backup files from the primary server are stored.
The network or UNC path to the backup directory.
The length of time, in minutes, that a log backup file is retained in the backup directory before being deleted.
Indicates whether the log shipping configuration uses backup compression.
0 = Disabled. Never compress log backups.
1 = Enabled. Always compress log backups.
2 = Use the setting of the backup compression default server-configuration option. This is the default value.
Backup compression is supported only in SQL Server 2008 Enterprise (or a later version). In other editions, the value is always 2.
The Microsoft SQL Server Agent job ID associated with the backup job on the primary server.
The name of the instance of the SQL Server Database Engine being used as a monitor server in the log shipping configuration.
The security mode used to connect to the monitor server.
1 = Microsoft Windows Authentication.
0 = SQL Server Authentication.
The number of minutes allowed to elapse between backup operations before an alert is generated.
The alert to be raised when the backup threshold is exceeded.
Determines if backup threshold alerts are enabled.
1 = Enabled.
0 = Disabled.
The absolute path of the most recent transaction log backup.
The time and date of the last log backup operation.
The time and date of the last transaction log backup operation on the primary database, expressed in Coordinated Universal Time.
The amount of time, in minutes, that log shipping history records are retained for a given primary database before being deleted.
This example illustrates using sp_help_log_shipping_primary_database to retrieve primary database settings for the database AdventureWorks.
master.dbo.sp_help_log_shipping_primary_database @database=N'AdventureWorks' GO