SQL Server updatable subscription Queue Reader Agent error: An attempted insert or update has failed

Source: Internet
Author: User

Original: SQL Server updatable subscription Queue Reader Agent error: An attempted insert or update has failed


Today it is found that the Queue Reader Agent keeps trying to start but always goes wrong:



The contents are as follows:



This may be caused by another problem that has just been dealt with (not mentioned here).

The queue reader is reading data from the subscription database and inserting data into the publication database. The above hint is the reason.

Because the publication database has 2 subscription sub-Libraries, it is not clear which data is caused by the number of subscriptions according to the library.

So execute the following code in 2 subscription databases to see which record is the same:

SELECT * from  [subdbname].[ DBO]. [Msrepl_queuedtraninfo] ORDER by maxorderkey ASC

Run a few times to view the output, if the first record remains unchanged, and the total number of records only increases, it means that the queue subscribed to the release is blocked in this record!



Workaround:

Delete this transaction from the queued transaction in this subscription library! However, the transaction is not synchronized back to the publication database.

SELECT * FROM [Platform]. [dbo]. [Msrepl_queuedtraninfo] WHERE tranid= ' 9xsm<<js713^ahxkjy5sq=5---0KG---' SELECT * from [Platform]. [dbo]. [MSreplication_queue] WHERE tranid= ' 9xsm<<js713^ahxkjy5sq=5---0KG---' DELETE from [Platform]. [dbo]. [Msrepl_queuedtraninfo] WHERE tranid= ' 9xsm<<js713^ahxkjy5sq=5---0KG---' DELETE from [Platform]. [dbo]. [MSreplication_queue] WHERE tranid= ' 9xsm<<js713^ahxkjy5sq=5---0KG---'


But specifically what statements or settings are caused by the " with CHECK OPTION", pending review.







SQL Server updatable subscription Queue Reader Agent error: An attempted insert or update has failed

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.