November 7, 2013 at 4:08 pm
Hi
I have restored a database from our live to test environment. I have renabled replication. The snapshot agent runs but the log reader agent fails with the following:
The process could not execute 'sp_repldone/sp_replcounters' on 'server1'. (Source: MSSQL_REPL, Error number: MSSQL_REPL20011)
Get help: http://help/MSSQL_REPL20011
The log scan number (76717:120777:14) passed to log scan in database 'db1' is not valid. This error may indicate data corruption or that the log file (.ldf) does not match the data file (.mdf). If this error occurred during replication, re-create the publication. Otherwise, restore from backup if the problem results in a failure during startup. (Source: MSSQLServer, Error number: 9003)
Get help: http://help/9003
I have tried restoring the backup with the tail of the log in an attempt to fix this but the error is still the same.
I scripted out the replication publications before i restored the databases on the test environment so that i could easily re-create replication after the restore from live to test. So with that in mind, I have deleted the publications, and re run the scripts to re create them and i still get the same error.
I have also tried running sp_replrestart, but this just seems to not complete. It has been running for 20 mins as i write this.
Can anybody offer any ideas.
November 8, 2013 at 7:04 am
I fixed this by dropping all subscriptions, publications AND dropped and recreated the Publisher/Distributor (both where on the same server).
Just dropping the subscriptions and publications did not fix it - I had to take the extra step of of dropping the Publisher/Distributor.
November 8, 2013 at 9:35 am
You had to drop the publisher, because that is what drops the log reader.
It is important to understand which replication piece each replication agent is related to.
Viewing 3 posts - 1 through 2 (of 2 total)
You must be logged in to reply to this topic. Login to reply