We are getting the following error on all of the repliction from one server:
The process could not execute 'sp_repldone/sp_replcounters'
Is there a good way to fix it? It all worked until last night when someone executed an update the affected 7 million rows. We have since taken replication off that database. But all the other databases have since had this error.
The agent is also giving this error:The process could not set the last distributed transaction.
Did the UPDATE on 7 million rows work?
If it didn't, did the transaction log run out of space? Also check the transaction log on the Distribution Databases.
The update did work. The problem now is that we have so many transactions that the log reader agents are timing out trying to read them. We have been on the phone with MS PSS and they have been somewhat of a help, but so far there ideas have not worked.
Well we go our issue taken care of. It was not pretty. Here is the lowdown. Essentially we overloaded replication with an update that affected 7 million rows, along with several other process that were updating lots of rows. So we stopped replicating some publications which basically left all the updated rows in the transaction log as marked for replication. The transaction marked for replication could not be removed from the log during normal backup. This created problems because the logs were growing taking up disk space.
Normally in this situation executing sp_repldone will clean these up. Problem was we had so many transactions that sp_repldone was running for hours on small databases.
This left us with one option. Detach the database, rename the log file, reattach the database. A final approach but it worked and the server is functioning better than before.
Hopefully this can help someone else.
We had the same problem as Ross was having. Stopping the replication and rebuilding the transactional replication for the single table didn't work.
At first I tried running the sp_repldone with the options to reset the replication:
EXEC sp_repldone @xactid = NULL, @xact_segno = NULL, @numtrans = 0, @time = 0, @reset = 1
EXEC sp_repldone @xactid = NULL, @xact_segno = NULL, @numtrans = 0, @time = 0, @reset = 0
This didn't work.
What I then did was:
Hope this helps future admins.
Thanks to Ross too.