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

18 DBMS_REPCAT

DBMS_REPCAT provides routines to administer and update the replication catalog and environment.

This chapter contains this topic:


Summary of DBMS_REPCAT Subprograms

Table 18-1 DBMS_REPCAT Package Subprograms

Subprogram Description
"ADD_GROUPED_COLUMN Procedure"
Adds members to an existing column group.
"ADD_MASTER_DATABASE Procedure"
Adds another master site to your replication environment.
"ADD_NEW_MASTERS Procedure"
Adds the master sites in the DBA_REPSITES_NEW data dictionary view to the replication catalog at all available master sites.
"ADD_PRIORITY_datatype Procedure"
Adds a member to a priority group.
"ADD_SITE_PRIORITY_SITE Procedure"
Adds a new site to a site priority group.
"ADD_conflicttype_RESOLUTION Procedure"
Designates a method for resolving an update, delete, or uniqueness conflict.
"ALTER_CATCHUP_PARAMETERS Procedure"
Alters the values for parameters stored in the DBA_REPEXTENSIONS data dictionary view.
"ALTER_MASTER_PROPAGATION Procedure"
Alters the propagation method for a specified replication group at a specified master site.
"ALTER_MASTER_REPOBJECT Procedure"
Alters an object in your replication environment.
"ALTER_MVIEW_PROPAGATION Procedure"
Alters the propagation method for a specified replication group at the current materialized view site.
"ALTER_PRIORITY Procedure"
Alters the priority level associated with a specified priority group member.
"ALTER_PRIORITY_datatype Procedure"
Alters the value of a member in a priority group.
"ALTER_SITE_PRIORITY Procedure"
Alters the priority level associated with a specified site.
"ALTER_SITE_PRIORITY_SITE Procedure"
Alters the site associated with a specified priority level.
"CANCEL_STATISTICS Procedure"
Stops collecting statistics about the successful resolution of update, uniqueness, and delete conflicts for a table.
"COMMENT_ON_COLUMN_GROUP Procedure"
Updates the comment field in the ALL_REPCOLUMN_GROUP view for a column group.
"COMMENT_ON_MVIEW_REPSITES Procedure"
Updates the SCHEMA_COMMENT field in the ALL_REPGROUP view for a materialized view site.
"COMMENT_ON_PRIORITY_GROUP Procedures"
Updates the comment field in the ALL_REPPRIORITY_GROUP view for a priority group.
"COMMENT_ON_REPGROUP Procedure"
Updates the comment field in the ALL_REPGROUP view for a master group.
"COMMENT_ON_REPOBJECT Procedure"
Updates the comment field in the ALL_REPOBJECT view for a replicated object.
"COMMENT_ON_REPSITES Procedure"
Updates the comment field in the ALL_REPSITE view for a replicated site.
"COMMENT_ON_SITE_PRIORITY Procedure"
Updates the comment field in the ALL_REPPRIORITY_GROUP view for a site priority group.
"COMMENT_ON_conflicttype_RESOLUTION Procedure"
Updates the comment field in the ALL_REPRESOLUTION view for a conflict resolution routine.
"COMPARE_OLD_VALUES Procedure"
Specifies whether to compare old column values at each master site for each nonkey column of a replicated table for updates and deletes.
"CREATE_MASTER_REPGROUP Procedure"
Creates a new, empty, quiesced master group.
"CREATE_MASTER_REPOBJECTProcedure"
Specifies that an object is a replicated object.
"CREATE_MVIEW_REPGROUP Procedure"
Creates a new, empty materialized view group in your local database.
"CREATE_MVIEW_REPOBJECT Procedure"
Adds a replicated object to a materialized view group.
"DEFINE_COLUMN_GROUP Procedure"
Creates an empty column group.
"DEFINE_PRIORITY_GROUP Procedure"
Creates a new priority group for a master group.
"DEFINE_SITE_PRIORITY Procedure"
Creates a new site priority group for a master group.
"DO_DEFERRED_REPCAT_ADMIN Procedure"
Executes the local outstanding deferred administrative procedures for the specified master group at the current master site, or for all master sites.
"DROP_COLUMN_GROUP Procedure"
Drops a column group.
"DROP_GROUPED_COLUMN Procedure"
Removes members from a column group.
"DROP_MASTER_REPGROUP Procedure"
Drops a master group from your current site.
"DROP_MASTER_REPOBJECT Procedure"
Drops a replicated object from a master group.
"DROP_MVIEW_REPGROUP Procedure"
Drops a replicated object from a master group.
"DROP_MVIEW_REPGROUP Procedure"
Drops a materialized view site from your replication environment.
"DROP_MVIEW_REPOBJECT Procedure"
Drops a replicated object from a materialized view site.
"DROP_PRIORITY Procedure"
Drops a member of a priority group by priority level.
"DROP_PRIORITY_GROUP Procedure"
Drops a priority group for a specified master group.
"DROP_PRIORITY_datatype Procedure"
Drops a member of a priority group by value.
"DROP_SITE_PRIORITY Procedure"
Drops a site priority group for a specified master group.
"DROP_SITE_PRIORITY_SITE Procedure"
Drops a specified site, by name, from a site priority group.
"DROP_conflicttype_RESOLUTION Procedure"
Drops an update, delete, or uniqueness conflict resolution method.
"EXECUTE_DDL Procedure"
Supplies DDL that you want to have executed at each master site.
"GENERATE_MVIEW_SUPPORT Procedure"
Activates triggers and generate packages needed to support the replication of updatable materialized views or procedural replication.
"GENERATE_REPLICATION_SUPPORT Procedure"
Generates the triggers, packages, and procedures needed to support replication for a specified object.
"MAKE_COLUMN_GROUP Procedure"
Creates a new column group with one or more members.
"PREPARE_INSTANTIATED_MASTER Procedure"
Changes the global name of the database you are adding to a master group.
"PURGE_MASTER_LOG Procedure"
Removes local messages in the DBA_REPCATLOG associated with a specified identification number, source, or master group.
"PURGE_STATISTICS Procedure"
Removes information from the ALL_REPRESOLUTION_STATISTICS view.
"REFRESH_MVIEW_REPGROUP Procedure"
Refreshes a materialized view group with the most recent data from its associated master site or master materialized view site.
REGISTER_MVIEW_REPGROUP Procedure
Facilitates the administration of materialized views at their respective master sites or master materialized view sites by inserting, modifying, or deleting from DBA_REGISTERED_MVIEW_GROUPS.
"REGISTER_STATISTICS Procedure"
Collects information about the successful resolution of update, delete, and uniqueness conflicts for a table.
"RELOCATE_MASTERDEF Procedure"
Changes your master definition site to another master site in your replication environment.
"REMOVE_MASTER_DATABASES Procedure"
Removes one or more master databases from a replication environment.
"RENAME_SHADOW_COLUMN_GROUP Procedure"
Renames the shadow column group of a replicated table to make it a named column group.
"REPCAT_IMPORT_CHECKProcedure"
Ensures that the objects in the master group have the appropriate object identifiers and status values after you perform an export/import of a replicated object or an object used by the advanced replication facility.
"RESUME_MASTER_ACTIVITY Procedure"
Resumes normal replication activity after quiescing a replication environment.
"RESUME_PROPAGATION_TO_MDEF Procedure"
Indicates that export is effectively finished and propagation for both extended and unaffected replication groups existing at master sites can be enabled.
"SEND_OLD_VALUES Procedure"
Specifies whether to send old column values for each nonkey column of a replicated table for updates and deletes.
"SET_COLUMNS Procedure"
Specifies use of an alternate column or group of columns, instead of the primary key, to determine which columns of a table to compare when using row-level replication.
"SPECIFY_NEW_MASTERS Procedure"
Specifies the master sites you intend to add to an existing replication group without quiescing the group.
"STREAMS_MIGRATION Procedure"
Generates a migration script that migrates an Advanced Replication environment to a Streams environment.
"SUSPEND_MASTER_ACTIVITY Procedure"
Suspends replication activity for a master group.
"SWITCH_MVIEW_MASTER Procedure"
Changes the master site of a materialized view group to another master site.
"UNDO_ADD_NEW_MASTERS_REQUEST Procedure"
Undoes all of the changes made by the SPECIFY_NEW_MASTERS and ADD_NEW_MASTERS procedures for a specified extension_id.
"UNREGISTER_MVIEW_REPGROUP Procedure"
Facilitates the administration of materialized views at their respective master sites and master materialized view sites by inserting, modifying, or deleting from DBA_REGISTERED_MVIEW_GROUPS.
"VALIDATE Function"
Validates the correctness of key conditions of a multimaster replication environment.
"WAIT_MASTER_LOG Procedure"
Determines whether changes that were asynchronously propagated to a master site have been applied.


ADD_GROUPED_COLUMN Procedure

This procedure adds members to an existing column group. You must call this procedure from the master definition site.

Syntax

DBMS_REPCAT.ADD_GROUPED_COLUMN ( 
   sname                 IN   VARCHAR2,
   oname                 IN   VARCHAR2,
   column_group          IN   VARCHAR2,
   list_of_column_names  IN   VARCHAR2 | DBMS_REPCAT.VARCHAR2s);

Parameters

Table 18-2 ADD_GROUPED_COLUMN Procedure Parameters

Parameter Description
sname
Schema in which the replicated table is located.
oname
Name of the replicated table with which the column group is associated. The table can be the storage table of a nested table.
column_group
Name of the column group to which you are adding members.
list_of_column_names
Names of the columns that you are adding to the designated column group. This can either be a comma-delimited list or a PL/SQL index-by table of column names. The PL/SQL index-by table must be of type DBMS_REPCAT.VARCHAR2. Use the single value '*' to create a column group that contains all of the columns in your table.

You can specify column objects, but you cannot specify attributes of column objects.

If the table is an object, then you can specify SYS_NC_OID$ to add the object identifier column to the column group. This column tracks the object identifier of each row object.

If the table is a storage table of a nested table, then you can specify NESTED_TABLE_ID to add the column that tracks the identifier for each row of the nested table.


Exceptions

Table 18-3 ADD_GROUPED_COLUMN Procedure Exceptions

Exception Description
nonmasterdef
Invocation site is not the master definition site.
missingobject
Specified table does not exist.
missinggroup
Specified column group does not exist.
missingcolumn
Specified column does not exist in the specified table.
duplicatecolumn
Specified column is already a member of another column group.
missingschema
Specified schema does not exist.
notquiesced
Replication group to which the specified table belongs is not quiesced.


ADD_MASTER_DATABASE Procedure

This procedure adds another master site to your replication environment. This procedure regenerates all the triggers and their associated packages at existing master sites. You must call this procedure from the master definition site.

Syntax

DBMS_REPCAT.ADD_MASTER_DATABASE (
   gname                 IN   VARCHAR2,
   master                IN   VARCHAR2, 
   use_existing_objects  IN   BOOLEAN  := true, 
   copy_rows             IN   BOOLEAN  := true,
   comment               IN   VARCHAR2 := '',
   propagation_mode      IN   VARCHAR2 := 'ASYNCHRONOUS',
   fname                 IN   VARCHAR2 := NULL);

Parameters

Table 18-4 ADD_MASTER_DATABASE Procedure Parameters

Parameter Description
gname
Name of the replication group being replicated. This replication group must already exist at the master definition site.
master
Fully qualified database name of the new master database.
use_existing_objects
Indicate true if you want to reuse any objects of the same type and shape that already exist in the schema at the new master site.
copy_rows
Indicate true if you want the initial contents of a table at the new master site to match the contents of the table at the master definition site.
comment
This comment is added to the MASTER_COMMENT field of the DBA_REPSITES view.
propagation_mode
Method of forwarding changes to and receiving changes from new master database. Accepted values are synchronous and asynchronous.
fname
This parameter is for internal use only.

Note: Do not set this parameter unless directed to do so by Oracle Support Services.


Exceptions

Table 18-5 ADD_MASTER_DATABASE Procedure Exceptions

Exception Description
nonmasterdef
Invocation site is not the master definition site.
notquiesced
Replication has not been suspended for the master group.
missingrepgroup
Replication group does not exist at the specified database site.
commfailure
New master is not accessible.
typefailure
An incorrect propagation mode was specified.
duplrepgrp
Master site already exists.


ADD_NEW_MASTERS Procedure

This procedure adds the master sites in the DBA_REPSITES_NEW data dictionary view to the master groups specified when the SPECIFY_NEW_MASTERS procedure was run. Information about these new master sites are added to the replication catalog at all available master sites.

All master sites instantiated with object-level export/import must be accessible at this time. Their new replication groups are added in the quiesced state. Master sites instantiated through full database export/import or through changed-based recovery do not need to be accessible.

Run this procedure after you run the SPECIFY_NEW_MASTERS procedure.


Caution:

After running this procedure, do not disable or enable propagation of the deferred transactions queue until after the new master sites are added. The DBA_REPEXTENSIONS data dictionary view must be clear before you disable or enable propagation. You can use the Replication Management tool or the SET_DISABLED procedure in the DBMS_DEFER_SYS package to disable or enable propagation.


Note:

You can use either Data Pump export/import or original export/import to perform exports and imports in an Advanced Replication environment. General references to export/import in this document refer to both Data Pump and original export/import.


See Also:


Syntax

DBMS_REPCAT.ADD_NEW_MASTERS (
   export_required                IN    BOOLEAN,
   { available_master_list        IN    VARCHAR2, 
   | available_master_table       IN    DBMS_UTILITY.DBLINK_ARRAY,}
   masterdef_flashback_scn        OUT   NUMBER,   
   extension_id                   OUT   RAW,   
   break_trans_to_masterdef       IN    BOOLEAN   := false,    
   break_trans_to_new_masters     IN    BOOLEAN   := false,    
   percentage_for_catchup_mdef    IN    BINARY_INTEGER  := 100,    
   cycle_seconds_mdef             IN    BINARY_INTEGER  := 60,    
   percentage_for_catchup_new     IN    BINARY_INTEGER  := 100,    
   cycle_seconds_new              IN    BINARY_INTEGER  := 60);


Note:

This procedure is overloaded. The available_master_list and available_master_table parameters are mutually exclusive.

Parameters

Table 18-6 ADD_NEW_MASTERS Procedure Parameters

Parameter Description
export_required
Set to true if either object-level or full database export is required for at least one of the new master sites. Set to false if you are using change-based recovery for all of the new master sites.
available_master_list

A comma-delimited list of the new master sites to be instantiated using object-level export/import. The sites listed must match the sites specified in the SPECIFY_NEW_MASTERS procedure. List only the new master sites, not the existing master sites. Do not put any spaces between site names.

Specify NULL if all masters will be instantiated using full database export/import or change-based recovery.

available_master_table
A table that lists the new master sites to be instantiated using object-level export/import. The sites in the table must match the sites specified in the SPECIFY_NEW_MASTERS procedure. Do not specify masters that will be instantiated using full database export/import or change-based recovery.

In the table that lists the master sites to be instantiated using object-level export/import, list only the new master sites for the master groups being extended. Do not list the existing master sites in the master groups being extended. The first master site should be at position 1, the second at position 2, and so on.

masterdef_flashback_scn
This OUT parameter returns a system change number (SCN) that must be used during export or change-based recovery. Use the value returned by this parameter for the FLASHBACK_SCN export parameter when you perform the export. You can find the flashback_scn value by querying the DBA_REPEXTENSIONS data dictionary view.
extension_id
This OUT parameter returns an identifier for the current pending request to add master databases without quiesce. You can find the extension_id by querying the DBA_REPSITES_NEW and DBA_REPEXTENSIONS data dictionary views.
break_trans_to_masterdef
This parameter is meaningful only if export_required is set to true.

If break_trans_to_masterdef is set to true, then existing masters can continue to propagate their deferred transactions to the master definition site for replication groups that are not adding master sites. Deferred transactions for replication groups that are adding master sites cannot be propagated until the export completes.

Each deferred transaction is composed of one or more remote procedure calls (RPCs). If set to false and a transaction occurs that references objects in both unaffected master groups and master groups that are being extended, then the transaction might be split into two parts and sent to a destination in two separate transactions at different times. Such transactions are called split-transactions. If split-transactions are possible, then you must disable integrity constraints that might be violated by this behavior until the new master sites are added.

