Skip Headers

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

Part Number B10733-01
< /table>

Home
Go to Book List< br> 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< /font>
Go to current ch
apter
Up
Go to next page
Next
View PDF

SET_COLUMNS Proc edure

This procedure enables you to use an alternate column or group of columns, inst ead of the primary key, to determine which columns of a table to compare when using row-level replication. You must call this procedu re 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 c an 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 c olumn.

When you use object tables, you cannot specify alternate key columns. If the object i dentifier (OID) is system-generated for an object table, then Oracle uses the OID column in the object table as the key for the objec t 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
  • Collecti on or collection attribute of a column object
  • REF
  • An entire column object

    See Also:

    The constraint_clause in Oracle Database SQL Reference for more info rmation about restrictions on primary key columns

Syntax

DBMS_REPCAT.SET_COLUMNS (
<
a name="98985">   sname           IN    VARCHAR2,
   oname           IN    VARCHAR2,
   {
 column_list   IN    VARCHAR2
   | column_table  IN    DBMS_UTILITY.NAME_ARRAY | DBMS_UTILITY.LNAME_ARRAY } );


Note: < a name="98993">

This procedure is overloaded. The column_list and column_table parameter s 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.

<
a name="99019">column_table

Instead of a list, you can use a P L/SQL index-by table of type DBMS_UTILITY.NAME_ARRAY or DBMS_UTILITY.LNAME_ARRAY to contain th e 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 occu r when you specify the attributes of column objects.

Exceptions

Table 18-129 SET_COLUMNS Procedure Exceptions  
< td class="Formal">

At least one column is not in the table.

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
notquiesced

Replication group is not quiescing or quiesced.