Marking and Unmarking Stored Procedures

Replication Agent supports Replication Server function replication by replicating the invocation of stored procedures in the primary database.

Replication Agent can replicate both applied functions and request functions:
Note: Stored procedure replication is not supported for UDB.

Replication Agent does not distinguish between these two function types, except to supply a specific user and password for use with request functions. If you are using request functions, you must supply the function_username and function_password configuration parameters.

For more information about applied and request functions, see Replication Server Administration Guide > Managing Replicated Functions.

To replicate a stored procedure invoked in a primary database, the stored procedure must be marked for replication, and replication must be enabled for that stored procedure. (This is analogous to marking and enabling replication for tables.)

Note: Marking a stored procedure for replication is separate from enabling replication for the stored procedure. If the value of the pdb_dflt_object_repl parameter is true, replication is enabled automatically at the time a stored procedure is marked.

If a marked stored procedure performs operations that affect a marked table, the operations that affect the marked table are not captured for replication; only the invocation of the marked stored procedure is replicated.

When you mark a stored procedure for replication, Replication Agent creates a shadow-row procedure for that stored procedure. Replication Agent for Oracle and Replication Agent for UDB also modify the marked stored procedure by inserting a new:

To temporarily suspend replication of a marked stored procedure (for example, when database maintenance operations are performed in the primary database), you can disable replication for the stored procedure.

When you unmark an object that has been marked for replication, the transaction log objects that were created to facilitate the replication for that object are removed from the primary database.

For more information on the Replication Server function replication feature, see the Replication Server Administration Guide.

Related concepts
Enabling and Disabling Replication for Stored Procedures