If break_trans_to_masterdef is set to false, then existing masters cannot propagate their deferred transactions to the master definition site.

break_trans_to_new_masters
If break_trans_to_new_masters is set to true, then existing master sites can continue to propagate deferred transactions to the new master sites for replication groups that are not adding master sites.

Each deferred transaction is composed of one or more remote procedure calls (RPCs). If set to true and a transaction occurs that references objects in both unaffected master groups and master groups that are being extended, then the transaction might be split into two parts and sent to a destination in two separate transactions at different times. Such transactions are called split-transactions. If split-transactions are possible, then you must disable integrity constraints that might be violated by this behavior until the new master sites are added.

If break_trans_to_new_masters is set to false, then propagation of deferred transaction queues to the new masters is disabled.

percentage_for_catchup_mdef
This parameter is meaningful only if export_required and break_trans_to_masterdef are both set to true.

The percentage of propagation resources that should be used for catching up propagation to the master definition site. Must be a multiple of 10 and must be between 0 and 100.

cycle_seconds_mdef
This parameter is meaningful when percentage_for_catchup_mdef is both meaningful and set to a value between 10 and 90, inclusive. In this case, propagation to the master definition site alternates between replication groups that are not being extended and replication groups that are being extended, with one push to each during each cycle. This parameter indicates the length of the cycle in seconds.
percentage_for_catchup_new
This parameter is meaningful only if break_trans_to_new_masters is set to true.

The percentage of propagation resources that should be used for catching up propagation to new master sites. Must be a multiple of 10 and must be between 0 and 100.

cycle_seconds_new
This parameter is meaningful when percentage_for_catchup_new is both meaningful and set to a value between 10 and 90, inclusive. In this case, propagation to a new master alternates between replication groups that are not being extended and replication groups that are being extended, with one push to each during each cycle. This parameter indicates the length of the cycle in seconds.

Exceptions

Table 18-7 ADD_NEW_MASTERS Procedure Exceptions

Exception Description
nonmasterdef
Invocation site is not the master definition site.
typefailure
The parameter value specified for one of the parameters is not appropriate.
novalidextreq
No valid extension request. The extension_id is not valid.
nonewsites
No new master sites to be added for the specified extension request.
notanewsite
Not a new site for extension request. A site was specified that was not specified when you ran the SPECIFY_NEW_MASTERS procedure.
dbnotcompatible
Feature is incompatible with database version. All databases must be at 9.0.1 or higher compatibility level.

Usage Notes

For a new master site to be instantiated using change-based recovery or full database export/import, the following conditions apply:

For object-level export/import, before importing ensure that all the requests in the DBA_REPCATLOG data dictionary view for the extended groups have been processed without any error.


ADD_PRIORITY_datatype Procedure

This procedure adds a member to a priority group. You must call this procedure from the master definition site. The procedure that you must call is determined by the datatype of your priority column. You must call this procedure once for each of the possible values of the priority column.


See Also:

Chapter 6, "Configure Conflict Resolution" and Oracle Database Advanced Replication for more information about conflict resolution methods

Syntax

DBMS_REPCAT.ADD_PRIORITY_datatype (
   gname              IN   VARCHAR2, 
   pgroup             IN   VARCHAR2, 
   value              IN   datatype, 
   priority           IN   NUMBER);

where datatype:

{ NUMBER
| VARCHAR2
| CHAR
| DATE
| RAW
| NCHAR
| NVARCHAR2 }

Parameters

Table 18-8 ADD_PRIORITY_datatype Procedure Parameters

Parameter Description
gname
Master group for which you are creating a priority group.
pgroup
Name of the priority group.
value
Value of the priority group member. This is one of the possible values of the associated priority column of a table using this priority group.
priority
Priority of this value. The higher the number, the higher the priority.

Exceptions

Table 18-9 ADD_PRIORITY_datatype Procedure Exceptions

Exception Description
nonmasterdef
Invocation site is not the master definition site.
duplicatevalue
Specified value already exists in the priority group.
duplicatepriority
Specified priority already exists in the priority group.
missingrepgroup
Specified master group does not exist.
missingprioritygroup
Specified priority group does not exist.
typefailure
Specified value has the incorrect datatype for the priority group.
notquiesced
Specified master group is not quiesced.


ADD_SITE_PRIORITY_SITE Procedure

This procedure adds a new site to a site priority group. You must call this procedure from the master definition site.


See Also:

Chapter 6, "Configure Conflict Resolution" and Oracle Database Advanced Replication for more information about conflict resolution methods

Syntax

DBMS_REPCAT.ADD_SITE_PRIORITY_SITE (
   gname          IN   VARCHAR2, 
   name           IN   VARCHAR2,
   site           IN   VARCHAR2,
   priority       IN   NUMBER);

Parameters

Table 18-10 ADD_SITE_PRIORITY_SITE Procedure Parameters

Parameter Description
gname
Master group for which you are adding a site to a group.
name
Name of the site priority group to which you are adding a member.
site
Global database name of the site that you are adding.
priority
Priority level of the site that you are adding. A higher number indicates a higher priority level.

Exceptions

Table 18-11 ADD_SITE_PRIORITY_SITE Procedure Exceptions

Exception Description
nonmasterdef
Invocation site is not the master definition site.
missingrepgroup
Specified master group does not exist.
missingpriority
Specified site priority group does not exist.
duplicatepriority
Specified priority level already exists for another site in the group.
duplicatevalue
Specified site already exists in the site priority group.
notquiesced
Master group is not quiesced.


ADD_conflicttype_RESOLUTION Procedure

These procedures designate a method for resolving an update, delete, or uniqueness conflict. You must call these procedures from the master definition site. The procedure that you need to call is determined by the type of conflict that the routine resolves.

Table 18-12 ADD_conflicttype_RESOLUTION Procedures

Conflict Type Procedure Name
update ADD_UPDATE_RESOLUTION
uniqueness ADD_UNIQUE_RESOLUTION
delete ADD_DELETE_RESOLUTION


See Also:

Chapter 6, "Configure Conflict Resolution" and Oracle Database Advanced Replication for more information about designating methods to resolve update conflicts, selecting uniqueness conflict resolution methods, and assigning delete conflict resolution methods

Syntax

DBMS_REPCAT.ADD_UPDATE_RESOLUTION (
   sname                  IN   VARCHAR2, 
   oname                  IN   VARCHAR2, 
   column_group           IN   VARCHAR2,
   sequence_no            IN   NUMBER,
   method                 IN   VARCHAR2, 
   parameter_column_name  IN   VARCHAR2 
                               | DBMS_REPCAT.VARCHAR2s 
                               | DBMS_UTILITY.LNAME_ARRAY, 
   priority_group         IN   VARCHAR2     := NULL,
   function_name          IN   VARCHAR2     := NULL,
   comment                IN   VARCHAR2     := NULL);

DBMS_REPCAT.ADD_DELETE_RESOLUTION (
   sname                  IN   VARCHAR2, 
   oname                  IN   VARCHAR2, 
   sequence_no            IN   NUMBER,
   parameter_column_name  IN   VARCHAR2 | DBMS_REPCAT.VARCHAR2s, 
   function_name          IN   VARCHAR2,
   comment                IN   VARCHAR2     := NULL
   method                 IN   VARCHAR2     := 'USER FUNCTION');

DBMS_REPCAT.ADD_UNIQUE_RESOLUTION(
   sname                 IN   VARCHAR2, 
   oname                 IN   VARCHAR2, 
   constraint_name       IN   VARCHAR2,
   sequence_no           IN   NUMBER,
   method                IN   VARCHAR2, 
   parameter_column_name IN   VARCHAR2
                              | DBMS_REPCAT.VARCHAR2s 
                              | DBMS_UTILITY.LNAME_ARRAY,
   function_name         IN   VARCHAR2     := NULL,
   comment               IN   VARCHAR2     := NULL);

Parameters

Table 18-13 ADD_conflicttype_RESOLUTION Procedure Parameters

Parameter Description
sname
Name of the schema containing the table to be replicated.
oname
Name of the table to which you are adding a conflict resolution routine. The table can be the storage table of a nested table.
column_group
Name of the column group to which you are adding a conflict resolution routine. Column groups are required for update conflict resolution routines only.
constraint_name
Name of the unique constraint or unique index for which you are adding a conflict resolution routine. Use the name of the unique index if it differs from the name of the associated unique constraint. Constraint names are required for uniqueness conflict resolution routines only.
sequence_no
Order in which the designated conflict resolution methods should be applied.
method
Type of conflict resolution routine that you want to create. This can be the name of one of the standard routines provided with advanced replication, or, if you have written your own routine, you should choose user function, and provide the name of your method as the function_name parameter.

The standard methods supported in this release for update conflicts are:

  • minimum

  • maximum

  • latest timestamp

  • earliest timestamp

  • additive, average

  • priority group

  • site priority

  • overwrite

  • discard

The standard methods supported in this release for uniqueness conflicts are: append site name, append sequence, and discard. There are no built-in (Oracle supplied) methods for delete conflicts.

parameter_column_name
Name of the columns used to resolve the conflict. The standard methods operate on a single column. For example, if you are using the latest timestamp method for a column group, then you should pass the name of the column containing the timestamp value as this parameter. If your are using a user function, then you can resolve the conflict using any number of columns.

For update or unique conflicts, this parameter accepts either a comma-delimited list of column names, or a PL/SQL index-by table of type DBMS_REPCAT.VARCHAR2 or DBMS_UTILITY.LNAME_ARRAY. Use DBMS_UTILITY.LNAME_ARRAY if any column name is greater than or equal to 30 bytes, which might occur when you specify the attributes of column objects.

For delete conflicts, this parameter accepts either a comma-delimited list of column names or a PL/SQL index-by table of type DBMS_REPCAT.VARCHAR2.

The single value '*' indicates that you want to use all of the columns in the table (or column group, for update conflicts) to resolve the conflict. If you specify '*', then the columns are passed to your function in alphabetical order.

LOB columns cannot be specified for this parameter.

See Also: "Usage Notes" if you are using column objects

priority_group
If you are using the priority group or site priority update conflict resolution method, then you must supply the name of the priority group that you have created.

See Chapter 6, "Configure Conflict Resolution" and Oracle Database Advanced Replication for more information. If you are using a different method, you can use the default value for this parameter, NULL. This parameter is applicable to update conflicts only.

function_name
If you selected the user function method, or if you are adding a delete conflict resolution routine, then you must supply the name of the conflict resolution routine that you have written. If you are using one of the standard methods, then you can use the default value for this parameter, NULL.
comment
This user comment is added to the DBA_REPRESOLUTION view.

Exceptions

Table 18-14 ADD_conflicttype_RESOLUTION Procedure Exceptions

Exception Description
nonmasterdef
Invocation site is not the master definition site.
missingobject
Specified object does not exist as a table in the specified schema using row-level replication.
missingschema
Specified schema does not exist.
missingcolumn
Column that you specified as part of the parameter_column_name parameter does not exist.
missinggroup
Specified column group does not exist.
missingprioritygroup
The priority group that you specified does not exist for the table.
invalidmethod
Resolution method that you specified is not recognized.
invalidparameter
Number of columns that you specified for the parameter_column_name parameter is invalid. (The standard routines take only one column name.)
missingfunction
User function that you specified does not exist.
missingconstraint
Constraint that you specified for a uniqueness conflict does not exist.
notquiesced
Replication group to which the specified table belongs is not quiesced.
duplicateresolution
Specified conflict resolution method is already registered.
duplicatesequence
The specified sequence number already exists for the specified object.
invalidprioritygroup
The specified priority group does not exist.
paramtype
Type is different from the type assigned to the priority group.

Usage Notes

If you are using column objects, then whether you can specify the attributes of the column objects for the parameter_column_name parameter depends on whether the conflict resolution method is built-in (Oracle supplied) or user-created:


ALTER_CATCHUP_PARAMETERS Procedure

This procedure alters the values for the following parameters stored in the DBA_REPEXTENSIONS data dictionary view:

These parameters were originally set by the ADD_NEW_MASTERS procedure. The new values you specify for these parameters are used during the remaining steps in the process of adding new master sites to a master group. These changes are only to the site at which it is executed. Therefore, it must be executed at each master site, including the master definition site, if you want to alter parameters at all sites.


See Also:


Syntax

DBMS_REPCAT.ALTER_CATCHUP_PARAMETERS (
   extension_id                  IN    RAW,   
   percentage_for_catchup_mdef   IN    BINARY_INTEGER  := NULL,
   cycle_seconds_mdef            IN    BINARY_INTEGER  := NULL,    
   percentage_for_catchup_new    IN    BINARY_INTEGER  := NULL,    
   cycle_seconds_new             IN    BINARY_INTEGER  := NULL);

Parameters

Table 18-15 ALTER_CATCHUP_PARAMETERS Procedure Parameters

Parameter Description
extension_id
The identifier for the current pending request to add master database without quiesce. You can find the extension_id by querying the DBA_REPSITES_NEW and DBA_REPEXTENSIONS data dictionary views.
percentage_for_catchup_mdef
The percentage of propagation resources that should be used for catching up propagation to the master definition site. Must be a multiple of 10 and must be between 0 and 100.
cycle_seconds_mdef
This parameter is meaningful when percentage_for_catchup_mdef is both meaningful and set to a value between 10 and 90, inclusive. In this case, propagation to the master definition site alternates between replication groups that are not being extended and replication groups that are being extended, with one push to each during each cycle. This parameter indicates the length of the cycle in seconds.
percentage_for_catchup_new
The percentage of propagation resources that should be used for catching up propagation to new master sites. Must be a multiple of 10 and must be between 0 and 100.
cycle_seconds_new
This parameter is meaningful when percentage_for_catchup_new is both meaningful and set to a value between 10 and 90, inclusive. In this case, propagation to a new master alternates between replication groups that are not being extended and replication groups that are being extended, with one push to each during each cycle. This parameter indicates the length of the cycle in seconds.

Exceptions

Table 18-16 ALTER_CATCHUP_PARAMETERS Procedure Exceptions

Exception Description
typefailure
The parameter value specified for one of the parameters is not appropriate.
dbnotcompatible
Feature is incompatible with database version. All databases must be at 9.0.1 or higher compatibility level.


ALTER_MASTER_PROPAGATION Procedure

This procedure alters the propagation method for a specified replication group at a specified master site. This replication group must be quiesced. You must call this procedure from the master definition site. If the master appears in the dblink_list or dblink_table, then ALTER_MASTER_PROPAGATION ignores that database link. You cannot change the propagation mode from a master to itself.

Syntax

DBMS_REPCAT.ALTER_MASTER_PROPAGATION (
   gname               IN   VARCHAR2, 
   master              IN   VARCHAR2,
   { dblink_list       IN   VARCHAR2, 
   | dblink_table      IN   DBMS_UTILITY.DBLINK_ARRAY,}
   propagation_mode    IN   VARCHAR2 : ='ASYNCHRONOUS',
   comment             IN   VARCHAR2 := '');

Note:

This procedure is overloaded. The dblink_list and dblink_table parameters are mutually exclusive.

Parameters

Table 18-17 ALTER_MASTER_PROPAGATION Procedure Parameters

Parameter Description
gname
Name of the replication group to which to alter the propagation mode.
master
Name of the master site at which to alter the propagation mode.
dblink_list
A comma-delimited list of database links for which to alter the propagation method. If NULL, then all masters except the master site being altered are used by default.
dblink_table
A PL/SQL index-by table, indexed from position 1, of database links for which to alter propagation.
propagation_mode
Determines the manner in which changes from the specified master site are propagated to the sites identified by the list of database links. Appropriate values are synchronous and asynchronous.
comment
This comment is added to the DBA_REPPROP view.

Exceptions

Table 18-18 ALTER_MASTER_PROPAGATION Procedure Exceptions

Exception Description
nonmasterdef
Invocation site is not the master definition site.
notquiesced
Invocation site is not quiesced.
typefailure
Propagation mode specified was not recognized.
nonmaster
List of database links includes a site that is not a master site.


ALTER_MASTER_REPOBJECT Procedure

This procedure alters an object in your replication environment. You must call this procedure from the master definition site.

This procedure requires that you quiesce the master group of the object if either of the following conditions is true:

You can use this procedure to alter non table objects without quiescing the master group.

Syntax

