Enabling replication for stored procedures

StepsEnabling 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 disabled for the stored procedure:

    pdb_setrepproc pdb_proc
    

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

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

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

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

    pdb_setrepproc pdb_proc, enable
    

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

    After replication is enabled for the stored procedure, any invocation of that stored procedure is replicated.

  4. You can use the pdb_setrepproc command again to verify that replication is now enabled 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 enabled.