close
要讓 Secondary SQL Server變成 Primary, 需要在 Secondary SQL 執行 msdb.dbo.sp_change_secondary_role Stored Procedure
For exampler:
EXEC msdb.dbo.sp_change_secondary_role
@db_name='databasename'
, @do_load=0
, @force_load=0
, @final_state=1
, @access_level=1
, @terminate = 0
, @keep_replication=1
, @stopat=NULL
, @do_load=0
, @force_load=0
, @final_state=1
, @access_level=1
, @terminate = 0
, @keep_replication=1
, @stopat=NULL
你可以視你的需要來調整參數
另外還有修改 Monitor 設定的 Stored Procedure: (在 Monitor
SQLServer 機器上執行)
1: 刪除Monitor
EXEC msdb..sp_delete_log_shipping_monitor_info
@primary_server_name = 'DB1'
, @primary_database_name = 'databasename'
, @secondary_server_name = 'DB2'
, @secondary_database_name = 'databasename'
, @primary_database_name = 'databasename'
, @secondary_server_name = 'DB2'
, @secondary_database_name = 'databasename'
2: 角色交換
EXEC msdb..sp_change_monitor_role
@primary_server='DB1'
, @secondary_server='DB2'
, @secondary_server='DB2'
, @database='databasename'
, @new_source = '\\DB2\SQLServer\LogShipping_Local\databasename'
, @new_source = '\\DB2\SQLServer\LogShipping_Local\databasename'
全站熱搜
留言列表