DBMS_REPUTIL: Enabling and Disabling Replication
Situations will arise in which you need to perform DML on a replicated table without propagating the changes to other master sites. For example, if you have resolved a conflict and wish to update a row manually, you would not want to propagate your change. Or you might have a trigger on a replicated table that you want to fire only for updates that originate locally. The DBMS_REPUTIL package allows you to control whether updates propagate for the current session. It does this by setting the global variable replication_is_on, which the replication triggers and packages reference.
How the Package Is Used
The procedures REPLICATION_ON and REPLICATION_OFF are useful for controlling the replication of DML. A typical example is DML that is performed to get a local table synchronized with other masters.
Installation and Access
The DBMS_REPUTIL package is created when the Oracle
database is installed. The
dbmsgen.sqlscript (found in the built-in packages source
directory) contains the source code for this package’s
specification. This script is called by
catrep.sql, which must be run to install the
advanced replication packages. The script creates the public synonym
DBMS_REPUTIL for the package and grants EXECUTE privileges on the
package to public. All Oracle users can reference and make use of
this package.
DBMS_REPUTIL Procedures
Procedure Name | Description |
|---|---|
REPLICATION_OFF | Turns replication off for the current session |
REPLICATION_ON | Turns replication ... |