Skip Headers

Oracle® Database Advanced Replication Management API Reference
10g Release 1 (10.1)

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

Go to previous page
Previous
Go to current chapter
Up
Go to next page
Next
View PDF

SET_COLUMNS Procedure

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

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

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

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

The following types of columns cannot be alternate key columns:

Syntax

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


Note:

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


Parameters

Table 18-128 SET_COLUMNS Procedure Parameters  
Parameter Description
sname

Schema in which the table is located.

oname

Name of the table.

column_list

A comma-delimited list of the columns in the table that you want to use as a primary key. There must be no spaces between entries.

column_table

Instead of a list, you can use a PL/SQL index-by table of type DBMS_UTILITY.NAME_ARRAY or DBMS_UTILITY.LNAME_ARRAY to contain the column names. The first column name should be at position 1, the second at position 2, and so on.

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

Exceptions

Table 18-129 SET_COLUMNS Procedure Exceptions  
Exception Description
nonmasterdef

Invocation site is not the master definition site.

missingobject

Specified object does not exist as a table in the specified schema waiting for row-level replication information.

missingcolumn

At least one column is not in the table.

notquiesced

Replication group is not quiescing or quiesced.