Disabling replication for stored procedures

StepsDisabling replication for a marked stored procedure

  1. Log in to the Replication Agent instance with the administrator login.

  2. Use the pdb_setrepproc command to verify that replication is enabled for the stored procedure:

    pdb_setrepproc pdb_proc
    

    Here, pdb_proc is the name of the marked stored procedure you want to disable replication for.

    If the pdb_setrepproc command returns information that the stored procedure is marked and has replication enabled, continue this procedure to disable replication for the stored procedure.

    NoteA stored procedure must be marked for replication before replication can be enabled or disabled for that stored procedure.

  3. Use the pdb_setrepproc command to disable replication for the stored procedure:

    pdb_setrepproc pdb_proc, disable
    

    Here, pdb_proc is the name of the marked stored procedure for which you want to disable replication.

    After replication is disabled for the stored procedure, any invocation of that stored procedure is not captured for replication until replication is enabled again.

  4. You can use the pdb_setrepproc command again to verify that replication is now disabled for the stored procedure:

    pdb_setrepproc pdb_proc
    

    Here, pdb_proc is the name of the marked stored procedure for which you want to verify that replication is disabled.