DBMS_REPCAT.ALTER_MASTER_REPOBJECT (
   sname               IN   VARCHAR2, 
   oname               IN   VARCHAR2, 
   type                IN   VARCHAR2, 
   ddl_text            IN   VARCHAR2, 
   comment             IN   VARCHAR2     := '', 
   retry               IN   BOOLEAN      := false
   safe_table_change   IN   BOOLEAN      := false);

Parameters

Table 18-19 ALTER_MASTER_REPOBJECT Procedure Parameters

Parameter Description
sname
Schema containing the object that you want to alter.
oname
Name of the object that you want to alter. The object cannot be a storage table for a nested table.
type
Type of the object that you are altering. The following types are supported:
FUNCTION               SYNONYM
INDEX                  TABLE
INDEXTYPE              TRIGGER
OPERATOR               TYPE
PACKAGE                TYPE BODY
PACKAGE BODY           VIEW
PROCEDURE
ddl_text
The DDL text that you want used to alter the object. Oracle does not parse this DDL before applying it. Therefore, you must ensure that your DDL text provides the appropriate schema and object name for the object being altered.

If the DDL is supplied without specifying a schema, then the default schema is the replication administrator's schema. Be sure to specify the schema if it is other than the replication administrator's schema.

comment
If not NULL, then this comment is added to the COMMENT field of the DBA_REPOBJECT view.
retry
If retry is true, then ALTER_MASTER_REPOBJECT alters the object only at masters whose object status is not VALID.
safe_table_change
Specify true if the change to a table is safe. Specify false if the change to a table is unsafe.

You can make safe changes to a master table in a single master replication environment without quiescing the master group that contains the table. To make unsafe changes, you must quiesce the master group.

Only specify this parameter for tables in single master replication environments. This parameter is ignored in multimaster replication environments and when the object specified is not a table. In multimaster replication environments, you must quiesce the master group to run the ALTER_MASTER_REPOBJECT procedure on a table.

The following are safe changes:

  • Changing storage and extent information

  • Making existing columns larger. For example, changing a VARCHAR2(20) column to a VARCHAR2(50) column.

  • Adding non primary key constraints

  • Altering non primary key constraints

  • Enabling and disabling non primary key constraints

The following are unsafe changes:

  • Changing the primary key by adding or deleting columns in the key

  • Adding or deleting columns

  • Making existing columns smaller. For example, changing a VARCHAR2(50) column to a VARCHAR2(20) column.

  • Disabling a primary key constraint

  • Changing the datatype of an existing column

  • Dropping an existing column

If you are unsure whether a change is safe or unsafe, then quiesce the master group before you run the ALTER_MASTER_REPOBJECT procedure.


Exceptions

Table 18-20 ALTER_MASTER_REPOBJECT Procedure Exceptions

Exception Description
nonmasterdef
Invocation site is not the master definition site.
notquiesced
Associated replication group has not been suspended.
missingobject
Object identified by sname and oname does not exist.
typefailure
Specified type parameter is not supported.
ddlfailure
DDL at the master definition site did not succeed.
commfailure
At least one master site is not accessible.


ALTER_MVIEW_PROPAGATION Procedure

This procedure alters the propagation method for a specified replication group at the current materialized view site. This procedure pushes the deferred transaction queue at the materialized view site, locks the materialized views, and regenerates any triggers and their associated packages. You must call this procedure from the materialized view site.

Syntax

DBMS_REPCAT.ALTER_MVIEW_PROPAGATION (
   gname                IN  VARCHAR2, 
   propagation_mode     IN  VARCHAR2,
   comment              IN  VARCHAR2   := '',
   gowner               IN  VARCHAR2   := 'PUBLIC');

Parameters

Table 18-21 ALTER_MVIEW_PROPAGATION Procedure Parameters

Parameter Description
gname
Name of the replication group for which to alter the propagation method.
propagation_mode
Manner in which changes from the current materialized view site are propagated to its associated master site or master materialized view site. Appropriate values are synchronous and asynchronous.
comment
This comment is added to the DBA_REPPROP view.
gowner
Owner of the materialized view group.

Exceptions

Table 18-22 ALTER_MVIEW_PROPAGATION Procedure Exceptions

Exception Description
missingrepgroup
Specified replication group does not exist.
typefailure
Propagation mode was specified incorrectly.
nonmview
Current site is not a materialized view site for the specified replication group.
commfailure
Cannot contact master site or master materialized view site.
failaltermviewrop
Materialized view group propagation can be altered only when there are no other materialized view groups with the same master site or master materialized view site sharing the materialized view site.


ALTER_PRIORITY Procedure

This procedure alters the priority level associated with a specified priority group member. You must call this procedure from the master definition site.


See Also:

Chapter 6, "Configure Conflict Resolution" and Oracle Database Advanced Replication for more information about conflict resolution methods

Syntax

DBMS_REPCAT.ALTER_PRIORITY (
   gname            IN   VARCHAR2, 
   pgroup           IN   VARCHAR2, 
   old_priority     IN   NUMBER, 
   new_priority     IN   NUMBER);

Parameters

Table 18-23 ALTER_PRIORITY Procedure Parameters

Parameter Description
gname
Master group with which the priority group is associated.
pgroup
Name of the priority group containing the priority that you want to alter.
old_priority
Current priority level of the priority group member.
new_priority
New priority level that you want assigned to the priority group member.

Exceptions

Table 18-24 ALTER_PRIORITY Procedure Exceptions

Exception Description
nonmasterdef
Invocation site is not the master definition site.
duplicatepriority
New priority level already exists in the priority group.
missingrepgroup
Specified master group does not exist.
missingvalue
Value was not registered by a call to DBMS_REPCAT.ADD_PRIORITY_datatype.
missingprioritygroup
Specified priority group does not exist.
notquiesced
Specified master group is not quiesced.


ALTER_PRIORITY_datatype Procedure

This procedure alters the value of a member in a priority group. You must call this procedure from the master definition site. The procedure that you must call is determined by the datatype of your priority column.


See Also:

Chapter 6, "Configure Conflict Resolution" and Oracle Database Advanced Replication for more information about conflict resolution methods

Syntax

DBMS_REPCAT.ALTER_PRIORITY_datatype (
   gname        IN   VARCHAR2, 
   pgroup       IN   VARCHAR2, 
   old_value    IN   datatype, 
   new_value    IN   datatype);

where datatype:

{ NUMBER
| VARCHAR2
| CHAR
| DATE
| RAW
| NCHAR
| NVARCHAR2 }

Parameters

Table 18-25 ALTER_PRIORITY_datatype Procedure Parameters

Parameter Description
gname
Master group with which the priority group is associated.
pgroup
Name of the priority group containing the value that you want to alter.
old_value
Current value of the priority group member.
new_value
New value that you want assigned to the priority group member.

Exceptions

Table 18-26 ALTER_PRIORITY_datatype Procedure Exceptions

Exception Description
nonmasterdef
Invocation site is not the master definition site.
duplicatevalue
New value already exists in the priority group.
missingrepgroup
Specified master group does not exist.
missingprioritygroup
Specified priority group does not exist.
missingvalue
Old value does not exist.
paramtype
New value has the incorrect datatype for the priority group.
typefailure
Specified value has the incorrect datatype for the priority group.
notquiesced
Specified master group is not quiesced.


ALTER_SITE_PRIORITY Procedure

This procedure alters the priority level associated with a specified site. You must call this procedure from the master definition site.


See Also:

Chapter 6, "Configure Conflict Resolution" and Oracle Database Advanced Replication for more information about conflict resolution methods

Syntax

DBMS_REPCAT.ALTER_SITE_PRIORITY (
   gname         IN   VARCHAR2,
   name          IN   VARCHAR2,
   old_priority  IN   NUMBER,
   new_priority  IN   NUMBER);

Parameters

Table 18-27 ALTER_SITE_PRIORITY Procedure Parameters

Parameter Description
gname
Master group with which the site priority group is associated.
name
Name of the site priority group whose member you are altering.
old_priority
Current priority level of the site whose priority level you want to change.
new_priority
New priority level for the site. A higher number indicates a higher priority level.

Exceptions

Table 18-28 ALTER_SITE_PRIORITY Procedure Exceptions

Exception Description
nonmasterdef
Invocation site is not the master definition site.
missingrepgroup
Specified master group does not exist.
missingpriority
Old priority level is not associated with any group members.
duplicatepriority
New priority level already exists for another site in the group.
missingvalue
Old value does not already exist.
paramtype
New value has the incorrect datatype for the priority group.
notquiesced
Master group is not quiesced.


ALTER_SITE_PRIORITY_SITE Procedure

This procedure alters the site associated with a specified priority level. You must call this procedure from the master definition site.


See Also:

Chapter 6, "Configure Conflict Resolution" and Oracle Database Advanced Replication for more information about conflict resolution methods

Syntax

DBMS_REPCAT.ALTER_SITE_PRIORITY_SITE (
   gname     IN   VARCHAR2,
   name      IN   VARCHAR2,
   old_site  IN   VARCHAR2,
   new_site  IN   VARCHAR2);

Parameters

Table 18-29 ALTER_SITE_PRIORITY_SITE Procedure Parameters

Parameter Description
gname
Master group with which the site priority group is associated.
name
Name of the site priority group whose member you are altering.
old_site
Current global database name of the site to disassociate from the priority level.
new_site
New global database name that you want to associate with the current priority level.

Exceptions

Table 18-30 ALTER_SITE_PRIORITY_SITE Procedure Exceptions

Exception Description
nonmasterdef
Invocation site is not the master definition site.
missingrepgroup
Specified master group does not exist.
missingpriority
Specified site priority group does not exist.
missingvalue
Old site is not a group member.
notquiesced
Master group is not quiesced.


CANCEL_STATISTICS Procedure

This procedure stops the collection of statistics about the successful resolution of update, uniqueness, and delete conflicts for a table.

Syntax

DBMS_REPCAT.CANCEL_STATISTICS (
   sname    IN   VARCHAR2,
   oname    IN   VARCHAR2);

Parameters

Table 18-31 CANCEL_STATISTICS Procedure Parameters

Parameter Description
sname
Name of the schema in which the table is located.
oname
Name of the table for which you do not want to gather conflict resolution statistics.

Exceptions

Table 18-32 CANCEL_STATISTICS Procedure Exceptions

Exception Description
missingschema
Specified schema does not exist.
missingobject
Specified table does not exist.
statnotreg
Specified table is not currently registered to collect statistics.


COMMENT_ON_COLUMN_GROUP Procedure

This procedure updates the comment field in the DBA_REPCOLUMN_GROUP view for a column group. This comment is not added at all master sites until the next call to DBMS_REPCAT.GENERATE_REPLICATION_SUPPORT.

Syntax

DBMS_REPCAT.COMMENT_ON_COLUMN_GROUP (
   sname           IN   VARCHAR2, 
   oname           IN   VARCHAR2, 
   column_group    IN   VARCHAR2, 
   comment         IN   VARCHAR2);

Parameters

Table 18-33 COMMENT_ON_COLUMN_GROUP Procedure Parameters

Parameter Description
sname
Name of the schema in which the object is located.
oname
Name of the replicated table with which the column group is associated.
column_group
Name of the column group.
comment
Text of the updated comment that you want included in the GROUP_COMMENT field of the DBA_REPCOLUMN_GROUP view.

Exceptions

Table 18-34 COMMENT_ON_COLUMN_GROUP Procedure Exceptions

Exception Description
nonmasterdef
Invocation site is not the master definition site.
missinggroup
Specified column group does not exist.
missingobj
Object is missing.


COMMENT_ON_MVIEW_REPSITES Procedure

This procedure updates the SCHEMA_COMMENT field in the DBA_REPGROUP data dictionary view for the specified materialized view group. The group name must be registered locally as a replicated materialized view group. This procedure must be executed at the materialized view site.

Syntax

DBMS_REPCAT.COMMENT_ON_MVIEW_REPSITES (
   gowner    IN   VARCHAR2,
   gname     IN   VARCHAR2,
   comment   IN   VARCHAR2);

Parameters

Table 18-35 COMMENT_ON_MVIEW_REPSITES Procedure Parameters

Parameter Description
gowner
Owner of the materialized view group.
gname
Name of the materialized view group.
comment
Updated comment to include in the SCHEMA_COMMENT field of the DBA_REPGROUP view.

Exceptions

Table 18-36 COMMENT_ON_MVIEW_REPSITES Procedure Exceptions

Parameter Description
missingrepgroup
The materialized view group does not exist.
nonmview
The connected site is not a materialized view site.


COMMENT_ON_PRIORITY_GROUP Procedures

This procedure updates the comment field in the DBA_REPPRIORITY_GROUP view for a priority group. This comment is not added at all master sites until the next call to GENERATE_REPLICATION_SUPPORT.

Syntax

DBMS_REPCAT.COMMENT_ON_PRIORITY_GROUP (
   gname       IN   VARCHAR2, 
   pgroup      IN   VARCHAR2, 
   comment     IN   VARCHAR2);

Parameters

Table 18-37 COMMENT_ON_PRIORITY_GROUP Procedure Parameters

Parameter Description
gname
Name of the master group.
pgroup
Name of the priority group.
comment
Text of the updated comment that you want included in the PRIORITY_COMMENT field of the DBA_REPPRIORITY_GROUP view.

Exceptions

Table 18-38 COMMENT_ON_PRIORITY_GROUP Procedure Exceptions

Exception Description
nonmasterdef
Invocation site is not the master definition site.
missingrepgroup
Specified master group does not exist.
missingprioritygroup
Specified priority group does not exist.


COMMENT_ON_REPGROUP Procedure

This procedure updates the comment field in the DBA_REPGROUP view for a master group. This procedure must be issued at the master definition site.

Syntax

DBMS_REPCAT.COMMENT_ON_REPGROUP (
   gname     IN   VARCHAR2,
   comment   IN   VARCHAR2);

Parameters

Table 18-39 COMMENT_ON_REPGROUP Procedure Parameters

Parameter Description
gname
Name of the replication group that you want to comment on.
comment
Updated comment to include in the SCHEMA_COMMENT field of the DBA_REPGROUP view.

Exceptions

Table 18-40 COMMENT_ON_REPGROUP Procedure Exceptions

Exception Description
nonmasterdef
Invocation site is not the master definition site.
commfailure
At least one master site is not accessible.


COMMENT_ON_REPOBJECT Procedure

This procedure updates the comment field in the DBA_REPOBJECT view for a replicated object in a master group. This procedure must be issued at the master definition site.

Syntax

DBMS_REPCAT.COMMENT_ON_REPOBJECT (
   sname    IN   VARCHAR2, 
   oname    IN   VARCHAR2, 
   type     IN   VARCHAR2, 
   comment  IN   VARCHAR2);

Parameters

Table 18-41 COMMENT_ON_REPOBJECT Procedure Parameters

Parameter Description
sname
Name of the schema in which the object is located.
oname
Name of the object that you want to comment on. The object cannot be a storage table for a nested table.
type
Type of the object. The following types are supported:
FUNCTION              SYNONYM
INDEX                 TABLE
INDEXTYPE             TRIGGER
OPERATOR              TYPE
PACKAGE               TYPE BODY
PACKAGE BODY          VIEW
PROCEDURE
comment
Text of the updated comment that you want to include in the OBJECT_COMMENT field of the DBA_REPOBJECT view.

Exceptions

Table 18-42 COMMENT_ON_REPOBJECT Procedure Exceptions

Exception Description
nonmasterdef
Invocation site is not the master definition site.
missingobject
Specified object does not exist.
typefailure
Specified type parameter is not supported.
commfailure
At least one master site is not accessible.


COMMENT_ON_REPSITES Procedure

If the replication group is a master group, then this procedure updates the MASTER_COMMENT field in the DBA_REPSITES view for a master site. If the replication group is a materialized view group, this procedure updates the SCHEMA_COMMENT field in the DBA_REPGROUP view for a materialized view site.

This procedure can be executed at either a master site or a materialized view site. If you execute this procedure on a a materialized view site, then the materialized view group owner must be PUBLIC.


See Also:

"COMMENT_ON_conflicttype_RESOLUTION Procedure" for instructions on placing a comment in the SCHEMA_COMMENT field of the DBA_REPGROUP view for a materialized view site if the materialized view group owner is not PUBLIC

