Problems with unmarking tables

When you unmark an object that was marked for replication, Replication Agent generates a script that removes from the primary database the transaction log objects that were created to facilitate replication for that object.

If the marked object (table or stored procedure) is dropped from the database before it is unmarked by Replication Agent, the unmark process will fail because the unmark script will not find all the transaction log components to be removed.

To solve this problem, you can use the unmark, force options with the pdb_setreptable or pdb_setrepproc commands. The force option will cause the SQL script to continue execution, even if it encounters errors, thus removing any existing transaction log objects, even though some are missing.