龙盟编程博客 | 无障碍搜索 | 云盘搜索神器
快速搜索
主页 > 数据库类 > Sql Server开发 >

Transactional replication(事务复制)详解之如何跳过一个事务(2)

时间:2014-08-12 11:07来源:网络整理 作者:网络 点击:
分享到:
在subscription database中执行下面的语句,跳过大的事务。请将参数替换成您实际环境中的数据 declare @publisher sysnamedeclare @publicationDB sysname declare @publication s

在subscription database中执行下面的语句,跳过大的事务。请将参数替换成您实际环境中的数据

declare @publisher sysname

declare @publicationDB sysname 

declare @publication sysname 

declare @transaction_timestamp [varbinary](16) 

set @publisher='SQL108W2K8R22' 

set @publicationDB='pubdb' 

set @publication='pubdbtest2' 

set @transaction_timestamp= 0x0000018C000001000171

update MSreplication_subscriptions set transaction_timestamp=@transaction_timestamp 

where publisher=@publisher and publisher_db=@publicationDB and publication=@publication 

执行完成后开启distribution agent job即可。

接下来您就会发现,事务已经成功跳过,ta在订阅端不会被更新,后续的更新会逐步传递到订阅,延迟消失。

精彩图集

赞助商链接