Home Forums SQL Server 2005 SS2K5 Replication Dealing with a database corruption on a merge replication subscriber RE: Dealing with a database corruption on a merge replication subscriber

  • Resolved the corruption as follows:

    Stop the merge agent jobs for the publications:

    Set database to single user mode: ALTER DATABASE database SET SINGLE_USER WITH ROLLBACK IMMEDIATE

    Ran DBCC CHECKDB to repair the corrupt page: DBCC CHECK DB (‘database’, REPAIR_ALLOW_DATA_LOSS)

    DBCC CHECKCONSTRAINTS WITH ALL_CONSTRAINTS

    Set database to multi-user: ALTER DATABASE database SET MULTI_USER; GO

    Restarted the merge agent jobs

    Confirmed replication running correctly in Replication Monitor

    Used sp_addtabletocontents with a filter to repopulate the data that had been lost due to the repair

    Ran DBCC CHECKDB to confirm that the database now in a good state