Marking stored procedures in the primary database

To replicate invocations of a stored procedure in the primary database, the stored procedure must be marked for replication, and replication must be enabled for that stored procedure.

For Oracle, DDL replication must be disabled before marking (or unmarking) a stored procedure.

NoteProcedure replication is not available for DB2 Universal Database.

StepsTo mark a stored procedure in the primary database

  1. Log in to the Replication Agent administration port.

  2. Use the pdb_setrepproc command to determine if the stored procedure you want to mark is already marked in the primary database:

    pdb_setrepproc pdb_proc
    

    where pdb_proc is the name of the stored procedure in the primary database that you want to mark for replication.

  3. Use the pdb_setrepproc command to mark the stored procedure for replication and specify the name to use for replication:

    If the pdb_dflt_object_repl parameter is set to true (the default), the stored procedure marked for replication with the pdb_setrepproc command is ready for replication after you invoke the pdb_setrepproc command successfully, and you can skip step 4 in this procedure.

    If the pdb_dflt_object_repl parameter is set to false, you must enable replication for the stored procedure so replication can take place.

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

    pdb_setrepproc pdb_proc, enable
    

    where pdb_proc is the name of the marked stored procedure in the primary database for which you want to enable replication.

After the stored procedure is marked and replication is enabled for the stored procedure, you can begin replicating invocations of that stored procedure.