Skip Headers
Oracle® Database Advanced Replication Management API Reference
10g Release 2 (10.2)

Part Number B14227-01
Go to Documentation Home
Home
Go to Book List
Book List
Go to Table of Contents
Contents
Go to Index
Index
Go to Master Index
Master Index
Go to Feedback page
Feedback

Go to previous page
Previous
Go to next page
Next
View PDF

22 DBMS_REPUTIL

DBMS_REPUTIL contains subprograms to generate shadow tables, triggers, and packages for table replication, as well as subprograms to generate wrappers for replication of standalone procedure invocations and packaged procedure invocations. This package is referenced only by the generated code.

This chapter contains this topic:


Summary of DBMS_REPUTIL Subprograms

Table 22-1 DBMS_REPUTIL Package Subprograms

Subprogram Description
"REPLICATION_OFF Procedure"
Modifies tables without replicating the modifications to any other sites in the replication environment, or disables row-level replication when using procedural replication.
"REPLICATION_ON Procedure"
Reenables replication of changes after replication has been temporarily suspended.
"REPLICATION_IS_ON Function"
Determines whether or not replication is running.
FROM_REMOTE Function
Returns TRUE at the beginning of procedures in the internal replication packages, and returns FALSE at the end of these procedures.
"GLOBAL_NAME Function"
Determines the global database name of the local database (the global name is the returned value).
"MAKE_INTERNAL_PKG Procedure"
Synchronizes internal packages and tables in the replication catalog.

Note: Do not execute this procedure unless directed to do so by Oracle Support Services.

"SYNC_UP_REP Procedure"
Synchronizes internal triggers and tables/materialized views in the replication catalog.

Note: Do not execute this procedure unless directed to do so by Oracle Support Services.



REPLICATION_OFF Procedure

This procedure enables you to modify tables without replicating the modifications to any other sites in the replication environment. It also disables row-level replication when using procedural replication. In general, you should suspend replication activity for all master groups in your replication environment before setting this flag.

Syntax

DBMS_REPUTIL.REPLICATION_OFF();

Parameters

None


REPLICATION_ON Procedure

This procedure reenables replication of changes after replication has been temporarily suspended.

Syntax

DBMS_REPUTIL.REPLICATION_ON();

Parameters

None


REPLICATION_IS_ON Function

This function determines whether or not replication is running. A returned value of TRUE indicates that the generated replication triggers are enabled. A return value of FALSE indicates that replication is disabled at the current site for the replication group.

The returning value of this function is set by calling the REPLICATION_ON or REPLICATION_OFF procedures in the DBMS_REPUTIL package.

Syntax

DBMS_REPUTIL.REPLICATION_IS_ON()
  return BOOLEAN;

Parameters

None


FROM_REMOTE Function

This function returns TRUE at the beginning of procedures in the internal replication packages, and returns FALSE at the end of these procedures. You might need to check this function if you have any triggers that could be fired as the result of an update by an internal package.

Syntax

DBMS_REPUTIL.FROM_REMOTE()
   return BOOLEAN;

Parameters

None


GLOBAL_NAME Function

This function determines the global database name of the local database (the global name is the returned value).

Syntax

DBMS_REPUTIL.GLOBAL_NAME()
   return VARCHAR2;

Parameters

None


MAKE_INTERNAL_PKG Procedure

This procedure synchronizes the existence of an internal package with a table or materialized view in the replication catalog. If the table has replication support, then execute this procedure to create the internal package. If replication support does not exist, then this procedure destroys any related internal package. This procedure does not accept the storage table of a nested table.


Caution:

Do not execute this procedure unless directed to do so by Oracle Support Services.

Syntax

DBMS_REPUTIL.MAKE_INTERNAL_PKG (
   canon_sname    IN   VARCHAR2,
   canon_oname    IN   VARCHAR2);

Parameters

Table 22-2 MAKE_INTERNAL_PKG Procedure Parameters

Parameter Description
canon_sname
Schema containing the table to be synchronized.

This parameter value must be canonically defined (capitalization must match object and must not be enclosed in double quotes).

canon_oname
Name of the table to be synchronized.

This parameter value must be canonically defined (capitalization must match object and must not be enclosed in double quotes).



SYNC_UP_REP Procedure

This procedure synchronizes the existence of an internal trigger with a table or materialized view in the replication catalog. If the table or materialized view has replication support, then execute this procedure to create the internal replication trigger. If replication support does not exist, then this procedure destroys any related internal trigger. This procedure does not accept the storage table of a nested table.


Caution:

Do not execute this procedure unless directed to do so by Oracle Support Services.

Syntax

DBMS_REPUTIL.SYNC_UP_REP (
   canon_sname    IN   VARCHAR2,
   canon_oname    IN   VARCHAR2);

Parameters

Table 22-3 SYNC_UP_REP Procedure Parameters

Parameter Description
canon_sname
Schema containing the table or materialized view to be synchronized.

This parameter value must be canonically defined (capitalization must match object and must not be enclosed in double quotes).

canon_oname
Name of the table or materialized view to be synchronized.

This parameter value must be canonically defined (capitalization must match object and must not be enclosed in double quotes).