ch15 06


[Chapter 15] 15.6 DBMS_REPUTIL: Enabling and Disabling ReplicationChapter 15Advanced Replication 15.6 DBMS_REPUTIL: Enabling and Disabling ReplicationSituations will arise when 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.15.6.1 Getting Started with DBMS_REPUTILThe DBMS_REPUTIL package is created when the Oracle database is installed. The dbmsgen.sql script (found in the built-in packages source directory, as described in Chapter 1) 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 privilege on the package to public. All Oracle users can reference and make use of this package.Table 15.7 lists the programs available in this package.Table 15.7: DBMS_REPUTIL Programs NameDescriptionUse in SQL?REPLICATION_OFFTurns replication off for the current sessionNoREPLICATION_ONTurns replication on for the current sessionNo15.6.2 DBMS_REPUTIL InterfaceThis section describes the programs available in the DBMS_REPUTIL package.15.6.2.1 DBMS_REPUTIL.REPLICATION_OFF procedureThe REPLICATION_OFF procedure works by setting a package variable off. The replication triggers can subsequently query this variable. This procedure is as simple as it can be: no parameters and no exceptions. PROCEDURE DBMS_REPUTIL.REPLICATION_OFF;15.6.2.2 DBMS_REPUTIL.REPLICATION_ON procedureThe REPLICATION_ON procedure reverses the effect of the REPLICATION_OFF procedure. It sets the package variable on. The specification follows:PROCEDURE DBMS_REPUTIL.REPLICATION_ON;15.5 DBMS_RECTIFIER_DIFF: Comparing Replicated Tables16. Conflict Resolution Copyright (c) 2000 O'Reilly & Associates. All rights reserved.

Wyszukiwarka

Podobne podstrony:
ch15 (7)
ch15
ch15
ch15
ch15
CH15 (2)
ch15
ch15
CH15 (18)
ch15 (28)
ch15
ch15 (10)
ch15
ch15
ch15
ch15 (3)
ch15

więcej podobnych podstron