应用复制的命令时在订阅服务器上找不到该行
错误消息
尝试的命令:if @@trancount > 0 rollback tran
事务序列号:
--0x0000FDAB0003A908008F00000000 命令 ID: 7
错误消息:
应用复制的命令时在订阅服务器上找不到该行。 (源: MSSQLServer,错误号: 20598)
获取帮助: http://help/20598
应用复制的命令时在订阅服务器上找不到该行。 (源: MSSQLServer,错误号: 20598)
获取帮助: http://help/20598
在发布数据库上执行以下语句查看错误事务的id
use distribution
go
exec sp_helpsubscriptionerrors 'SSDTCEMANTEST','ssdt','skl_11_8','ANCHNET','ssdt';
use distribution
go
select * from
dbo.MSarticles m
where exists (select mc.article_id from MSrepl_commands mc where mc.xact_seqno=0x00011F4000009D42006B00000000 AND mc.article_id = m.article_id )
EXEC Sp_browsereplcmds
@xact_seqno_start='0x00011F4000009D42006B00000000',
@xact_seqno_end='0x00011F4000009D42006B00000000'
根据实际情况判断,要恢复数据还是跳过卡住的事务ID
---------------跳过订阅机器上面的错误------------------------
-----------------------在分发机器上--------------------------
--语法
exec sp_helpsubscriptionerrors [ @publisher = ]'publisher'
, [ @publisher_db = ]'publisher_db'
, [ @publication = ]'publication'
, [ @subscriber = ]'subscriber'
, [ @subscriber_db = ]'subscriber_db'
--get publisher subscriber
select*from MSsubscriber_info
--get publisher_db publication subscriber_db=publisher_db
select*from MSpublications
--example
exec sp_helpsubscriptionerrors 'SQLw2k8','dbtranpub','dbtranpub_pub','SQLw2k8Subscriber','dbtransub'
--获取xact_seqno 值
----------------------在订阅机器上---------------------------
sp_setsubscriptionxactseqno [ @publisher= ]'publisher',
[ @publisher_db= ]'publisher_db',
[ @publication= ]'publication',
[ @xact_seqno= ] xact_seqno
--example(忽略)
exec sp_helpsubscriptionerrors 'SQLw2k8','dbtranpub','dbtranpub_pub',xact_seqno;
免责声明:本站发布的内容(图片、视频和文字)以原创、转载和分享为主,文章观点不代表本网站立场,如果涉及侵权请联系站长邮箱:is@yisu.com进行举报,并提供相关证据,一经查实,将立刻删除涉嫌侵权内容。