The process could not execute 'sp_replcmds' on '--Name withheld--'.

  • Hello,

    We created a new publishication using a generated script from our pass dba and once it had finished running we received this error;

    [The replication option 'publish' of database '--Name withheld--' has already been set to true.

    Msg 21831, Level 16, State 1, Procedure sp_MSrepl_addlogreader_agent, Line 158

    The logreader agent already exists. Use 'sp_changelogreader_agent' to change any settings/properties.

    Now ever since then none of the other publishations are running on the server, after looking in the Replication Monitor(warnings and agents) i see that the Log Reader Agent is failing and producing the following error -

    The process could not execute 'sp_replcmds' on '--Name Withheld--'. (Source: MSSQL_REPL, Error number: MSSQL_REPL20011)

    Execution of filter stored procedure 405068679 failed. See the SQL Server errorlog for more information. (Source: MSSQLServer, Error number: 18764)

    The Log Reader Agent failed to construct a replicated command from log sequence number (LSN) {00007aec:0002395c:000a}. Back up the publication database and contact Customer Support Services. (Source: MSSQLServer, Error number: 18805)

    After digging into the error logs i found

    Message

    [000] Failed to retrieve job 0xFCC6E567D8996D4DB04B5052D293BC97 from the server

    Message

    [156] Job 0xFCC6E567D8996D4DB04B5052D293BC97 does not exist in the job cache: attempting to re-acquire it from the server...

    Message

    [000] Job 0xFCC6E567D8996D4DB04B5052D293BC97 does not exist in the job cache

    Now will running 'sp_replflush' fix this problem ??

    Cheers

    Remember
    Without Change something sleeps inside of us that seldom awakens, the sleeper must awaken!!

  • It might, but then you'll have to reinitialise the replication. I'm concerned about that error recreating transactions from the log.

    Just to be safe, can you run the following command on that DB?

    DBCC CHECKDB(<Database Name> ) WITH NO_INFOMSGS

    Gail Shaw
    Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
    SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability

    We walk in the dark places no others will enter
    We stand on the bridge and no one may pass
  • Hi Gail,

    Thanks for the reply, i've managed to resolve the issue by re-creating the pubs and subs. Thanks again 🙂

    Remember
    Without Change something sleeps inside of us that seldom awakens, the sleeper must awaken!!

  • Glad to hear it.

    Gail Shaw
    Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
    SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability

    We walk in the dark places no others will enter
    We stand on the bridge and no one may pass

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

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