Oracle9i Supplied PL/SQL Packages and Types Reference
Release 1 (9.0.1)

Part Number A89852-02
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, 10 of 69


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 48-19 ALTER_MASTER_REPOBJECT Procedure Parameters (Page 1 of 2)
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 48-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. 


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