Oracle7 Server Distributed Systems Volume II: Replicated Data

Contents Index Home Previous Next

DBMS_REPCAT.CREATE_MASTER_REPOBJECT

Purpose

To indicate that an object is a replicated object. For additional information, refer to [*].

Syntax

The parameters for the CREATE_MASTER_REPOBJECT procedure are shown in Table 12 - 102, and the exceptions are listed in Table 12 - 103. The syntax for this procedure is shown below:

DBMS_REPCAT.CREATE_MASTER_REPOBJECT(
                  sname               IN VARCHAR2,
                  oname               IN VARCHAR2, 
                  type                IN VARCHAR2,
                  use_existing_object IN BOOLEAN := TRUE, 
                  ddl_text            IN VARCHAR2 := NULL, 
                  comment             IN VARCHAR2 := '', 
                  retry               IN BOOLEAN := FALSE
                  copy_rows           IN BOOLEAN := TRUE,
                  gname               IN VARCHAR2 := '')

Note: If the DDL is supplied without specifying a schema, 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.

Parameter Description
sname The name of the schema in which the object that you want to replicate is located.
oname The name of the object that you are replicating. If DDL_TEXT is NULL, this object must already exist in the given schema. To ensure uniqueness, table names should be a maximum of 27 bytes long, and packages should be no more than 24 bytes.
type The type of the object that you are replicating. The types supported are: TABLE, INDEX, SYNONYM, TRIGGER,VIEW, PROCEDURE, FUNCTION, PACKAGE, and PACKAGE BODY.
use_existing_object Indicate TRUE if you want to reuse any objects of the same type and shape at the current master sites. See Table 12 - 104 for more information on how these changes are applied.
ddl_text If the object does not already exist at the master definition site, you must supply the DDL text necessary to create this object. PL/SQL packages, package bodies, procedures, and functions must have a trailing semicolon. SQL statements do not end with a trailing semicolon. 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 created.
comment This comment will be added to the OBJECT_COMMENT field of the RepObject view.
retry Indicate TRUE if you want Oracle to reattempt to create an object that it was previously unable to create. Use RETRY if the error was transient or has since been rectified; for example, if you previously had insufficient resources. If RETRY is TRUE, Oracle creates the object only at master sites whose object status is not VALID.
copy_rows Indicate TRUE if you want the initial contents of a newly replicated object to match the contents of the object at the master definition site. See Table 12 - 104 for more information.
gname The name of the object group in which you want to create the replicated object. The schema name is used as the default object group name is none is specified.
Table 12 - 102. Parameters for CREATE_MASTER_REPOBJECT

Exception Description
nonmasterdef The invocation site is not the master definition site.
notquiesced The replicated object group has not been suspended.
duplicateobject The given object already exists in the replicated object group and retry is FALSE, or if a name conflict occurs.
missingobject The object identified by SNAME and ONAME does not exist and appropriate DDL has not been provided.
typefailure Objects of the given type cannot be replicated
ddlfailure DDL at the master definition site did not succeed.
commfailure At least one master site is not accessible.
Table 12 - 103. Exceptions for CREATE_MASTER_REPOBJECT

Object Already Exists? COPY_ROWS USE_EXISTING_OBJECT Result
yes TRUE TRUE duplicateobject message if objects do not match. For tables, use data from master definition site.
yes FALSE TRUE duplicateobject message if objects do not match. For tables, Admin must ensure contents are identical.
yes TRUE/FALSE FALSE duplicateobject message
no TRUE TRUE/FALSE Object is created. Tables populated using data from master definition site.
no FALSE TRUE/FALSE Object is created. Admin must populate tables and ensure consistency of tables at all sites.
Table 12 - 104. Object Creation at Master Sites


Contents Index Home Previous Next