Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

Record the error resolution in the process of subscribing and publishing in Sqlserver database

2025-04-06 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >

Share

Shulou(Shulou.com)06/01 Report--

Record an error report in the sqlserver subscription and publishing process and resolve the error report: 20598 error report

20598 the error report is mainly due to the inconsistency of the database data at both ends, and the database produces an error prompt when applying the stored procedure.

The row was not found at the subscriber when the replicated command was applied

Error messa

Attempted command:

If @ @ trancount > 0 rollback tran

Transaction sequence number:

-- 0x0000FDAB0003A908008F00000000 command ID: 7

Error message:

The row was not found at the subscriber when the replicated command was applied. (source: MSSQLServer, error number: 20598)

Get help: http://help/20598

The row was not found at the subscriber when the replicated command was applied. (source: MSSQLServer, error number: 20598)

Get help: http://help/20598

Execute the following statement on the publication database to view the id of the error transaction

Use distributiongoexec sp_helpsubscriptionerrors' SSDTCEMANTEST','ssdt','skl_11_8','ANCHNET','ssdt';use distributiongoselect * fromdbo.MSarticles mwhere 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'

Judge according to the actual situation, whether to recover the data or skip the stuck transaction ID

-skip errors on the subscription machine-on the distribution machine-- Syntax exec sp_helpsubscriptionerrors [@ publisher =] 'publisher' [@ publisher_db =] 'publisher_db', [@ publication =]' publication', [@ subscriber =] 'subscriber', [@ subscriber_db=]' subscriber_db'--get publisher subscriberselect*from MSsubscriber_info--get publisher_db publication subscriber_db=publisher_dbselect*from MSpublications--exampleexec sp_helpsubscriptionerrors' SQLw2k8','dbtranpub','dbtranpub_pub','SQLw2k8Subscriber' 'dbtransub'-- gets the xact_seqno value-- on the subscription machine-- sp_setsubscriptionxactseqno [@ publisher=] 'publisher', [@ publisher_db=]' publisher_db', [@ publication=] 'publication', [@ xact_seqno=] xact_seqno--example (ignore) exec sp_helpsubscriptionerrors' SQLw2k8','dbtranpub' 'dbtranpub_pub',xact_seqno

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Database

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report