How Procedural Replication Works
Procedural replication executes your procedure call in the local database and queues a call to the procedure in all other master databases in the replication group, using whatever parameters you pass. This mechanism requires a “wrapper” procedure that calls the procedure that locally does the queueing. It also requires that the procedure be registered as a replicated object in all databases in the replication group.
As an example, suppose that we have a package procedure USER_ADMIN.CREATE_USER and a replicated wrapper package DEFER_USER_ADMIN. A call to the wrapper package results in the following chain of events:
Call to DEFER_USER_ADMIN.CREATE_USER('SCOTT', ‘TIGER').
DEFER_USER_ADMIN calls USER_ADMIN.CREATE_USER('SCOTT', ‘TIGER').
Procedure USER_ADMIN.CREATE_USER executes locally.
DEFER_USER_ADMIN builds a remote call to USER_ADMIN.CREATE_USER in other master databases in the same replication group. The remote call is placed in the deferred transaction queue.
Procedure USER_ADMIN.CREATE_USER executes at remote databases.
Figure 14.1 depicts these events.

Figure 14-1. How procedural replication works
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access