Syntax

DBMS_REPCAT.COMMENT_ON_REPSITES ( 
   gname       IN   VARCHAR2, 
   [ master    IN   VARCHAR,] 
   comment     IN   VARCHAR2);

Parameters

Table 18-43 COMMENT_ON_REPSITES Procedure Parameters

Parameter Description
gname
Name of the replication group. This avoids confusion if a database is a master site in more than one replication environment.
master
The fully qualified database name of the master site on which you want to comment. If you are executing the procedure on a master site, then this parameter is required. To update comments at a materialized view site, omit this parameter. This parameter is optional.
comment
Text of the updated comment that you want to include in the comment field of the appropriate dictionary view. If the site is a master site, then this procedure updates the MASTER_COMMENT field of the DBA_REPSITES view. If the site is a materialized view site, then this procedure updates the SCHEMA_COMMENT field of the DBA_REPGROUP view.

Exceptions

Table 18-44 COMMENT_ON_REPSITES Procedure Exceptions

Exception Description
nonmasterdef
Invocation site is not the master definition site.
nonmaster
Invocation site is not a master site.
commfailure
At least one master site is not accessible.
missingrepgroup
Replication group does not exist.
commfailure
One or more master sites are not accessible.
corrupt
There is an inconsistency in the replication catalog views.


COMMENT_ON_SITE_PRIORITY Procedure

This procedure updates the comment field in the DBA_REPPRIORITY_GROUP view for a site priority group. This procedure is a wrapper for the COMMENT_ON_COLUMN_GROUP procedure and is provided as a convenience only. This procedure must be issued at the master definition site.

Syntax

DBMS_REPCAT.COMMENT_ON_SITE_PRIORITY (
   gname       IN   VARCHAR2, 
   name        IN   VARCHAR2, 
   comment     IN   VARCHAR2);

Parameters

Table 18-45 COMMENT_ON_SITE_PRIORITY Procedure Parameters

Parameter Description
gname
Name of the master group.
name
Name of the site priority group.
comment
Text of the updated comment that you want included in the PRIORITY_COMMENT field of the DBA_REPPRIORITY_GROUP view.

Exceptions

Table 18-46 COMMENT_ON_SITE_PRIORITY Procedure Exceptions

Exception Description
nonmasterdef
Invocation site is not the master definition site.
missingrepgroup
Specified master group does not exist.
missingprioritygroup
Specified priority group does not exist.


COMMENT_ON_conflicttype_RESOLUTION Procedure

This procedure updates the RESOLUTION_COMMENT field in the DBA_REPRESOLUTION view for a conflict resolution routine. The procedure that you need to call is determined by the type of conflict that the routine resolves. These procedures must be issued at the master definition site.

Table 18-47 COMMENT_ON_conflicttype_RESOLUTION Procedures

Conflict Type Procedure Name
update COMMENT_ON_UPDATE_RESOLUTION
uniqueness COMMENT_ON_UNIQUE_RESOLUTION
delete COMMENT_ON_DELETE_RESOLUTION

The comment is not added at all master sites until the next call to GENERATE_REPLICATION_SUPPORT.

Syntax

DBMS_REPCAT.COMMENT_ON_UPDATE_RESOLUTION (
   sname                 IN   VARCHAR2,
   oname                 IN   VARCHAR2,
   column_group          IN   VARCHAR2,
   sequence_no           IN   NUMBER, 
   comment               IN   VARCHAR2);

DBMS_REPCAT.COMMENT_ON_UNIQUE_RESOLUTION (
   sname                 IN   VARCHAR2,
   oname                 IN   VARCHAR2,
   constraint_name       IN   VARCHAR2,
   sequence_no           IN   NUMBER, 
   comment               IN   VARCHAR2);

DBMS_REPCAT.COMMENT_ON_DELETE_RESOLUTION (
   sname                 IN   VARCHAR2,
   oname                 IN   VARCHAR2,
   sequence_no           IN   NUMBER, 
   comment               IN   VARCHAR2);

Parameters

Table 18-48 COMMENT_ON_conflicttype_RESOLUTION Procedure Parameters

Parameter Description
sname
Name of the schema.
oname
Name of the replicated table with which the conflict resolution routine is associated.
column_group
Name of the column group with which the update conflict resolution routine is associated.
constraint_name
Name of the unique constraint with which the uniqueness conflict resolution routine is associated.
sequence_no
Sequence number of the conflict resolution procedure.
comment
The text of the updated comment that you want included in the RESOLUTION_COMMENT field of the DBA_REPRESOLUTION view.

Exceptions

Table 18-49 COMMENT_ON_conflicttype_RESOLUTION Procedure Exceptions

Exception Description
nonmasterdef
Invocation site is not the master definition site.
missingobject
Specified object does not exist.
missingresolution
Specified conflict resolution routine is not registered.


COMPARE_OLD_VALUES Procedure

This procedure specifies whether to compare old column values during propagation of deferred transactions at each master site for each nonkey column of a replicated table for updates and deletes. The default is to compare old values for all columns. You can change this behavior at all master sites and materialized view sites by invoking DBMS_REPCAT.COMPARE_OLD_VALUES at the master definition site.

When you use user-defined types, you can specify leaf attributes of a column object, or you can specify an entire column object. For example, if a column object named cust_address has street_address as an attribute, then you can specify cust_address.street_address for the column_list parameter or as part of the column_table parameter, or you can specify only cust_address.

When performing equality comparisons for conflict detection, Oracle treats objects as equal only if one of the following conditions is true:

Given these conditions, if one object is atomically NULL while the other is not, then Oracle does not consider the objects to be equal. Oracle does not consider MAP and ORDER methods when performing equality comparisons.

Syntax

DBMS_REPCAT.COMPARE_OLD_VALUES(
   sname           IN  VARCHAR2,
   oname           IN  VARCHAR2,
   { column_list   IN  VARCHAR2,
   | column_table  IN  DBMS_UTILITY.VARCHAR2s | DBMS_UTILITY.LNAME_ARRAY,}
   operation       IN  VARCHAR2 := 'UPDATE',
   compare         IN  BOOLEAN  := true );

Note:

This procedure is overloaded. The column_list and column_table parameters are mutually exclusive.

Parameters

Table 18-50 COMPARE_OLD_VALUES Procedure Parameters

Parameter Description
sname
Schema in which the table is located.
oname
Name of the replicated table. The table can be the storage table of a nested table.
column_list
A comma-delimited list of the columns in the table. There must be no spaces between entries.
column_table
Instead of a list, you can use a PL/SQL index-by table of type DBMS_REPCAT.VARCHAR2 or DBMS_UTILITY.LNAME_ARRAY to contain the column names. The first column name should be at position 1, the second at position 2, and so on.

Use DBMS_UTILITY.LNAME_ARRAY if any column name is greater than or equal to 30 bytes, which might occur when you specify the attributes of column objects.

operation
Possible values are: update, delete, or the asterisk wildcard '*', which means update and delete.
compare
If compare is true, the old values of the specified columns are compared when sent. If compare is false, the old values of the specified columns are not compared when sent. Unspecified columns and unspecified operations are not affected. The specified change takes effect at the master definition site as soon as min_communication is true for the table. The change takes effect at a master site or at a materialized view site the next time replication support is generated at that site with min_communication true.


Note:

The operation parameter enables you to decide whether or not to compare old values for nonkey columns when rows are deleted or updated. If you do not compare the old value, then Oracle assumes the old value is equal to the current value of the column at the target side when the update or delete is applied.

See Oracle Database Advanced Replication for more information about reduced data propagation using the COMPARE_OLD_VALUES procedure before changing the default behavior of Oracle.


Exceptions

Table 18-51 COMPARE_OLD_VALUES Procedure Exceptions

Exception Description
nonmasterdef
Invocation site is not the master definition site.
missingobject
Specified object does not exist as a table in the specified schema waiting for row-level replication information.
missingcolumn
At least one column is not in the table.
notquiesced
Master group has not been quiesced.
typefailure
An illegal operation is specified.
keysendcomp
A specified column is a key column in a table.
dbnotcompatible
Feature is incompatible with database version. Typically, this exception arises when you are trying to compare the attributes of column objects. In this case, all databases must be at 9.0.1 or higher compatibility level.


CREATE_MASTER_REPGROUP Procedure

This procedure creates a new, empty, quiesced master group.

Syntax

DBMS_REPCAT.CREATE_MASTER_REPGROUP (
   gname            IN   VARCHAR2, 
   group_comment    IN   VARCHAR2     := '', 
   master_comment   IN   VARCHAR2     := '',
   qualifier        IN   VARCHAR2     := '');

Parameters

Table 18-52 CREATE_MASTER_REPGROUP Procedure Parameters

Parameter Description
gname
Name of the master group that you want to create.
group_comment
This comment is added to the DBA_REPGROUP view.
master_comment
This comment is added to the DBA_REPSITES view.
qualifier
Connection qualifier for master group. Be sure to use the @ sign. See Oracle Database Advanced Replication and Oracle Database Administrator's Guide for more information about connection qualifiers.

Exceptions

Table 18-53 CREATE_MASTER_REPGROUP Procedure Exceptions

Exception Description
duplicaterepgroup
Master group already exists.
norepopt
Advanced replication option is not installed.
missingrepgroup
Master group name was not specified.
qualifiertoolong
Connection qualifier is too long.


CREATE_MASTER_REPOBJECT Procedure

This procedure makes an object a replicated object by adding the object to a master group. This procedure preserves the object identifier for user-defined types and object tables at all replication sites.

Replication of clustered tables is supported, but the use_existing_object parameter cannot be set to false for clustered tables. In other words, you must create the clustered table at all master sites participating in the master group before you execute the CREATE_MASTER_REPOBJECT procedure. However, these tables do not need to contain the table data. So, the copy_rows parameter can be set to true for clustered tables.

Syntax

DBMS_REPCAT.CREATE_MASTER_REPOBJECT (
   sname                IN   VARCHAR2,
   oname                IN   VARCHAR2, 
   type                 IN   VARCHAR2,
   use_existing_object  IN   BOOLEAN     := true, 
   ddl_text             IN   VARCHAR2    := NULL, 
   comment              IN   VARCHAR2    := '', 
   retry                IN   BOOLEAN     := false,
   copy_rows            IN   BOOLEAN     := true,
   gname                IN   VARCHAR2    := '');

Parameters

Table 18-54 CREATE_MASTER_REPOBJECT Procedure Parameters

Parameters Description
sname
Name of the schema in which the object that you want to replicate is located.
oname
Name of the object you are replicating. If ddl_text is NULL, then this object must already exist in the specified schema. To ensure uniqueness, table names should be a maximum of 27 bytes long, and package names should be no more than 24 bytes. The object cannot be a storage table for a nested table.
type
Type of the object that you are replicating. The following types are supported:
FUNCTION                SYNONYM
INDEX                   TABLE
INDEXTYPE               TRIGGER
OPERATOR                TYPE
PACKAGE                 TYPE BODY
PACKAGE BODY            VIEW
PROCEDURE
use_existing_object
Indicate true if you want to reuse any objects of the same type and shape at the current master sites. See Table 18-56 for more information.

Note: This parameter must be set to true for clustered tables.

ddl_text
If the object does not already exist at the master definition site, then you must supply the DDL text necessary to create this object. PL/SQL packages, package bodies, procedures, and functions must have a trailing semicolon. SQL statements do not end with trailing semicolon. Oracle does not parse this DDL before applying it; therefore, you must ensure that your DDL text provides the appropriate schema and object name for the object being created.

If the DDL is supplied without specifying a schema (sname parameter), then the default schema is the replication administrator's schema. Be sure to specify the schema if it is other than the replication administrator's schema.

Note: Do not use the ddl_text parameter to add user-defined types or object tables. Instead, create the object first and then add the object.

comment
This comment is added to the OBJECT_COMMENT field of the DBA_REPOBJECT view.
retry
Indicate true if you want Oracle to reattempt to create an object that it was previously unable to create. Use this if the error was transient or has since been rectified, or if you previously had insufficient resources. If this is true, then Oracle creates the object only at master sites whose object status is not VALID.
copy_rows
Indicate true if you want the initial contents of a newly replicated object to match the contents of the object at the master definition site. See Table 18-56 for more information.
gname
Name of the replication group in which you want to create the replicated object. The schema name is used as the default replication group name if none is specified, and a replication group with the same name as the schema must exist for the procedure to complete successfully in that case.

Exceptions

Table 18-55 CREATE_MASTER_REPOBJECT Procedure Exceptions

Exceptions Description
nonmasterdef
Invocation site is not the master definition site.
notquiesced
Master group is not quiesced.
duplicateobject
Specified object already exists in the master group and retry is false, or if a name conflict occurs.
missingobject
Object identified by sname and oname does not exist and appropriate DDL has not been provided.
typefailure
Objects of the specified type cannot be replicated.
ddlfailure
DDL at the master definition site did not succeed.
commfailure
At least one master site is not accessible.

Object Creations

Table 18-56 Object Creation at Master Sites

Object AlreadyExists? COPY_ROWS USE_EXISTING_OBJECTS Result
yes
true
true
duplicatedobject message if objects do not match. For tables, use data from master definition site.
yes
false
true
duplicatedobject message if objects do not match. For tables, DBA must ensure contents are identical.
yes
true/false
false
duplicatedobject message.
no
true
true/false
Object is created. Tables populated using data from master definition site.
no
false
true/false
Object is created. DBA must populate tables and ensure consistency of tables at all sites.


CREATE_MVIEW_REPGROUP Procedure

This procedure creates a new, empty materialized view group in your local database. CREATE_MVIEW_REPGROUP automatically calls REGISTER_MIEW_REPGROUP, but ignores any errors that might have happened during registration.

Syntax

DBMS_REPCAT.CREATE_MVIEW_REPGROUP (
   gname              IN   VARCHAR2, 
   master             IN   VARCHAR2, 
   comment            IN   VARCHAR2     := '',
   propagation_mode   IN   VARCHAR2     := 'ASYNCHRONOUS',
   fname              IN   VARCHAR2     := NULL
   gowner             IN   VARCHAR2     := 'PUBLIC');

Parameters

Table 18-57 CREATE_MVIEW_REPGROUP Procedure Parameters

Parameter Description
gname
Name of the replication group. This group must exist at the specified master site or master materialized view site.
master
Fully qualified database name of the database in the replication environment to use as the master site or master materialized view site. You can include a connection qualifier if necessary. See Oracle Database Advanced Replication and Oracle Database Administrator's Guide for information about using connection qualifiers.
comment
This comment is added to the DBA_REPGROUP view.
propagation_mode
Method of propagation for all updatable materialized views in the replication group. Acceptable values are synchronous and asynchronous.
fname
This parameter is for internal use only.

Note: Do not set this parameter unless directed to do so by Oracle Support Services.

gowner
Owner of the materialized view group.

Exceptions

Table 18-58 CREATE_MVIEW_REPGROUP Procedure Exceptions

Exception Description
duplicaterepgroup
Replication group already exists at the invocation site.
nonmaster
Specified database is not a master site or master materialized view site.
commfailure
Specified database is not accessible.
norepopt
Advanced replication option is not installed.
typefailure
Propagation mode was specified incorrectly.
missingrepgroup
Replication group does not exist at master site.
invalidqualifier
Connection qualifier specified for the master site or master materialized view site is not valid for the replication group.
alreadymastered
At the local site, there is another materialized view group with the same group name, but different master site or master materialized view site.


CREATE_MVIEW_REPOBJECT Procedure

This procedure adds a replicated object to a materialized view group.

Syntax

DBMS_REPCAT.CREATE_MVIEW_REPOBJECT (
   sname                   IN   VARCHAR2,
   oname                   IN   VARCHAR2, 
   type                    IN   VARCHAR2, 
   ddl_text                IN   VARCHAR2  := '',
   comment                 IN   VARCHAR2  := '',
   gname                   IN   VARCHAR2  := '',
   gen_objs_owner          IN   VARCHAR2  := '',
   min_communication       IN   BOOLEAN   := true,
   generate_80_compatible  IN   BOOLEAN   := true,
   gowner                  IN   VARCHAR2  := 'PUBLIC');

Parameters

Table 18-59 CREATE_MVIEW_REPOBJECT Procedure Parameters

