sp_change_log_shipping_secondary_database (Transact-SQL)
SQL Server 2012
Changes secondary database settings.
sp_change_log_shipping_secondary_database
[ @secondary_database = ] 'secondary_database',
[, [ @restore_delay = ] 'restore_delay']
[, [ @restore_all = ] 'restore_all']
[, [ @restore_mode = ] 'restore_mode']
[, [ @disconnect_users = ] 'disconnect_users']
[, [ @block_size = ] 'block_size']
[, [ @buffer_count = ] 'buffer_count']
[, [ @max_transfer_size = ] 'max_transfer_size']
[, [ @restore_threshold = ] 'restore_threshold']
[, [ @threshold_alert = ] 'threshold_alert']
[, [ @threshold_alert_enabled = ] 'threshold_alert_enabled']
[, [ @history_retention_period = ] 'history_retention_period']
sp_change_log_shipping_secondary_database must be run from the master database on the secondary server. This stored procedure does the following:
-
Changes the settings in the log_shipping_secondary_database records as necessary.
-
Changes the local monitor record in log_shipping_monitor_secondary on the secondary server using supplied arguments, if necessary.
This example illustrates using sp_change_log_shipping_secondary_database to update secondary database parameters for the database LogShipAdventureWorks.
EXEC master.dbo.sp_change_log_shipping_secondary_database @secondary_database = 'LogShipAdventureWorks' , @restore_delay = 0 , @restore_all = 1 , @restore_mode = 0 , @disconnect_users = 0 , @threshold_alert = 14420 , @threshold_alert_enabled = 1 , @history_retention_period = 14420
