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.
Prerequisites
For Oracle, DDL replication must be disabled before marking
(or unmarking) a stored procedure.
Note:
Procedure replication is not available for UDB.
Task- Log in to the Replication Agent instance
with the administrator login.
- Determine if replication is enabled for the stored procedure:
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.
-
If pdb_setrepproc returns
information that the specified stored procedure is marked and
replication is enabled, you need not continue this
procedure.
-
If pdb_setrepproc returns
information that the specified stored procedure is marked but
replication is disabled, skip step 3 and continue this procedure
from step 4 to enable replication for the stored procedure.
-
If pdb_setrepproc returns
information that the specified stored procedure is not marked,
continue this procedure to mark the stored procedure for
replication.
- Mark the stored procedure for replication:
-
When the function replication
definition has the same name as the procedure in the primary database,
use: pdb_setrepproc pdb_proc, mark
-
When the name of the function replication definition
is different from the procedure in the primary database, use:
pdb_setrepproc pdb_proc, rep_proc, mark
where
rep_proc is the name of the stored
procedure in the
with all procedures named
rep_proc clause in the Replication Server function
replication definition for this stored procedure.
If pdb_dflt_object_repl
is true (the default), the stored procedure
marked for replication with pdb_setrepproc
is ready for replication after you invoke pdb_setrepproc successfully,
and you can skip step 4 in this procedure.
If pdb_dflt_object_repl
is false, you must enable replication
for the stored procedure so replication can take place.
- Enable replication for the marked stored procedure:
pdb_setrepproc pdb_proc, enable
After the stored procedure is marked and replication is enabled
for the stored procedure, you can begin replicating invocations
of that stored procedure.