Oracle® Database Advanced Replication Management API Reference 11g Release 1 (11.1) Part Number B28327-01 |
|
|
View PDF |
DBMS_REPCAT
provides routines to administer and update the replication catalog and environment.
This chapter contains this topic:
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. |
|
Adds the master sites in the |
"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 |
"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. |
|
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. |
|
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 |
"COMMENT_ON_MVIEW_REPSITES Procedure" |
Updates the |
"COMMENT_ON_PRIORITY_GROUP Procedures" |
Updates the comment field in the |
"COMMENT_ON_REPGROUP Procedure" |
Updates the comment field in the |
"COMMENT_ON_REPOBJECT Procedure" |
Updates the comment field in the |
"COMMENT_ON_REPSITES Procedure" |
Updates the comment field in the |
"COMMENT_ON_SITE_PRIORITY Procedure" |
Updates the comment field in the |
"COMMENT_ON_conflicttype_RESOLUTION Procedure" |
Updates the comment field in the |
"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. |
|
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. |
|
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. |
|
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. |
|
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. |
|
Removes local messages in the |
|
Removes information from the |
"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 |
"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. |
|
Specifies whether to send old column values for each nonkey column of a replicated table for updates and deletes. |
|
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. |
|
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 |
"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 |
|
Validates the correctness of key conditions of a multimaster replication environment. |
|
Determines whether changes that were asynchronously propagated to a master site have been applied. |
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 You can specify column objects, but you cannot specify attributes of column objects. If the table is an object, then you can specify If the table is a storage table of a nested table, then you can specify |
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. |
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 |
copy_rows |
Indicate |
comment |
This comment is added to the |
propagation_mode |
Method of forwarding changes to and receiving changes from new master database. Accepted values are |
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. |
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. TheDBA_REPEXTENSIONS
data dictionary view must be clear before you disable or enable propagation. You can use the Advanced Replication interface in Oracle Enterprise Manager or the SET_DISABLED
procedure in the DBMS_DEFER_SYS
package to disable or enable propagation.See Also:
"Adding New Master Sites" for more information about adding master sites to a master group
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. Theavailable_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 |
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 |
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 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 |
extension_id |
This |
break_trans_to_masterdef |
This parameter is meaningful only if If Each deferred transaction is composed of one or more remote procedure calls (RPCs). If set to If |
break_trans_to_new_masters |
If Each deferred transaction is composed of one or more remote procedure calls (RPCs). If set to If |
percentage_for_catchup_mdef |
This parameter is meaningful only if 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_new |
This parameter is meaningful only if 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 |
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 |
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 |
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:
The new master sites cannot have any existing replication groups.
The master definition site cannot have any materialized view groups.
The master definition site must be the same for all of the master groups. If one or more of these master groups have a different master definition site, then do not use change-based recovery or full database export/import. Use object-level export/import instead.
The new master site must include all of the replication groups in the master definition site when the extension process is complete. That is, you cannot add a subset of the master groups at the master definition site to the new master site; all of the groups must be added.
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.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.
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 data type of your priority
column. You must call this procedure once for each of the possible values of the priority
column.
See Also:
Chapter 6, "Configuring Conflict Resolution" and Oracle Database Advanced Replication for more information about conflict resolution methodsSyntax
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 |
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 data type for the priority group. |
notquiesced |
Specified master group is not quiesced. |
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, "Configuring Conflict Resolution" and Oracle Database Advanced Replication for more information about conflict resolution methodsSyntax
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. |
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 |
---|---|
|
|
|
|
|
|
See Also:
Chapter 6, "Configuring 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 methodsSyntax
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 The standard methods supported in this release for update conflicts are:
The standard methods supported in this release for uniqueness conflicts are: |
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 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 For delete conflicts, this parameter accepts either a comma-delimited list of column names or a PL/SQL index-by table of type The single value 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 See Chapter 6, "Configuring 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, |
function_name |
If you selected the |
comment |
This user comment is added to the |
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 |
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 |
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:
If you are using a built-in conflict resolution method, then you can specify attributes of objects for this parameter. For example, if a column object named cust_address
has street_address
as an attribute, then you can specify cust_address.street_address
for this parameter.
If you are using a built-in conflict resolution method, the following types of columns cannot be specified for this parameter: LOB attribute of a column object, collection or collection attribute of a column object, REF
, or an entire column object.
If you are using a user-created conflict resolution method, then you must specify an entire column object. You cannot specify the attributes of a column object. For example, if a column object named cust_address
has street_address
as an attribute (among other attributes), then you can specify only cust_address
for this parameter.
This procedure alters the values for the following parameters stored in the DBA_REPEXTENSIONS
data dictionary view:
percentage_for_catchup_mdef
cycle_seconds_mdef
percentage_for_catchup_new
cycle_seconds_new
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:
"Adding New Master Sites" for more information about adding master sites to a master group
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 |
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_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 |
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. |
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. Thedblink_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 |
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 |
comment |
This comment is added to the |
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. |
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 are altering a table in a multimaster replication environment.
You are altering a table with the safe_table_change
parameter set to FALSE
in a single master replication environment.
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
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 |
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. |
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 |
comment |
This comment is added to the |
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. |
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, "Configuring Conflict Resolution" and Oracle Database Advanced Replication for more information about conflict resolution methodsSyntax
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 |
missingprioritygroup |
Specified priority group does not exist. |
notquiesced |
Specified master group is not quiesced. |
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 data type of your priority
column.
See Also:
Chapter 6, "Configuring Conflict Resolution" and Oracle Database Advanced Replication for more information about conflict resolution methodsSyntax
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 data type for the priority group. |
typefailure |
Specified value has the incorrect data type for the priority group. |
notquiesced |
Specified master group is not quiesced. |
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, "Configuring Conflict Resolution" and Oracle Database Advanced Replication for more information about conflict resolution methodsSyntax
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 data type for the priority group. |
notquiesced |
Master group is not quiesced. |
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, "Configuring Conflict Resolution" and Oracle Database Advanced Replication for more information about conflict resolution methodsSyntax
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. |
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. |
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 |
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. |
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 |
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. |
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 |
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. |
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 |
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. |
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 |
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. |
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 theSCHEMA_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 |
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. |
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 |
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. |
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 |
---|---|
|
|
|
|
|
|
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 |
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. |
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:
Both objects are atomically NULL
(the entire object is NULL
)
All of the corresponding attributes are equal in the objects
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. Thecolumn_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 Use |
operation |
Possible values are: |
compare |
If compare is |
Note:
Theoperation
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.
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. |
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 |
master_comment |
This comment is added to the |
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. |
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 |
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 Note: This parameter must be set to |
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 ( Note: Do not use the |
comment |
This comment is added to the |
retry |
Indicate |
copy_rows |
Indicate |
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 |
missingobject |
Object identified by |
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 |
|
yes |
FALSE |
TRUE |
|
yes |
TRUE/FALSE |
FALSE |
|
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. |
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 |
propagation_mode |
Method of propagation for all updatable materialized views in the replication group. Acceptable values are |
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. |
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 |
ddl_text |
For objects of type '' (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 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 |
comment |
This comment is added to the |
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 ( |
generate_80_compatible |
Set to |
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. |
This procedure creates an empty column group. You must call this procedure from the master definition site.
See Also:
Chapter 6, "Configuring Conflict Resolution" and Oracle Database Advanced Replication for more information about conflict resolution methodsSyntax
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 |
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. |
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, "Configuring Conflict Resolution" and Oracle Database Advanced Replication for more information about conflict resolution methodsSyntax
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 |
Data type of the priority group members. The data types supported are: |
fixed_length |
You must provide a column length for the |
comment |
This user comment is added to the |
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 data type is not supported. |
notquiesced |
Master group is not quiesced. |
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, "Configuring Conflict Resolution" and Oracle Database Advanced Replication for more information about conflict resolution methodsSyntax
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 |
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. |
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 |
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 |
This procedure drops a column group. You must call this procedure from the master definition site.
See Also:
Chapter 6, "Configuring Conflict Resolution" and Oracle Database Advanced Replication for more information about conflict resolution methodsSyntax
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. |
This procedure removes members from a column group. You must call this procedure from the master definition site.
See Also:
Chapter 6, "Configuring Conflict Resolution" and Oracle Database Advanced Replication for more information about conflict resolution methodsSyntax
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 You can specify column objects, but you cannot specify attributes of column objects. If the table is an object, then you can specify If the table is a storage table of a nested table, then you can specify |
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. |
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 |
all_sites |
If this is |
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 |
commfailure |
At least one master site is not accessible and |
fullqueue |
Deferred remote procedure call (RPC) queue has entries for the master group. |
masternotremoved |
Master does not recognize the master definition site and |
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 |
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. |
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 |
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. |
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 |
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 |
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. |
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, "Configuring Conflict Resolution" and Oracle Database Advanced Replication for more information about conflict resolution methodsSyntax
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. |
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, "Configuring Conflict Resolution" and Oracle Database Advanced Replication for more information about conflict resolution methodsSyntax
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. |
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 data type of your priority
column.
See Also:
Chapter 6, "Configuring Conflict Resolution" and Oracle Database Advanced Replication for more information about conflict resolution methodsSyntax
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 data type for the priority group. |
notquiesced |
Specified master group is not quiesced. |
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, "Configuring Conflict Resolution" and Oracle Database Advanced Replication for more information about conflict resolution methodsSyntax
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. |
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, "Configuring Conflict Resolution" and Oracle Database Advanced Replication for more information about conflict resolution methodsSyntax
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. |
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
Table 18-91 shows the procedure name for each conflict resolution routine.
Table 18-91 Conflict Resolution Routines
Routine | Procedure Name |
---|---|
|
|
|
|
|
|
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. |
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. Themaster_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, |
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. |
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 |
gen_objs_owner |
For objects of type |
min_communication |
If |
generate_80_compatible |
Set to |
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. |
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: |
package_prefix |
For objects of type |
procedure_prefix |
For objects of type |
distributed |
This must be set to |
gen_objs_owner |
For objects of type |
min_communication |
This parameter is obsolete. Use the default value ( |
generate_80_compatible |
Set to |
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. |
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, "Configuring Conflict Resolution" and Oracle Database Advanced Replication for more information about conflict resolution methodsSyntax
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 You can specify column objects, but you cannot specify attributes of column objects. If the table is an object table, then you can specify If the table is the storage table of a nested table, then you can specify |
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. |
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.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 |
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. |
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 |
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 |
|
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 |
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. |
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 |
refresh_mviews |
Set to |
refresh_other_objects |
Set this to
|
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. |
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:
|
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. |
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. |
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 If just the master definition site fails, then you should invoke |
include_old_masterdef |
If |
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 |
|
nonmasterdef |
|
commfailure |
At least one master site is not accessible and |
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. Themaster_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 |
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. |
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. |
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.
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 |
gowner |
Owner of the master group. |
Exceptions
Table 18-121 REPCAT_IMPORT_CHECK Procedure Exceptions
Exception | Description |
---|---|
nonmaster |
|
nonmview |
|
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. |
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 If this is |
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. |
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 groupSyntax
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 |
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 |
dbnotcompatible |
Feature is incompatible with database version. All databases must be at 9.0.1 or higher compatibility level. |
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:
For a deleted row, to send old values for all columns
For an updated row, to send old values for key columns and the modified columns in a column group
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. Thecolumn_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 Use |
operation |
Possible values are: |
send |
If The specified change takes effect at the master definition site as soon as |
Note:
Theoperation
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. |
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:
LOB or LOB attribute of a column object
Collection or collection attribute of a column object
REF
An entire column object
See Also:
The constraint_clause in Oracle Database SQL Language Reference for more information about restrictions on primary key columnsSyntax
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. Thecolumn_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 Use |
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. |
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:
"Adding New Master Sites" for more information about adding master sites to a master group
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. Themaster_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_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 |
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 |
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. |
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 StreamsSyntax
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 See Also: Oracle Database SQL Language Reference for more information about the |
filename |
Name of the migration script. |
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. |
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.See Also:
"GENERATE_MVIEW_SUPPORT Procedure"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. |
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 theSPECIFY_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
.
See Also:
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 |
drop_contents |
Specify |
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. |
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. |
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 ofVALIDATE
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 |
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 |
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.
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