Mirror Switch LogReader agent error: Inconsistent status may exist in the distribution database (cont.)

Source: Internet
Author: User

Error:

There may be an inconsistent state in the distribution database: Dist_backup_lsn {00000030:000001ba:0004},dist_last_lsn {00000030:000001cd:0004}. Please execute "sp_repldone null, NULL, 0, 0, 1" and then execute sp_replflush. Please reinitialize all subscriptions to the publication. (Source: MSSQLServer, Error number: 18846)

The error comes from:

The first parameter is DIST_LAST_LSN and the second parameter is DIST_BACKUP_LSN

Where Dist_last_lsn comes from table msrepl_transactions, sp_msget_last_transaction through stored procedure @publisher_id = 9, @publisher_db = N ' Db_test ' , @for_truncate = 0x0 obtained

Dist_backup_lsn from table Msrepl_backup_lsns, sp_msget_last_transaction @publisher_id = 9 through stored procedures, @publisher_db = N ' Db_test ', @for_truncate = 0x1 Obtained

If you do a backup of the distribution database at this point, the value of Msrepl_backup_lsns will be modified to match the MSrepl_transactions value, and LogReader will continue to work.

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.