Parameter Description
sname
Name of the schema in which the object is located. The schema must be same as the schema that owns the master table or master materialized view on which this materialized view is based.
oname
Name of the object that you want to add to the replicated materialized view group.
type
Type of the object that you are replicating. The following types are supported:
FUNCTION               SNAPSHOT
INDEX                  SYNONYM
INDEXTYPE              TRIGGER
OPERATOR               TYPE
PACKAGE                TYPE BODY
PACKAGE BODY           VIEW
PROCEDURE

Use SNAPSHOT type of the object is a materialized view.

ddl_text
For objects of type MATERIALIZED VIEW, the DDL needed to create the object. For other types, use the default:
'' (an empty string)

If a materialized view with the same name already exists, then Oracle ignores the DDL and registers the existing materialized view as a replicated object. If the master table or master materialized view for a materialized view does not exist in the replication group of the master designated for this schema, then Oracle raises a missingobject error.

If the DDL is supplied without specifying a schema, then the default schema is the replication administrator's schema. Be sure to specify the schema if it is other than the replication administrator's schema.

If the object is not of type MATERIALIZED VIEW, then the materialized view site connects to the master site or master materialized view site and pulls down the DDL text to create the object. If the object type is TYPE or TYPE BODY, then the object identifier (OID) for the object at the materialized view site is the same as the OID at the master site or master materialized view site.

comment
This comment is added to the OBJECT_COMMENT field of the DBA_REPOBJECT view.
gname
Name of the replicated materialized view group to which you are adding an object. The schema name is used as the default group name if none is specified, and a materialized view group with the same name as the schema must exist for the procedure to complete successfully.
gen_objs_owner
Name of the user you want to assign as owner of the transaction.
min_communication
This parameter is obsolete. Use the default value (true).
generate_80_compatible
Set to true if the materialized view's master site is running a version of Oracle server prior to Oracle8i Database release 8.1.5. Set to false if the materialized view's master site or master materialized view site is running Oracle8i Database release 8.1.5 or later.
gowner
Owner of the materialized view group.

Exceptions

Table 18-60 CREATE_MVIEW_REPOBJECT Procedure Exceptions

Exception Description
nonmview
Invocation site is not a materialized view site.
nonmaster
Master is no longer a master site or master materialized view site.
missingobject
Specified object does not exist in the master's replication group.
duplicateobject
Specified object already exists with a different shape.
typefailure
Type is not an allowable type.
ddlfailure
DDL did not succeed.
commfailure
Master site or master materialized view site is not accessible.
missingschema
Schema does not exist as a database schema.
badmviewddl
DDL was executed but materialized view does not exist.
onlyonemview
Only one materialized view for master table or master materialized view can be created.
badmviewname
Materialized view differs from master table or master materialized view.
missingrepgroup
Replication group at the master does not exist.


DEFINE_COLUMN_GROUP Procedure

This procedure creates an empty column group. You must call this procedure from the master definition site.


See Also:

Chapter 6, "Configure Conflict Resolution" and Oracle Database Advanced Replication for more information about conflict resolution methods

Syntax

DBMS_REPCAT.DEFINE_COLUMN_GROUP ( 
   sname            IN   VARCHAR2,
   oname            IN   VARCHAR2,
   column_group     IN   VARCHAR2,
   comment          IN   VARCHAR2 := NULL);

Parameters

Table 18-61 DEFINE_COLUMN_GROUP Procedure Parameters

Parameter Description
sname
Schema in which the replicated table is located.
oname
Name of the replicated table for which you are creating a column group.
column_group
Name of the column group that you want to create.
comment
This user text is displayed in the DBA_REPCOLUMN_GROUP view.

Exceptions

Table 18-62 DEFINE_COLUMN_GROUP Procedure Exceptions

Exception Description
nonmasterdef
Invocation site is not the master definition site.
missingobject
Specified table does not exist.
duplicategroup
Specified column group already exists for the table.
notquiesced
Replication group to which the specified table belongs is not quiesced.


DEFINE_PRIORITY_GROUP Procedure

This procedure creates a new priority group for a master group. You must call this procedure from the master definition site.


See Also:

Chapter 6, "Configure Conflict Resolution" and Oracle Database Advanced Replication for more information about conflict resolution methods

Syntax

DBMS_REPCAT.DEFINE_PRIORITY_GROUP (
   gname         IN   VARCHAR2, 
   pgroup        IN   VARCHAR2, 
   datatype      IN   VARCHAR2, 
   fixed_length  IN   INTEGER := NULL,
   comment       IN   VARCHAR2 := NULL);

Parameters

Table 18-63 DEFINE_PRIORITY_GROUP Procedure Parameters

Parameter Description
gname
Master group for which you are creating a priority group.
pgroup
Name of the priority group that you are creating.
datatype
Datatype of the priority group members. The datatypes supported are: CHAR, VARCHAR2, NUMBER, DATE, RAW, NCHAR, and NVARCHAR2.
fixed_length
You must provide a column length for the CHAR datatype. All other types can use the default, NULL.
comment
This user comment is added to the DBA_REPPRIORITY view.

Exceptions

Table 18-64 DEFINE_PRIORITY_GROUP Procedure Exceptions

Exception Description
nonmasterdef
Invocation site is not the master definition site.
missingrepgroup
Specified master group does not exist.
duplicatepriority group
Specified priority group already exists in the master group.
typefailure
Specified datatype is not supported.
notquiesced
Master group is not quiesced.


DEFINE_SITE_PRIORITY Procedure

This procedure creates a new site priority group for a master group. You must call this procedure from the master definition site.


See Also:

Chapter 6, "Configure Conflict Resolution" and Oracle Database Advanced Replication for more information about conflict resolution methods

Syntax

DBMS_REPCAT.DEFINE_SITE_PRIORITY (
   gname        IN   VARCHAR2, 
   name         IN   VARCHAR2,
   comment      IN   VARCHAR2 := NULL);

Parameters

Table 18-65 DEFINE_SITE_PRIORITY Procedure Parameters

Parameter Description
gname
The master group for which you are creating a site priority group.
name
Name of the site priority group that you are creating.
comment
This user comment is added to the DBA_REPPRIORITY view.

Exceptions

Table 18-66 DEFINE_SITE_PRIORITY Procedure Exceptions

Exception Description
nonmasterdef
Invocation site is not the master definition site.
missingrepgroup
Specified master group does not exist.
duplicate prioritygroup
Specified site priority group already exists in the master group.
notquiesced
Master group is not quiesced.


DO_DEFERRED_REPCAT_ADMIN Procedure

This procedure executes the local outstanding deferred administrative procedures for the specified master group at the current master site, or (with assistance from job queues) for all master sites.

DO_DEFERRED_REPCAT_ADMIN executes only those administrative requests submitted by the connected user who called DO_DEFERRED_REPCAT_ADMIN. Requests submitted by other users are ignored.

Syntax

DBMS_REPCAT.DO_DEFERRED_REPCAT_ADMIN (
   gname          IN   VARCHAR2,
   all_sites      IN   BOOLEAN := false);

Parameters

Table 18-67 DO_DEFERRED_REPCAT_ADMIN Procedure Parameters

Parameter Description
gname
Name of the master group.
all_sites
If this is true, then use a job to execute the local administrative procedures at each master site.

Exceptions

Table 18-68 DO_DEFERRED_REPCAT_ADMIN Procedure Exceptions

Exception Description
nonmaster
Invocation site is not a master site.
commfailure
At least one master site is not accessible and all_sites is true.


DROP_COLUMN_GROUP Procedure

This procedure drops a column group. You must call this procedure from the master definition site.


See Also:

Chapter 6, "Configure Conflict Resolution" and Oracle Database Advanced Replication for more information about conflict resolution methods

Syntax

DBMS_REPCAT.DROP_COLUMN_GROUP (
   sname        IN   VARCHAR2,
   oname        IN   VARCHAR2,
   column_group IN   VARCHAR2);

Parameters

Table 18-69 DROP_COLUMN_GROUP Procedure Parameters

Parameter Description
sname
Schema in which the replicated table is located.
oname
Name of the replicated table whose column group you are dropping.
column_group
Name of the column group that you want to drop.

Exceptions

Table 18-70 DROP_COLUMN_GROUP Procedure Exceptions

Exception Description
nonmasterdef
Invocation site is not the master definition site.
referenced
Specified column group is being used in conflict detection and resolution.
missingobject
Specified table does not exist.
missinggroup
Specified column group does not exist.
notquiesced
Master group to which the table belongs is not quiesced.


DROP_GROUPED_COLUMN Procedure

This procedure removes members from a column group. You must call this procedure from the master definition site.


See Also:

Chapter 6, "Configure Conflict Resolution" and Oracle Database Advanced Replication for more information about conflict resolution methods

Syntax

DBMS_REPCAT.DROP_GROUPED_COLUMN (
   sname                 IN   VARCHAR2,
   oname                 IN   VARCHAR2,
   column_group          IN   VARCHAR2,
   list_of_column_names  IN   VARCHAR2 | DBMS_REPCAT.VARCHAR2);

Parameters

Table 18-71 DROP_GROUPED_COLUMN Procedure Parameters

Parameter Description
sname
Schema in which the replicated table is located.
oname
Name of the replicated table in which the column group is located. The table can be the storage table of a nested table.
column_group
Name of the column group from which you are removing members.
list_of_column_names
Names of the columns that you are removing from the designated column group. This can either be a comma-delimited list or a PL/SQL index-by table of column names. The PL/SQL index-by table must be of type DBMS_REPCAT.VARCHAR2.

You can specify column objects, but you cannot specify attributes of column objects.

If the table is an object, then you can specify SYS_NC_OID$ to add the object identifier column to the column group. This column tracks the object identifier of each row object.

If the table is a storage table of a nested table, then you can specify NESTED_TABLE_ID to add the column that tracks the identifier for each row of the nested table.


Exceptions

Table 18-72 DROP_GROUPED_COLUMN Procedure Exceptions

Exception Description
nonmasterdef
Invocation site is not the master definition site.
missingobject
Specified table does not exist.
notquiesced
Master group that the table belongs to is not quiesced.


DROP_MASTER_REPGROUP Procedure

This procedure drops a master group from your current site. To drop the master group from all master sites, including the master definition site, you can call this procedure at the master definition site, and set all_sites to true.

Syntax

DBMS_REPCAT.DROP_MASTER_REPGROUP (
   gname             IN VARCHAR2,
   drop_contents     IN BOOLEAN    := false,
   all_sites         IN BOOLEAN    := false);

Parameters

Table 18-73 DROP_MASTER_REPGROUP Procedure Parameters

Parameter Description
gname
Name of the master group that you want to drop from the current master site.
drop_contents
By default, when you drop the replication group at a master site, all of the objects remain in the database. They simply are no longer replicated. That is, the replicated objects in the replication group no longer send changes to, or receive changes from, other master sites. If you set this to true, then any replicated objects in the master group are dropped from their associated schemas.
all_sites
If this is true and if the invocation site is the master definition site, then the procedure synchronously multicasts the request to all masters. In this case, execution is immediate at the master definition site and might be deferred at all other master sites.

Exceptions

Table 18-74 DROP_MASTER_REPGROUP Procedure Exceptions

Exception Description
nonmaster
Invocation site is not a master site.
nonmasterdef
Invocation site is not the master definition site and all_sites is true.
commfailure
At least one master site is not accessible and all_sites is true.
fullqueue
Deferred remote procedure call (RPC) queue has entries for the master group.
masternotremoved
Master does not recognize the master definition site and all_sites is true.


DROP_MASTER_REPOBJECT Procedure

This procedure drops a replicated object from a master group. You must call this procedure from the master definition site.

Syntax

DBMS_REPCAT.DROP_MASTER_REPOBJECT (
   sname          IN   VARCHAR2, 
   oname          IN   VARCHAR2, 
   type           IN   VARCHAR2, 
   drop_objects   IN   BOOLEAN     := false);

Parameters

Table 18-75 DROP_MASTER_REPOBJECT Procedure Parameters

Parameter Description
sname
Name of the schema in which the object is located.
oname
Name of the object that you want to remove from the master group. The object cannot be a storage table for a nested table.
type
Type of object that you want to drop. The following types are supported:
FUNCTION               SYNONYM
INDEX                  TABLE
INDEXTYPE              TRIGGER
OPERATOR               TYPE
PACKAGE                TYPE BODY
PACKAGE BODY           VIEW
PROCEDURE
drop_objects
By default, the object remains in the schema, but is dropped from the master group. That is, any changes to the object are no longer replicated to other master and materialized view sites. To completely remove the object from the replication environment, set this parameter to true. If the parameter is set to true, the object is dropped from the database at each master site.

Exceptions

Table 18-76 DROP_MASTER_REPOBJECT Procedure Exceptions

Exception Description
nonmasterdef
Invocation site is not the master definition site.
missingobject
Specified object does not exist.
typefailure
Specified type parameter is not supported.
commfailure
At least one master site is not accessible.


DROP_MVIEW_REPGROUP Procedure

This procedure drops a materialized view site from your replication environment. DROP_MVIEW_REPGROUP automatically calls UNREGISTER_MVIEW_REPGROUP at the master site or master materialized view site to unregister the materialized view, but ignores any errors that might have occurred during unregistration. If DROP_MVIEW_REPGROUP is unsuccessful, then connect to the master site or master materialized view site and run UNREGISTER_MVIEW_REPGROUP.

Syntax

DBMS_REPCAT.DROP_MVIEW_REPGROUP (
   gname                 IN   VARCHAR2, 
   drop_contents         IN   BOOLEAN   := false,
   gowner                IN   VARCHAR2  := 'PUBLIC');

Parameters

Table 18-77 DROP_MVIEW_REPGROUP Procedure Parameters

Parameter Description
gname
Name of the replication group that you want to drop from the current materialized view site. All objects generated to support replication, such as triggers and packages, are dropped.
drop_contents
By default, when you drop the replication group at a materialized view site, all of the objects remain in their associated schemas. They simply are no longer replicated. If you set this to true, then any replicated objects in the replication group are dropped from their schemas.
gowner
Owner of the materialized view group.

Exceptions

Table 18-78 DROP_MVIEW_REPGROUP Procedure Exceptions

Exception Description
nonmview
Invocation site is not a materialized view site.
missingrepgroup
Specified replication group does not exist.


DROP_MVIEW_REPOBJECT Procedure

This procedure drops a replicated object from a materialized view site.

Syntax

DBMS_REPCAT.DROP_MVIEW_REPOBJECT ( 
   sname          IN   VARCHAR2, 
   oname          IN   VARCHAR2, 
   type           IN   VARCHAR2, 
   drop_objects   IN   BOOLEAN  := false);

Parameters

Table 18-79 DROP_MVIEW_REPOBJECT Procedure Parameters

Parameter Description
sname
Name of the schema in which the object is located.
oname
Name of the object that you want to drop from the replication group.
type
Type of the object that you want to drop. The following types are supported:
FUNCTION                SNAPSHOT
INDEX                   SYNONYM
INDEXTYPE               TRIGGER
OPERATOR                TYPE
PACKAGE                 TYPE BODY
PACKAGE BODY            VIEW
PROCEDURE

Use SNAPSHOT to drop a materialized view.

drop_objects
By default, the object remains in its associated schema, but is dropped from its associated replication group. To completely remove the object from its schema at the current materialized view site, set this parameter to true. If the parameter is set to true, the object is dropped from the database at the materialized view site.

Exceptions

Table 18-80 DROP_MVIEW_REPOBJECT Procedure Exceptions

Exception Description
nonmview
Invocation site is not a materialized view site.
missingobject
Specified object does not exist.
typefailure
Specified type parameter is not supported.


DROP_PRIORITY Procedure

This procedure drops a member of a priority group by priority level. You must call this procedure from the master definition site.


See Also:

Chapter 6, "Configure Conflict Resolution" and Oracle Database Advanced Replication for more information about conflict resolution methods

Syntax

DBMS_REPCAT.DROP_PRIORITY(
      gname          IN   VARCHAR2,
      pgroup         IN   VARCHAR2, 
      priority_num   IN   NUMBER);

Parameters

Table 18-81 DROP_PRIORITY Procedure Parameters

