Record once sqlserver subscription and error process of release and settlement process
Error:
Error 20598
20598 since both given mainly due to inconsistent database data, the database generated error prompt stored in the application procedure
You can not find the row at the Subscriber when applying the command to copy
the error message
command to try:if @@trancount > 0 rollback tran
Transaction sequence number:
--0x0000FDAB0003A908008F00000000 order ID: 7
wrong information:
You can not find the row at the Subscriber when applying the replicated command. (Source: MSSQLServer, Error number: 20598)
Get help: HTTP: // Help / on the 20598
You can not find the row at the Subscriber when applying the replicated command. (Source: MSSQLServer, Error number: 20598)
Get help: HTTP: // Help / on the 20598
Execute the following statement to view the affairs of the error on the publication database 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'
Analyzing the actual situation, the data to be restored or skip transaction ID jammed
---------------跳过订阅机器上面的错误------------------------
-----------------------在分发机器上--------------------------
--语法
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;