Oracle9i Replication Management API Reference
Release 1 (9.0.1)

Part Number A87502-01
Go To Documentation Library
Home
Go To Product List
Book List
Go To Table Of Contents
Contents
Go To Index
Index

Master Index

Feedback

Go to previous page Go to beginning of chapter Go to next page

DBMS_REPCAT, 62 of 69


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 20-126 SET_COLUMNS Procedure Parameters
Parameter  Description 
sname
 

Schema in which the table is located. 

oname
 

Name of the table. 

column_list
 

A comma-separated 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 20-127 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. 


Go to previous page Go to beginning of chapter Go to next page
Oracle
Copyright © 1996-2001, Oracle Corporation.

All Rights Reserved.
Go To Documentation Library
Home
Go To Product List
Book List
Go To Table Of Contents
Contents
Go To Index
Index

Master Index

Feedback