Parameter Description
gname
Master group with which the priority group is associated.
pgroup
Name of the priority group containing the member that you want to drop.
priority_num
Priority level of the priority group member that you want to remove from the group.

Exceptions

Table 18-82 DROP_PRIORITY Procedure Exceptions

Exception Description
nonmasterdef
Invocation site is not the master definition site.
missingrepgroup
Specified master group does not exist.
missingprioritygroup
Specified priority group does not exist.
notquiesced
Master group is not quiesced.


DROP_PRIORITY_GROUP Procedure

This procedure drops a priority group for a specified master group. You must call this procedure from the master definition site.


See Also:

Chapter 6, "Configure Conflict Resolution" and Oracle Database Advanced Replication for more information about conflict resolution methods

Syntax

DBMS_REPCAT.DROP_PRIORITY_GROUP (
   gname     IN   VARCHAR2,
   pgroup    IN   VARCHAR2);

Parameters

Table 18-83 DROP_PRIORITY_GROUP Procedure Parameters

Parameter Description
gname
Master group with which the priority group is associated.
pgroup
Name of the priority group that you want to drop.

Exceptions

Table 18-84 DROP_PRIORITY_GROUP Procedure Exceptions

Exception Description
nonmasterdef
Invocation site is not the master definition site.
missingrepgroup
Specified master group does not exist.
referenced
Specified priority group is being used in conflict resolution.
notquiesced
Specified master group is not quiesced.


DROP_PRIORITY_datatype Procedure

This procedure drops a member of a priority group by value. You must call this procedure from the master definition site. The procedure that you must call is determined by the datatype of your priority column.


See Also:

Chapter 6, "Configure Conflict Resolution" and Oracle Database Advanced Replication for more information about conflict resolution methods

Syntax

DBMS_REPCAT.DROP_PRIORITY_datatype (
   gname    IN   VARCHAR2,
   pgroup   IN   VARCHAR2, 
   value    IN   datatype);

where datatype:

{ NUMBER
| VARCHAR2
| CHAR
| DATE
| RAW
| NCHAR
| NVARCHAR2 }

Parameters

Table 18-85 DROP_PRIORITY_datatype Procedure Parameters

Parameter Description
gname
Master group with which the priority group is associated.
pgroup
Name of the priority group containing the member that you want to drop.
value
Value of the priority group member that you want to remove from the group.

Exceptions

Table 18-86 DROP_PRIORITY_datatype Procedure Exceptions

Exception Description
nonmasterdef
Invocation site is not the master definition site.
missingrepgroup
Specified master group does not exist.
missingprioritygroup
Specified priority group does not exist.
paramtype, typefailure
Value has the incorrect datatype for the priority group.
notquiesced
Specified master group is not quiesced.


DROP_SITE_PRIORITY Procedure

This procedure drops a site priority group for a specified master group. You must call this procedure from the master definition site.


See Also:

Chapter 6, "Configure Conflict Resolution" and Oracle Database Advanced Replication for more information about conflict resolution methods

Syntax

DBMS_REPCAT.DROP_SITE_PRIORITY (
   gname      IN   VARCHAR2,
   name       IN   VARCHAR2);

Parameters

Table 18-87 DROP_SITE_PRIORITY Procedure Parameters

Parameter Description
gname
Master group with which the site priority group is associated.
name
Name of the site priority group that you want to drop.

Exceptions

Table 18-88 DROP_SITE_PRIORITY Procedure Exceptions

Exception Description
nonmasterdef
Invocation site is not the master definition site.
missingrepgroup
Specified master group does not exist.
referenced
Specified site priority group is being used in conflict resolution.
notquiesced
Specified master group is not quiesced.


DROP_SITE_PRIORITY_SITE Procedure

This procedure drops a specified site, by name, from a site priority group. You must call this procedure from the master definition site.


See Also:

Chapter 6, "Configure Conflict Resolution" and Oracle Database Advanced Replication for more information about conflict resolution methods

Syntax

DBMS_REPCAT.DROP_SITE_PRIORITY_SITE (
   gname      IN   VARCHAR2, 
   name       IN   VARCHAR2,
   site       IN   VARCHAR2);

Parameters

Table 18-89 DROP_SITE_PRIORITY_SITE Procedure Parameters

Parameter Description
gname
Master group with which the site priority group is associated.
name
Name of the site priority group whose member you are dropping.
site
Global database name of the site you are removing from the group.

Exceptions

Table 18-90 DROP_SITE_PRIORITY_SITE Procedure Exceptions

Exception Description
nonmasterdef
Invocation site is not the master definition site.
missingrepgroup
Specified master group does not exist.
missingpriority
Specified site priority group does not exist.
notquiesced
Specified master group is not quiesced.


DROP_conflicttype_RESOLUTION Procedure

This procedure drops an update, delete, or uniqueness conflict resolution routine. You must call these procedures from the master definition site. The procedure that you must call is determined by the type of conflict that the routine resolves.

Conflict Resolution Routines

The following table shows the procedure name for each conflict resolution routine.

Table 18-91 Conflict Resolution Routines

Routine Procedure Name
update DROP_UPDATE_RESOLUTION
uniqueness DROP_UNIQUE_RESOLUTION
delete DROP_DELETE_RESOLUTION

Syntax

DBMS_REPCAT.DROP_UPDATE_RESOLUTION (
   sname              IN   VARCHAR2, 
   oname              IN   VARCHAR2, 
   column_group       IN   VARCHAR2, 
   sequence_no        IN   NUMBER);

DBMS_REPCAT.DROP_DELETE_RESOLUTION (
   sname              IN   VARCHAR2, 
   oname              IN   VARCHAR2, 
   sequence_no        IN   NUMBER);

DBMS_REPCAT.DROP_UNIQUE_RESOLUTION (
   sname              IN   VARCHAR2, 
   oname              IN   VARCHAR2, 
   constraint_name    IN   VARCHAR2, 
   sequence_no        IN   NUMBER);

Parameters

Table 18-92 DROP_conflicttype_RESOLUTION Procedure Parameters

Parameter Description
sname
Schema in which the table is located.
oname
Name of the table for which you want to drop a conflict resolution routine.
column_group
Name of the column group for which you want to drop an update conflict resolution routine.
constraint_name
Name of the unique constraint for which you want to drop a unique conflict resolution routine.
sequence_no
Sequence number assigned to the conflict resolution method that you want to drop. This number uniquely identifies the routine.

Exceptions

Table 18-93 DROP_conflicttype_RESOLUTION Procedure Exceptions

Exception Description
nonmasterdef
Invocation site is not the master definition site.
missingobject
Specified object does not exist as a table in the specified schema, or a conflict resolution routine with the specified sequence number is not registered.
notquiesced
Master group is not quiesced.


EXECUTE_DDL Procedure

This procedure supplies DDL that you want to have executed at some or all master sites. You can call this procedure only from the master definition site.

Syntax

DBMS_REPCAT.EXECUTE_DDL (
   gname           IN   VARCHAR2,
   { master_list   IN   VARCHAR2     := NULL, 
   | master_table  IN   DBMS_UTILITY.DBLINK_ARRAY,}
   DDL_TEXT        IN   VARCHAR2);

Note:

This procedure is overloaded. The master_list and master_table parameters are mutually exclusive.

Parameters

Table 18-94 EXECUTE_DDL Procedure Parameters

Parameter Description
gname
Name of the master group.
master_list
A comma-delimited list of master sites at which you want to execute the supplied DDL. Do not put any spaces between site names. The default value, NULL, indicates that the DDL should be executed at all sites, including the master definition site.
master_table
A table that lists the master sites where you want to execute the supplied DDL. The first master should be at position 1, the second at position 2, and so on.
ddl_text
The DDL that you want to execute at each of the specified master sites. If the DDL is supplied without specifying a schema, then the default schema is the replication administrator's schema. Be sure to specify the schema if it is other than the replication administrator's schema.

Exceptions

Table 18-95 EXECUTE_DDL Procedure Exceptions

Exception Description
nonmasterdef
Invocation site is not the master definition site.
nonmaster
At least one site is not a master site.
ddlfailure
DDL at the master definition site did not succeed.
commfailure
At least one master site is not accessible.


GENERATE_MVIEW_SUPPORT Procedure

This procedure activates triggers and generate packages needed to support the replication of updatable materialized views or procedural replication.You must call this procedure from the materialized view site.


Note:

CREATE_MVIEW_REPOBJECT automatically generates materialized view support for updatable materialized views.

Syntax

DBMS_REPCAT.GENERATE_MVIEW_SUPPORT (
   sname                    IN VARCHAR2,
   oname                    IN VARCHAR2,
   type                     IN VARCHAR2,
   gen_objs_owner           IN VARCHAR2 := '',
   min_communication        IN BOOLEAN  := true,
   generate_80_compatible   IN BOOLEAN  := true);

Parameters

Table 18-96 GENERATE_MVIEW_SUPPORT Procedure Parameters

Parameter Description
sname
Schema in which the object is located.
oname
The name of the object for which you are generating support.
type
Type of the object. The types supported are MATERIALIZED VIEW, PACKAGE, and PACKAGE BODY.
gen_objs_owner
For objects of type PACKAGE or PACKAGE BODY, the schema in which the generated object should be created. If NULL, the objects are created in SNAME.
min_communication
If true, then the update trigger sends the new value of a column only if the update statement modifies the column. The update trigger sends the old value of the column only if it is a key column or a column in a modified column group.
generate_80_compatible
Set to true if the materialized view's master site is running a version of Oracle server prior to Oracle8i Database release 8.1.5. Set to false if the materialized view's master site or master materialized view site is running Oracle8i Database release 8.1.5 or later.

Exceptions

Table 18-97 GENERATE_MVIEW_SUPPORT Procedure Exceptions

Exceptions Descriptions
nonmview
Invocation site is not a materialized view site.
missingobject
Specified object does not exist as a materialized view in the replicated schema waiting for row/column-level replication information or as a package (body) waiting for wrapper generation.
typefailure
Specified type parameter is not supported.
missingschema
Specified owner of generated objects does not exist.
missingremoteobject
Object at master site or master materialized view site has not yet generated replication support.
commfailure
Master site or master materialized view site is not accessible.


GENERATE_REPLICATION_SUPPORT Procedure

This procedure generates the triggers and packages needed to support replication for a specified object. You must call this procedure from the master definition site.

Syntax

DBMS_REPCAT.GENERATE_REPLICATION_SUPPORT (
  sname                     IN    VARCHAR2, 
  oname                     IN    VARCHAR2, 
  type                      IN    VARCHAR2, 
  package_prefix            IN    VARCHAR2   := NULL, 
  procedure_prefix          IN    VARCHAR2   := NULL, 
  distributed               IN    BOOLEAN    := true,
  gen_objs_owner            IN    VARCHAR2   := NULL,
  min_communication         IN    BOOLEAN    := true,
  generate_80_compatible    IN    BOOLEAN    := true);

Parameters

Table 18-98 GENERATE_REPLICATION_SUPPORT Procedure Parameters

Parameter Description
sname
Schema in which the object is located.
oname
Name of the object for which you are generating replication support.
type
Type of the object. The types supported are: TABLE, PACKAGE, and PACKAGE BODY.
package_prefix
For objects of type PACKAGE or PACKAGE BODY this value is prepended to the generated wrapper package name. The default is DEFER_.
procedure_prefix
For objects of type PACKAGE or PACKAGE BODY, this value is prepended to the generated wrapper procedure names. By default, no prefix is assigned.
distributed
This must be set to true.
gen_objs_owner
For objects of type PACKAGE or PACKAGE BODY, the schema in which the generated object should be created. If NULL, the objects are created in sname.
min_communication
This parameter is obsolete. Use the default value (true).
generate_80_compatible
Set to true if any master site is running a version of Oracle server prior to Oracle8i Database release 8.1.5. Set to false if all master sites are running Oracle8i Database release 8.1.5 or later.

Exceptions

Table 18-99 GENERATE_REPLICATION_SUPPORT Procedure Exceptions

Exception Description
nonmasterdef
Invocation site is not the master definition site.
missingobject
Specified object does not exist as a table in the specified schema waiting for row-level replication information or as a package (body) waiting for wrapper generation.
typefailure
Specified type parameter is not supported.
notquiesced
Replication group has not been quiesced.
commfailure
At least one master site is not accessible.
missingschema
Schema does not exist.
duplicateobject
Object already exists.


MAKE_COLUMN_GROUP Procedure

This procedure creates a new column group with one or more members. You must call this procedure from the master definition site.


See Also:

Chapter 6, "Configure Conflict Resolution" and Oracle Database Advanced Replication for more information about conflict resolution methods

Syntax

DBMS_REPCAT.MAKE_COLUMN_GROUP ( 
   sname                 IN   VARCHAR2,
   oname                 IN   VARCHAR2,
   column_group          IN   VARCHAR2,
   list_of_column_names  IN   VARCHAR2 | DBMS_REPCAT.VARCHAR2s);

Parameters

Table 18-100 MAKE_COLUMN_GROUP Procedure Parameters

Parameter Description
sname
Schema in which the replicated table is located.
oname
Name of the replicated table for which you are creating a new column group. The table can be the storage table of a nested table.
column_group
Name that you want assigned to the column group that you are creating.
list_of_column_names
Names of the columns that you are grouping. This can either be a comma-delimited list or a PL/SQL index-by table of column names. The PL/SQL index-by table must be of type DBMS_REPCAT.VARCHAR2. Use the single value '*' to create a column group that contains all of the columns in your table.

You can specify column objects, but you cannot specify attributes of column objects.

If the table is an object table, then you can specify SYS_NC_OID$ to add the object identifier column to the column group. This column tracks the object identifier of each row object.

If the table is the storage table of a nested table, then you can specify NESTED_TABLE_ID to add the column that tracks the identifier for each row of the nested table.


Exceptions

Table 18-101 MAKE_COLUMN_GROUP Procedure Exceptions

Exception Description
nonmasterdef
Invocation site is not the master definition site.
duplicategroup
Specified column group already exists for the table.
missingobject
Specified table does not exist.
missingcolumn
Specified column does not exist in the designated table.
duplicatecolumn
Specified column is already a member of another column group.
notquiesced
Master group is not quiesced.


PREPARE_INSTANTIATED_MASTER Procedure

This procedure enables the propagation of deferred transactions from other prepared new master sites and existing master sites to the invocation master site. This procedure also enables the propagation of deferred transactions from the invocation master site to the other prepared new master sites and existing master sites.

If you performed a full database export/import or a change-based recovery, then the new master site includes all of the deferred transactions that were in the deferred transactions queue at the master definition site. Because these deferred transactions should not exist at the new master site, this procedure deletes all transactions in the deferred transactions queue and error queue if full database export/import or change-based recovery was used.

For object-level export/import, ensure that all the requests in the DBA_REPCATLOG data dictionary view for the extended groups have been processed without error before running this procedure.


Caution:

  • Do not invoke this procedure until instantiation (export/import or change-based recovery) for the new master site is complete.

  • Do not allow any data manipulation language (DML) statements directly on the objects in the extended master group in the new master site until execution of this procedure returns successfully. These DML statements might not be replicated.

  • Do not use the DBMS_DEFER package to create deferred transactions until execution of this procedure returns successfully. These deferred transactions might not be replicated.



Note:

  • To use change-based recovery, the existing master site and the new master site must be running under the same operating system, although the release of the operating system can differ.

  • You can use either Data Pump export/import or original export/import to perform exports and imports in an Advanced Replication environment. General references to export/import in this document refer to both Data Pump and original export/import.


Syntax

DBMS_REPCAT.PREPARE_INSTANTIATED_MASTER (
   extension_id             IN       RAW);

Parameters

Table 18-102 PREPARE_INSTANTIATED_MASTER Procedure Parameters

Parameter Description
extension_id
The identifier for the current pending request to add master databases to a master group without quiesce. You can find the extension_id by querying the DBA_REPSITES_NEW and DBA_REPEXTENSIONS data dictionary views.

Exceptions

Table 18-103 PREPARE_INSTANTIATED_MASTER Procedure Exceptions

Exception Description
typefailure
The parameter value specified for one of the parameters is not appropriate.
dbnotcompatible
Feature is incompatible with database version. All databases must be at 9.0.1 or higher compatibility level.


PURGE_MASTER_LOG Procedure

