Replication and recovery of corrupt master.mdf

  • We have a server running 2005 that is setup with both transactional replication and merge replication, and took a hard CRC failure on the master.mdf file causing SQL Server to shut down. We are hopeful that we can restore the master database from a backup taken in the last day or two, as there have not been any changes in replication or the database structures on the server for several weeks.

    If that turns out to be wishful thinking, what complications will we have in rebuilding the server from scratch? The other server involved in the replication scheme (running SQL Server 2008) has all of the data, so we should be able to rebuild completely as the last resort. It would be nice however to be able to simply create a new master, and then attach the .mdf - but I have this uneasy feeling that a fair number of replication parameters are stored in the master database. Does anyone have any insights on that?

    Wendell

    Evergreen, CO

    Wendell
    Colorful Colorado
    You can't see the view if you don't climb the mountain!

  • It turns out that we were able to salvage the situation by creating a new Master database with a reinstall of the SQL Server instance, and then attach the replicated database, and the distribution database. However we had to recreate the publication on the affected server, and then create a new subscription on the distant server. Doing so overwrote the transactional records pushed to the distant server, and wiped out some processed information, but we were able to recover that from a separate table.

    Moral of the story: Backup your master.mdf often if you are using replication, and be prepared to recreate publications if there are any on the server. Surprisingly the Merge replication of a single table survived just fine and required no attention, as did a subscription to a publication on the distant server.

    Wendell Bell

    Evergreen, CO

    Wendell
    Colorful Colorado
    You can't see the view if you don't climb the mountain!

Viewing 2 posts - 1 through 1 (of 1 total)

You must be logged in to reply to this topic. Login to reply