Restoring a replicated db

  • I am having an issue that I can't find a solution for.

    I have a database that is replicated in our prod environment. When I try to restore that database to dev (no replication) I have issues.

    I can't truncate the transaction log, I get the following:

    "The log was not truncated because records at the beginning of the log are pending replication. Ensure the Log Reader Agent is running or use sp_repldone to mark transactions as distributed."

    When I check sp_dboption, the database is not set as "Published"

    replinfo in sysobjects is set to 0 when I check it.

    I tried sp_removedreplication and get no success.

    When I try to run sp_repldone, I get "The database is not published"

    What gives? I need to figure out how to solve this. Any help is greatly appreciated.

    Jason

  • Hi,

    Having restored your database I would re-publish it, then run sp_repldone.

    This will allow you to clear the log file.

    You can then use sp_removedbreplication.

    HTH

    Graeme

  • Thanks for your response. I was thinking this is what I would have to do. I was hoping there was some other way.

    Why would Microsoft have a setting to "keep replication settings" if not selecting it would leave some parts hanging?

    Thanks again!

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

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