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

ALTER_MASTER_REPOBJECT Procedure

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

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

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

Syntax

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

Parameters

Table 18-19 ALTER_MASTER_REPOBJECT Procedure Parameters  
Parameter Description
sname

Schema containing the object that you want to alter.

oname

Name of the object that you want to alter. The object cannot be a storage table for a nested table.

type

Type of the object that you are altering. The following types are supported:

FUNCTION               SYNONYM
INDEX                  TABLE
INDEXTYPE              TRIGGER
OPERATOR               TYPE
PACKAGE                TYPE BODY
PACKAGE BODY           VIEW
PROCEDURE

ddl_text

The DDL text that you want used to alter the object. Oracle does not parse this DDL before applying it. Therefore, you must ensure that your DDL text provides the appropriate schema and object name for the object being altered.

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

comment

If not NULL, then this comment is added to the COMMENT field of the DBA_REPOBJECT view.

retry

If retry is true, then ALTER_MASTER_REPOBJECT alters the object only at masters whose object status is not VALID.

safe_table_change

Specify true if the change to a table is safe. Specify false if the change to a table is unsafe.

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

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

The following are safe changes:

  • Changing storage and extent information
  • Making existing columns larger. For example, changing a VARCHAR2(20) column to a VARCHAR2(50) column.
  • Adding non primary key constraints
  • Altering non primary key constraints
  • Enabling and disabling non primary key constraints

The following are unsafe changes:

  • Changing the primary key by adding or deleting columns in the key
  • Adding or deleting columns
  • Making existing columns smaller. For example, changing a VARCHAR2(50) column to a VARCHAR2(20) column.
  • Disabling a primary key constraint
  • Changing the datatype of an existing column
  • Dropping an existing column

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

Exceptions

Table 18-20 ALTER_MASTER_REPOBJECT Procedure Exceptions  
Exception Description
nonmasterdef

Invocation site is not the master definition site.

notquiesced

Associated replication group has not been suspended.

missingobject

Object identified by sname and oname does not exist.

typefailure

Specified type parameter is not supported.

ddlfailure

DDL at the master definition site did not succeed.

commfailure

At least one master site is not accessible.