This procedure removes local messages in the DBA_REPCATLOG view associated with a specified identification number, source, or master group.

To purge all of the administrative requests from a particular source, specify NULL for the id parameter. To purge all administrative requests from all sources, specify NULL for both the id parameter and the source parameter.

Syntax

DBMS_REPCAT.PURGE_MASTER_LOG (
   id      IN   BINARY_INTEGER, 
   source  IN   VARCHAR2, 
   gname   IN   VARCHAR2);

Parameters

Table 18-104 PURGE_MASTER_LOG Procedure Parameters

Parameter Description
id
Identification number of the request, as it appears in the DBA_REPCATLOG view.
source
Master site from which the request originated.
gname
Name of the master group for which the request was made.

Exceptions

Table 18-105 PURGE_MASTER_LOG Procedure Exceptions

Exception Description
nonmaster
gname is not NULL, and the invocation site is not a master site.


PURGE_STATISTICS Procedure

This procedure removes information from the DBA_REPRESOLUTION_STATISTICS view.

Syntax

DBMS_REPCAT.PURGE_STATISTICS (
   sname      IN   VARCHAR2, 
   oname      IN   VARCHAR2, 
   start_date IN   DATE,
   end_date   IN   DATE);

Parameters

Table 18-106 PURGE_STATISTICS Procedure Parameters

Parameter Description
sname
Name of the schema in which the replicated table is located.
oname
Name of the table whose conflict resolution statistics you want to purge.
start_date/end_date
Range of dates for which you want to purge statistics. If start_date is NULL, then purge all statistics up to the end_date. If end_date is NULL, then purge all statistics after the start_date.

Exceptions

Table 18-107 PURGE_STATISTICS Procedure Exceptions

Exception Description
missingschema
Specified schema does not exist.
missingobject
Specified table does not exist.
statnotreg
Table not registered to collect statistics.


REFRESH_MVIEW_REPGROUP Procedure

This procedure refreshes a materialized view group with the most recent data from its associated master site or master materialized view site.

Syntax

DBMS_REPCAT.REFRESH_MVIEW_REPGROUP (
   gname                  IN   VARCHAR2,
   drop_missing_contents  IN   BOOLEAN    := false,
   refresh_mviews         IN   BOOLEAN    := false,
   refresh_other_objects  IN   BOOLEAN    := false,
   gowner                 IN   VARCHAR2   := 'PUBLIC');

Parameters

Table 18-108 REFRESH_MVIEW_REPGROUP Procedure Parameters

Parameter Description
gname
Name of the replication group.
drop_missing_contents
If an object was dropped from the replication group at the master site or master materialized view site, then it is not automatically dropped from the schema at the materialized view site. It is simply no longer replicated. That is, changes to this object are no longer sent to its associated master site or master materialized view site. Materialized views can continue to be refreshed from their associated master tables or master materialized views. However, any changes to an updatable materialized view are lost. When an object is dropped from the replication group, you can choose to have it dropped from the schema entirely by setting this parameter to true.
refresh_mviews
Set to true to refresh the contents of the materialized views in the replication group.
refresh_other_objects
Set this to true to refresh the contents of the non materialized view objects in the replication group. Non materialized view objects can include the following:
  • Tables

  • Views

  • Indexes

  • PL/SQL packages and package bodies

  • PL/SQL procedures and functions

  • Triggers

  • Synonyms

gowner
Owner of the materialized view group.

Exceptions

Table 18-109 REFRESH_MVIEW_REPGROUP Procedure Exceptions

Exception Description
nonmview
Invocation site is not a materialized view site.
nonmaster
Master is no longer a master site or master materialized view site.
commfailure
Master site or master materialized view site is not accessible.
missingrepgroup
Replication group name not specified.


REGISTER_MVIEW_REPGROUP Procedure

This procedure facilitates the administration of materialized views at their respective master sites or master materialized view sites by inserting or modifying a materialized view group in DBA_REGISTERED_MVIEW_GROUPS.

Syntax

DBMS_REPCAT.REGISTER_MVIEW_REPGROUP (
   gname            IN   VARCHAR2,
   mviewsite        IN   VARCHAR2,
   comment          IN   VARCHAR2  := NULL,
   rep_type         IN   NUMBER    := reg_unknown,
   fname            IN   VARCHAR2  := NULL,
   gowner           IN   VARCHAR2  := 'PUBLIC');

Parameters

Table 18-110 REGISTER_MVIEW_REPGROUP Procedure Parameters

Parameter Description
gname
Name of the materialized view group to be registered.
mviewsite
Global name of the materialized view site.
comment
Comment for the materialized view site or update for an existing comment.
rep_type
Version of the materialized view group. Valid constants that can be assigned include the following:
  • dbms_repcat.reg_unknown (the default)

  • dbms_repcat.reg_v7_group

  • dbms_repcat.reg_v8_group

fname
This parameter is for internal use only.

Note: Do not set this parameter unless directed to do so by Oracle Support Services.

gowner
Owner of the materialized view group.

Exceptions

Table 18-111 REGISTER_MVIEW_REPGROUP Procedure Exceptions

Exception Description
failregmviewrepgroup
Registration of materialized view group failed.
missingrepgroup
Replication group name not specified.
nullsitename
A materialized view site was not specified.
nonmaster
Procedure must be executed at the materialized view's master site or master materialized view site.
duplicaterepgroup
Replication group already exists.


REGISTER_STATISTICS Procedure

This procedure collects information about the successful resolution of update, delete, and uniqueness conflicts for a table.

Syntax

DBMS_REPCAT.REGISTER_STATISTICS (
   sname IN   VARCHAR2,
   oname IN   VARCHAR2);

Parameters

Table 18-112 REGISTER_STATISTICS Procedure Parameters

Parameter Description
sname
Name of the schema in which the table is located.
oname
Name of the table for which you want to gather conflict resolution statistics.

Exceptions

Table 18-113 REGISTER_STATISTICS Procedure Exceptions

Exception Description
missingschema
Specified schema does not exist.
missingobject
Specified table does not exist.


RELOCATE_MASTERDEF Procedure

This procedure changes your master definition site to another master site in your replication environment.

It is not necessary for either the old or new master definition site to be available when you call RELOCATE_MASTERDEF. In a planned reconfiguration, you should invoke RELOCATE_MASTERDEF with notify_masters set to true and include_old_masterdef set to true.

Syntax

DBMS_REPCAT.RELOCATE_MASTERDEF (
   gname                  IN   VARCHAR2, 
   old_masterdef          IN   VARCHAR2, 
   new_masterdef          IN   VARCHAR2, 
   notify_masters         IN   BOOLEAN    := true,
   include_old_masterdef  IN   BOOLEAN    := true,
   require_flavor_change  IN   BOOLEAN    := false);

Parameters

Table 18-114 RELOCATE_MASTERDEF Procedure Parameters

Parameter Description
gname
Name of the replication group whose master definition you want to relocate.
old_masterdef
Fully qualified database name of the current master definition site.
new_masterdef
Fully qualified database name of the existing master site that you want to make the new master definition site.
notify_masters
If this is true, then the procedure synchronously multicasts the change to all masters (including old_masterdef only if include_old_masterdef is true). If any master does not make the change, then roll back the changes at all masters.

If just the master definition site fails, then you should invoke RELOCATE_MASTERDEF with notify_masters set to true and include_old_masterdef set to false. If several master sites and the master definition site fail, then the administrator should invoke RELOCATE_MASTERDEF at each operational master with notify_masters set to false.

include_old_masterdef
If notify_masters is true and if include_old_masterdef is also true, then the old master definition site is also notified of the change.
require_flavor_change
This parameter is for internal use only.

Note: Do not set this parameter unless directed to do so by Oracle Support Services.


Exceptions

Table 18-115 RELOCATE_MASTERDEF Procedure Exceptions

Exception Description
nonmaster
new_masterdef is not a master site or the invocation site is not a master site.
nonmasterdef
old_masterdef is not the master definition site.
commfailure
At least one master site is not accessible and notify_masters is true.


REMOVE_MASTER_DATABASES Procedure

This procedure removes one or more master databases from a replication environment. This procedure regenerates the triggers and their associated packages at the remaining master sites. You must call this procedure from the master definition site.

Syntax

DBMS_REPCAT.REMOVE_MASTER_DATABASES (
   gname           IN   VARCHAR2,
   master_list     IN   VARCHAR2 |
   master_table    IN   DBMS_UTILITY.DBLINK_ARRAY);

Note:

This procedure is overloaded. The master_list and master_table parameters are mutually exclusive.

Parameters

Table 18-116 REMOVE_MASTER_DATABASES Procedure Parameters

Parameter Description
gname
Name of the replication group associated with the replication environment. This prevents confusion if a master database is involved in more than one replication environment.
master_list
A comma-delimited list of fully qualified master database names that you want to remove from the replication environment. There must be no spaces between names in the list.
master_table
In place of a list, you can specify the database names in a PL/SQL index-by table of type DBMS_UTILITY.DBLINK_ARRAY.

Exceptions

Table 18-117 REMOVE_MASTER_DATABASES Procedure Exceptions

Exception Description
nonmasterdef
Invocation site is not the master definition site.
nonmaster
At least one of the specified databases is not a master site.
reconfigerror
One of the specified databases is the master definition site.
commfailure
At least one remaining master site is not accessible.


RENAME_SHADOW_COLUMN_GROUP Procedure

This procedure renames the shadow column group of a replicated table to make it a named column group. The replicated table's master group does not need to be quiesced to run this procedure.

Syntax

DBMS_REPCAT.RENAME_SHADOW_COLUMN_GROUP (
   sname                IN VARCHAR2,
   oname                IN VARCHAR2,
   new_col_group_name   IN VARCHAR2)

Parameters

Table 18-118 RENAME_SHADOW_COLUMN_GROUP Procedure Parameters

Parameter Description
sname
Schema in which the replicated table is located.
oname
Name of the replicated table.
new_col_group_name
Name of the new column group. The columns currently in the shadow group are placed in a column group with the name you specify.

Exceptions

Table 18-119 RENAME_SHADOW_COLUMN_GROUP Procedure Exceptions

Exception Description
missmview
The specified schema does not exist.
nonmasterdef
Invocation site is not the master definition site.
missingobject
The specified object does not exist.
duplicategroup
The column group that was specified for creation already exists.


REPCAT_IMPORT_CHECK Procedure

This procedure ensures that the objects in the master group have the appropriate object identifiers and status values after you perform an export/import of a replicated object or an object used by Advanced Replication.


Note:

You can use either Data Pump export/import or original export/import to perform exports and imports in an Advanced Replication environment. General references to export/import in this document refer to both Data Pump and original export/import.

Syntax

DBMS_REPCAT.REPCAT_IMPORT_CHECK (
   gname      IN   VARCHAR2,
   master     IN   BOOLEAN,
   gowner     IN   VARCHAR2  := 'PUBLIC');

Parameters

Table 18-120 REPCAT_IMPORT_CHECK Procedure Parameters

Parameter Description
gname
Name of the master group. If you omit both parameters, then the procedure checks all master groups at your current site.
master
Set this to true if you are checking a master site and false if you are checking a materialized view site.
gowner
Owner of the master group.

Exceptions

Table 18-121 REPCAT_IMPORT_CHECK Procedure Exceptions

Exception Description
nonmaster
master is true and either the database is not a master site for the replication group or the database is not the expected database.
nonmview
master is false and the database is not a materialized view site for the replication group.
missingobject
A valid replicated object in the replication group does not exist.
missingrepgroup
The specified replicated replication group does not exist.
missingschema
The specified replicated replication group does not exist.


RESUME_MASTER_ACTIVITY Procedure

This procedure resumes normal replication activity after quiescing a replication environment.

Syntax

DBMS_REPCAT.RESUME_MASTER_ACTIVITY (
   gname       IN  VARCHAR2, 
   override    IN  BOOLEAN := false);

Parameters

Table 18-122 RESUME_MASTER_ACTIVITY Procedure Parameters

Parameter Description
gname
Name of the master group.
override
If this is true, then it ignores any pending administrative requests and restores normal replication activity at each master as quickly as possible. This should be considered only in emergency situations.

If this is false, then it restores normal replication activity at each master only when there is no pending administrative request for gname at that master.


Exceptions

Table 18-123 RESUME_MASTER_ACTIVITY Procedure Exceptions

Exception Description
nonmasterdef
Invocation site is not the master definition site.
notquiesced
Master group is not quiescing or quiesced.
commfailure
At least one master site is not accessible.
notallgenerated
Generate replication support before resuming replication activity.


RESUME_PROPAGATION_TO_MDEF Procedure

During the process of adding new master sites to a master group without quiesce, this procedure indicates that export is effectively finished and propagation to the master definition site for both extended and unaffected replication groups existing at master sites can be enabled. Run this procedure after the export required to add new master sites to a master group is complete.


See Also:

"Adding New Master Sites" for more information about adding master sites to a master group

Syntax

DBMS_REPCAT.RESUME_PROPAGATION_TO_MDEF (
   extension_id    IN    RAW);

Parameters

Table 18-124 RESUME_PROPAGATION_TO_MDEF Procedure Parameters

Parameter Description
extension_id
The identifier for the current pending request to add master databases to a master group without quiesce. You can find the extension_id by querying the DBA_REPSITES_NEW and DBA_REPEXTENSIONS data dictionary views.

Exceptions

Table 18-125 RESUME_PROPAGATION_TO_MDEF Procedure Exceptions

Exception Description
nonmasterdef
Invocation site is not the master definition site.
extstinapp
Extension status is inappropriate. The extension status should be EXPORTING when you run this procedure. To check the extension status, query the DBA_REPEXTENSIONS data dictionary view.
dbnotcompatible
Feature is incompatible with database version. All databases must be at 9.0.1 or higher compatibility level.


SEND_OLD_VALUES Procedure

You have the option of sending old column values during propagation of deferred transactions for each nonkey column of a replicated table when rows are updated or deleted in the table. When min_communication is set to true, the default is the following:

You can change this behavior at all master sites and materialized view sites by invoking DBMS_REPCAT.SEND_OLD_VALUES at the master definition site. Then, generate replication support at all master sites and at each materialized view site.

When you use user-defined types, you can specify the leaf attributes of a column object, or an entire column object. For example, if a column object named cust_address has street_address as an attribute, then you can specify cust_address.street_address for the column_list parameter or as part of the column_table parameter, or you can specify only cust_address.

Syntax

DBMS_REPCAT.SEND_OLD_VALUES(
   sname           IN  VARCHAR2,
   oname           IN  VARCHAR2,
   { column_list   IN  VARCHAR2,
   | column_table  IN  DBMS_UTILITY.VARCHAR2s | DBMS_UTILITY.LNAME_ARRAY,}
   operation       IN  VARCHAR2 := 'UPDATE',
   send            IN  BOOLEAN  := true );

Note:

This procedure is overloaded. The column_list and column_table parameters are mutually exclusive.

Parameters

Table 18-126 SEND_OLD_VALUES Procedure Parameters

Parameter Description
sname
Schema in which the table is located.
oname
Name of the replicated table. The table can be the storage table of a nested table.
column_list
A comma-delimited list of the columns in the table. There must be no spaces between entries.
column_table
Instead of a list, you can use a PL/SQL index-by table of type DBMS_REPCAT.VARCHAR2 or DBMS_UTILITY.LNAME_ARRAY to contain the column names. The first column name should be at position 1, the second at position 2, and so on.

Use DBMS_UTILITY.LNAME_ARRAY if any column name is greater than or equal to 30 bytes, which might occur when you specify the attributes of column objects.

operation
Possible values are: update, delete, or the asterisk wildcard '*', which means update and delete.
send
If true, then the old values of the specified columns are sent. If false, then the old values of the specified columns are not sent. Unspecified columns and unspecified operations are not affected.

The specified change takes effect at the master definition site as soon as min_communication is true for the table. The change takes effect at a master site or at a materialized view site the next time replication support is generated at that site with min_communication true.



Note:

The operation parameter enables you to specify whether or not to transmit old values for nonkey columns when rows are deleted or updated. If you do not send the old value, then Oracle sends a NULL in place of the old value and assumes the old value is equal to the current value of the column at the target side when the update or delete is applied.

See Oracle Database Advanced Replication for information about reduced data propagation using the SEND_OLD_VALUES procedure before changing the default behavior of Oracle.


