Applies To: SQL Server
This stored procedure retrieves the settings for one or more secondary databases.
Applies to: SQL Server (SQL Server 2008 through current version).
- [ @secondary_database = ] 'secondary_database'
Is the name of the secondary database. secondary_database is sysname, with no default.
- [ @secondary_id = ] 'secondary_id'
The ID for the secondary server in the log shipping configuration. secondary_id is uniqueidentifier and cannot be NULL.
0 (success) or 1 (failure)
The ID for the secondary server in the log shipping configuration.
The name of the primary instance of the Microsoft SQL Server Database Engine in 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 directory on the secondary server where backup files are copied to.
The length of time, in minutes, that a backup file is retained on the secondary server before being deleted.
The ID associated with the copy job on the secondary server.
The ID associated with the restore job on the secondary 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 name of the secondary database in the log shipping configuration.
The amount of time, in minutes, that the secondary server waits before restoring a given backup file. The default is 0 minutes.
If set to 1, the secondary server restores all available transaction log backups when the restore job runs. Otherwise, it stops after one file has been restored.
The restore mode for the secondary database.
0 = Restore log with NORECOVERY.
1 = Restore log with STANDBY.
If set to 1, users are disconnected from the secondary database when a restore operation is performed. Default = 0.
The size, in bytes, that is used as the block size for the backup device.
The total number of buffers used by the backup or restore operation.
The size, in bytes, of the maximum input or output request which is issued by SQL Server to the backup device.
The number of minutes allowed to elapse between restore operations before an alert is generated.
The alert to be raised when the restore threshold is exceeded.
Determines if restore threshold alerts are enabled.
1 = Enabled.
0 = Disabled.
The filename of the last backup file copied to the secondary server.
The time and date of the last copy operation to the secondary server.
The time and date of the last copy operation to the secondary server, expressed in Coordinated Universal Time.
The filename of the last backup file restored to the secondary database.
The time and date of the last restore operation on the secondary database.
The time and date of the last restore operation on the secondary database, expressed in Coordinated Universal Time.
The amount of time, in minutes, that log shipping history records are retained for a given secondary database before being deleted.
The amount of time, in minutes, that elapsed between when the log backup was created on the primary and when it was restored on the secondary.
The initial value is NULL.
If you include the secondary_database parameter, the result set will contain information about that secondary database; if you include the secondary_id parameter, the result set will contain information about all secondary databases associated with that secondary ID.
sp_help_log_shipping_secondary_database must be run from the master database on the secondary server.
Only members of the sysadmin fixed server role can run this procedure.