Remove command from distributor

  • Hi,

    In our topology, our distribution agent is running on-demand via our third party ETL tool. This means that we can control when we move commands/transactions from the distrbutor to the subscriber. It also means commands can queue up in the distributor for awhile.

    Suppose for whatever reason, a bad command was published. The command/transaction is committed at the publisher and has moved to the distributor already. The command is not in sp_replcmds and sp_repldone will not help.

    Is there any way to remove a command from the distributor, so it doesn't apply it to the subscriber? I suppose manually deleting from the distribution database tables is an option, but I was hoping someone could recommend a more elegant approach...

    Thanks!

    Jason

  • If you're looking for something like "sp_replremovecommand" you wont find one.

    I would consider editing the repl proc on the subscriber (ALTER PROCEDURE) to skip a particular primary key OR if its a proc execution, edit that as needed

  • Yes, we were doubtful there was something so simple, but we thought we'd ask.

    In our particular case, the issue was with our custom replication procedures incorrectly treating a new computed column as a physical column, which caused issues when applying the change to the subscriber. So, we added a DDL trigger to change the computed column to a physical one at the subscriber. That allowed the transaction to go through. Then, we fixed our custom procedure logic, dropped the column at the publisher, and then re-added it, this time correctly moving the definition across to the subscriber.

    Thanks for the input!

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

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