Exceptions

Table 18-127 SEND_OLD_VALUES Procedure Exceptions

Exception Description
nonmasterdef
Invocation site is not the master definition site.
missingobject
Specified object does not exist as a table in the specified schema waiting for row-level replication information.
missingcolumn
At least one column is not in the table.
notquiesced
Master group has not been quiesced.
typefailure
An illegal operation is specified.
keysendcomp
A specified column is a key column in a table.
dbnotcompatible
Feature is incompatible with database version. Typically, this exception arises when you are trying to send the attributes of column objects. In this case, all databases must be at 9.0.1 or higher compatibility level.


SET_COLUMNS Procedure

This procedure enables you to use an alternate column or group of columns, instead of the primary key, to determine which columns of a table to compare when using row-level replication. You must call this procedure from the master definition site.

When you use column objects, if an attribute of a column object can be used as a primary key or part of a primary key, then the attribute can be part of an alternate key column. For example, if a column object named cust_address has street_address as a VARCHAR2 attribute, then you can specify cust_address.street_address for the column_list parameter or as part of the column_table parameter. However, the entire column object, cust_address, cannot be specified.

For the storage table of a nested table column, this procedure accepts the NESTED_TABLE_ID as an alternate key column.

When you use object tables, you cannot specify alternate key columns. If the object identifier (OID) is system-generated for an object table, then Oracle uses the OID column in the object table as the key for the object table. If the OID is user-defined for an object table, then Oracle uses the primary key in the object table as the key.

The following types of columns cannot be alternate key columns:

Syntax

DBMS_REPCAT.SET_COLUMNS (
   sname           IN    VARCHAR2,
   oname           IN    VARCHAR2,
   { column_list   IN    VARCHAR2
   | column_table  IN    DBMS_UTILITY.NAME_ARRAY | DBMS_UTILITY.LNAME_ARRAY } );


Note:

This procedure is overloaded. The column_list and column_table parameters are mutually exclusive.

Parameters

Table 18-128 SET_COLUMNS Procedure Parameters

Parameter Description
sname
Schema in which the table is located.
oname
Name of the table.
column_list
A comma-delimited list of the columns in the table that you want to use as a primary key. There must be no spaces between entries.
column_table
Instead of a list, you can use a PL/SQL index-by table of type DBMS_UTILITY.NAME_ARRAY or DBMS_UTILITY.LNAME_ARRAY to contain the column names. The first column name should be at position 1, the second at position 2, and so on.

Use DBMS_UTILITY.LNAME_ARRAY if any column name is greater than or equal to 30 bytes, which might occur when you specify the attributes of column objects.


Exceptions

Table 18-129 SET_COLUMNS Procedure Exceptions

Exception Description
nonmasterdef
Invocation site is not the master definition site.
missingobject
Specified object does not exist as a table in the specified schema waiting for row-level replication information.
missingcolumn
At least one column is not in the table.
notquiesced
Replication group is not quiescing or quiesced.


SPECIFY_NEW_MASTERS Procedure

This procedure specifies the master sites you intend to add to an existing replication group without quiescing the group. This procedure must be run at the master definition site of the specified master group.

If necessary, this procedure creates an extension_id that tracks the process of adding new master sites to a master group. You use this extension_id in the other procedures that you run at various stages in the process. You can view information about the extension_id in the DBA_REPSITES_NEW and DBA_REPEXTENSIONS data dictionary views.

This procedure adds the new master sites to the DBA_REPSITES_NEW data dictionary view for the specified replication group. This procedure can be run any number of times for a given replication group. If it is run more than once, then it replaces any masters in the local DBA_REPSITES_NEW data dictionary view for the specified replication group with the masters specified in the master_list/master_table parameters.

You must run this procedure before you run the ADD_NEW_MASTERS procedure. No new master sites are added to the master group until you run the ADD_NEW_MASTERS procedure.


See Also:


Syntax

DBMS_REPCAT.SPECIFY_NEW_MASTERS (
   gname           IN   VARCHAR2,
   { master_list   IN   VARCHAR2 
   | master_table  IN   DBMS_UTILITY.DBLINK_ARRAY});


Note:

This procedure is overloaded. The master_list and master_table parameters are mutually exclusive.

Parameters

Table 18-130 SPECIFY_NEW_MASTERS Procedure Parameters

Parameter Description
gname
Master group to which you are adding new master sites.
master_list

A comma-delimited list of new master sites that you want to add to the master group. List only the new master sites, not the existing master sites. Do not put any spaces between site names.

If master_list is NULL, all master sites for the given replication group are removed from the DBA_REPSITES_NEW data dictionary view. Specify NULL to indicate that the master group is not being extended.

master_table
A table that lists the new master sites that you want to add to the master group. In the table, list only the new master sites, not the existing master sites. The first master site should be at position 1, the second at position 2, and so on.

If the table is empty, then all master sites for the specified replication group are removed from the DBA_REPSITES_NEW data dictionary view. Use an empty table to indicate that the master group is not being extended.


Exceptions

Table 18-131 SPECIFY_NEW_MASTERS Procedure Exceptions

Exception Description
duplicaterepgroup
A master site that you are attempting to add is already part of the master group.
nonmasterdef
Invocation site is not the master definition site.
propmodenotallowed
Synchronous propagation mode not allowed for this operation. Only asynchronous propagation mode is allowed.
extstinapp
Extension request with status not allowed. There must either be no extension_id for the master group or the extension_id status must be READY. You can view the status for each extension_id at a master site in the DBA_REPEXTENSIONS data dictionary view.
dbnotcompatible
Feature is incompatible with database version. All databases must be at 9.0.1 or higher compatibility level.
notsamecq
Master groups do not have the same connection qualifier.


STREAMS_MIGRATION Procedure

Generates a migration script that migrates an Advanced Replication environment to a Streams environment. Specifically, this procedure generates a script that sets up a Streams environment for the specified replication groups. The generated script can be customized and run at each master site to perform the migration.


See Also:

Oracle Streams Replication Administrator's Guide for detailed information about migrating from Advanced Replication to Streams

Syntax

DBMS_REPCAT.STREAMS_MIGRATION ( 
     gnames              IN   DBMS_UTILITY.NAME_ARRAY, 
     file_location       IN   VARCHAR2, 
     filename            IN   VARCHAR2);

Parameters

Table 18-132 STREAMS_MIGRATION Procedure Parameters

Parameter Description
gnames
List of replication groups to migrate to Streams. The replication groups listed must all contain exactly the same master sites. An error is raised if the replication groups have different masters.
file_location
Directory location of the migration script. The specified location should be a directory object that is accessible to PL/SQL. You can use the SQL statement CREATE DIRECTORY to create a directory object.

See Also: Oracle Database SQL Reference for more information about the CREATE DIRECTORY statement

filename
Name of the migration script.


SUSPEND_MASTER_ACTIVITY Procedure

This procedure suspends replication activity for a master group. You use this procedure to quiesce the master group. You must call this procedure from the master definition site.

Syntax

DBMS_REPCAT.SUSPEND_MASTER_ACTIVITY (
   gname   IN   VARCHAR2);

Parameters

Table 18-133 SUSPEND_MASTER_ACTIVITY Procedure Parameters

Parameter Description
gname
Name of the master group for which you want to suspend activity.

Exceptions

Table 18-134 SUSPEND_MASTER_ACTIVITY Procedure Exceptions

Exception Description
nonmasterdef
Invocation site is not the master definition site.
notnormal
Master group is not in normal operation.
commfailure
At least one master site is not accessible.


SWITCH_MVIEW_MASTER Procedure

This procedure changes the master site of a materialized view group to another master site. This procedure does a full refresh of the affected materialized views and regenerates the triggers and their associated packages as needed. This procedure does not push the queue to the old master site before changing master sites.

If generate_80_compatible is false for the materialized view and the new master site is a release lower than Oracle8 Database release 8.0, then regenerate replication support for the materialized view with generate_80_compatible set to true.

You can set both parameters for a materialized view in one call to DBMS_REPCAT.GENERATE_MVIEW_SUPPORT.


Note:

You cannot switch the master of materialized views that are based on other materialized views (level 2 and greater materialized views). Such a materialized view must be dropped and re-created if you want to base it on a different master.

Syntax

DBMS_REPCAT.SWITCH_MVIEW_MASTER (
   gname         IN   VARCHAR2, 
   master        IN   VARCHAR2,
   gowner        IN   VARCHAR2  := 'PUBLIC');

Parameters

Table 18-135 SWITCH_MVIEW_MASTER Procedure Parameters

Parameter Description
gname
Name of the materialized view group for which you want to change the master site.
master
Fully qualified database name of the new master site to use for the materialized view group.
gowner
Owner of the materialized view group.

Exceptions

Table 18-136 SWITCH_MVIEW_MASTER Procedure Exceptions

Exception Description
nonmview
Invocation site is not a materialized view site.
nonmaster
Specified database is not a master site.
commfailure
Specified database is not accessible.
missingrepgroup
Materialized view group does not exist.
qrytoolong
Materialized view definition query is greater 32 KB.
alreadymastered
At the local site, there is another materialized view group with the same group name mastered at the old master site.


UNDO_ADD_NEW_MASTERS_REQUEST Procedure

This procedure undoes all of the changes made by the SPECIFY_NEW_MASTERS and ADD_NEW_MASTERS procedures for a specified extension_id.

This procedure is executed at one master site, which can be the master definition site, and it only affects that master site. If you run this procedure at one master site affected by the request, you must run it at all new and existing master sites affected by the request. You can query the DBA_REPSITES_NEW data dictionary view to see the new master sites affected by the extension_id. This data dictionary view also lists the replication group name, and you must run this procedure at all existing master sites in the replication group.


Caution:

This procedure is not normally called. Use this procedure only if the adding new masters without quiesce operation cannot proceed at one or more master sites. Run this procedure after you have already run the SPECIFY_NEW_MASTERS and ADD_NEW_MASTERS procedures, but before you have run the RESUME_PROPAGATION_TO_MDEF and PREPARE_INSTANTIATED_MASTER procedures.

Do not run this procedure after you have run either RESUME_PROPAGATION_TO_MDEF or PREPARE_INSTANTIATED_MASTER for a particular extension_id.


Syntax

DBMS_REPCAT.UNDO_ADD_NEW_MASTERS_REQUEST (
   extension_id   IN  RAW,
   drop_contents  IN  BOOLEAN := TRUE);

Parameters

Table 18-137 UNDO_ADD_NEW_MASTERS_REQUEST Procedure Parameters

Parameter Description
extension_id
The identifier for the current pending request to add master databases to a master group without quiesce. You can find the extension_id by querying the DBA_REPSITES_NEW and DBA_REPEXTENSIONS data dictionary views.
drop_contents
Specify true, the default, to drop the contents of objects in new replication groups being extended at the local site. Specify false to retain the contents.

Exceptions

Table 18-138 UNDO_ADD_NEW_MASTERS_REQUEST Procedure Exceptions

Exception Description
dbnotcompatible
Feature is incompatible with database version. All databases must be at 9.0.1 or higher compatibility level.
typefail
A parameter value that you specified is not appropriate.


UNREGISTER_MVIEW_REPGROUP Procedure

This procedure facilitates the administration of materialized views at their respective master sites or master materialized view sites by deleting a materialized view group from DBA_REGISTERED_MVIEW_GROUPS. Run this procedure at the master site or master materialized view site.

Syntax

DBMS_REPCAT.UNREGISTER_MVIEW_REPGROUP (
   gname      IN   VARCHAR2,
   mviewsite  IN   VARCHAR2,
   gowner     IN   VARCHAR2  := 'PUBLIC');

Parameters

Table 18-139 UNREGISTER_MVIEW_REPGROUP Procedure Parameters

Parameter Description
gname
Name of the materialized view group to be unregistered.
mviewsite
Global name of the materialized view site.
gowner
Owner of the materialized view group.


VALIDATE Function

This function validates the correctness of key conditions of a multimaster replication environment.

Syntax

DBMS_REPCAT.VALIDATE (
   gname               IN  VARCHAR2, 
   check_genflags      IN  BOOLEAN := false,
   check_valid_objs    IN  BOOLEAN := false,
   check_links_sched   IN  BOOLEAN := false,
   check_links         IN  BOOLEAN := false,
   error_table         OUT DBMS_REPCAT.VALIDATE_ERR_TABLE)
  RETURN BINARY_INTEGER;

DBMS_REPCAT.VALIDATE (
   gname               IN  VARCHAR2, 
   check_genflags      IN  BOOLEAN := false,
   check_valid_objs    IN  BOOLEAN := false,
   check_links_sched   IN  BOOLEAN := false,
   check_links         IN  BOOLEAN := false,
   error_msg_table     OUT DBMS_UTILITY.UNCL_ARRAY,
   error_num_table     OUT DBMS_UTILITY.NUMBER_ARRAY )
  RETURN BINARY_INTEGER;

Note:

This function is overloaded. The return value of VALIDATE is the number of errors found. The function's OUT parameter returns any errors that are found. In the first interface function shown under "Syntax", the error_table consists of an array of records. Each record has a VARCHAR2 and a NUMBER in it. The string field contains the error message, and the number field contains the Oracle error number.

The second interface function shown under "Syntax" is similar except that there are two OUT arrays: a VARCHAR2 array with the error messages and a NUMBER array with the error numbers.


Parameters

Table 18-140 VALIDATE Function Parameters

Parameter Description
gname
Name of the master group to validate.
check_genflags
Check whether all the objects in the group are generated. This must be done at the master definition site only.
check_valid_objs
Check that the underlying objects for objects in the group valid. This must be done at the master definition site only. The master definition site goes to all other sites and checks that the underlying objects are valid. The validity of the objects is checked within the schema of the connected user.
check_links_sched
Check whether the links are scheduled for execution. This should be invoked at each master site.
check_links
Check whether the connected user (repadmin), as well as the propagator, have correct links for replication to work properly. Checks that the links exist in the database and are accessible. This should be invoked at each master site.
error_table
Returns the messages and numbers of all errors that are found.
error_msg_table
Returns the messages of all errors that are found.
error_num_table
Returns the numbers of all errors that are found.

Exceptions

Table 18-141 VALIDATE Function Exceptions

Exception Description
missingdblink
Database link does not exist in the schema of the replication propagator or has not been scheduled. Ensure that the database link exists in the database, is accessible, and is scheduled for execution.
dblinkmismatch
Database link name at the local node does not match the global name of the database that the link accesses. Ensure that the GLOBAL_NAMES initialization parameter is set to true and the link name matches the global name.
dblinkuidmismatch
User name of the replication administration user at the local node and the user name at the node corresponding to the database link are not the same. Advanced Replication expects the two users to be the same. Ensure that the user identification of the replication administration user at the local node and the user identification at the node corresponding to the database link are the same.
objectnotgenerated
Object has not been generated at other master sites or is still being generated. Ensure that the object is generated by calling GENERATE_REPLICATION_SUPPORT and DO_DEFERRED_REPCAT_ADMIN for the object at the master definition site.

Usage Notes

The return value of VALIDATE is the number of errors found. The function's OUT parameter returns any errors that are found. In the first interface function, the error_table consists of an array of records. Each record has a VARCHAR2 and a NUMBER in it. The string field contains the error message and the number field contains the Oracle error number.

The second interface is similar except that there are two OUT arrays. A VARCHAR2 array with the error messages and a NUMBER array with the error numbers.


WAIT_MASTER_LOG Procedure

This procedure determines whether changes that were asynchronously propagated to a master site have been applied.

Syntax

DBMS_REPCAT.WAIT_MASTER_LOG (
   gname          IN    VARCHAR2, 
   record_count   IN    NATURAL, 
   timeout        IN    NATURAL, 
   true_count     OUT   NATURAL);

Parameters

Table 18-142 WAIT_MASTER_LOG Procedure Parameters

Parameter Description
gname
Name of the master group.
record_count
Procedure returns whenever the number of incomplete activities is at or below this threshold.
timeout
Maximum number of seconds to wait before the procedure returns.
true_count
(out parameter)
Returns the number of incomplete activities.

Exceptions

Table 18-143 WAIT_MASTER_LOG Procedure Exceptions

Exception Description
nonmaster
Invocation site is not a master site.