标签:备份恢复 快照 参考 color oca 没有 bsp from 使用
EXEC sp_changedistpublisher ‘TESTSYNCDBSERV‘, ‘active‘, ‘true‘
UPDATE t set t. publisher_id = 2 from dbo.[MSpublisher_databases] t WHERE id=2
UPDATE t set t. publisher_id = 2 from dbo.MSpublications t WHERE publication_id=2
EXEC master.dbo.sp_addlinkedserver @server = N‘TESTSYNCRPTSERV‘, @srvproduct=N‘SQL Server‘ EXEC master.dbo.sp_addlinkedsrvlogin @rmtsrvname=N‘TESTSYNCRPTSERV‘,@useself=N‘True‘,@locallogin=NULL,@rmtuser=NULL,@rmtpassword=NULL update dbo.MSdistribution_agents SET publisher_id=2,subscriber_id=3 WHERE id = 4
update dbo.MSsubscriptions SET publisher_id =2,subscriber_id=3 WHERE publication_id=2
update [MSlogreader_agents] SET publisher_id =2 WHERE id = 2 update [MSsnapshot_agents] SET publisher_id =2 WHERE id = 2 update t set t.job_id = sj.job_id, t.job_step_uid = sjs.step_uid from dbo.MSlogreader_agents t left join dbo.MSreplication_monitordata sm on sm.agent_name = t.name left join msdb.dbo.sysjobs sj on sj.name = t.name left join msdb.dbo.sysjobsteps sjs on sj.job_id = sjs.job_id and sjs.step_id = 2 update t set t.job_id = sj.job_id, t.job_step_uid = sjs.step_uid from dbo.[MSsnapshot_agents] t left join dbo.MSreplication_monitordata sm on sm.agent_name = t.name left join msdb.dbo.sysjobs sj on sj.name = t.name left join msdb.dbo.sysjobsteps sjs on sj.job_id = sjs.job_id and sjs.step_id = 2
update [dbo].[syspublications] set snapshot_jobid=0xD2E257AFD287304CA2FC14F3D7C1AECF update [dbo].[syssubscriptions] set distribution_jobid=0x0E79D3A2A36F73409DB3F4261723F37A
标签:备份恢复 快照 参考 color oca 没有 bsp from 使用
原文地址:https://www.cnblogs.com/Amaranthus/p/9686084.html