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

CREATE_MVIEW_REPOBJECT Procedure

This procedure adds a replicated object to a materialized view group.

Syntax

DBMS_REPCAT.CREATE_MVIEW_REPOBJECT (
   sname                   IN   VARCHAR2,
   oname                   IN   VARCHAR2, 
   type                    IN   VARCHAR2, 
   ddl_text                IN   VARCHAR2  := '',
   comment                 IN   VARCHAR2  := '',
   gname                   IN   VARCHAR2  := '',
   gen_objs_owner          IN   VARCHAR2  := '',
   min_communication       IN   BOOLEAN   := true,
   generate_80_compatible  IN   BOOLEAN   := true,
   gowner                  IN   VARCHAR2  := 'PUBLIC');

Parameters

Table 18-59 CREATE_MVIEW_REPOBJECT Procedure Parameters  
Parameter Description
sname

Name of the schema in which the object is located. The schema must be same as the schema that owns the master table or master materialized view on which this materialized view is based.

oname

Name of the object that you want to add to the replicated materialized view group.

type

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

FUNCTION               SNAPSHOTINDEX                  SYNONYM
INDEXTYPE              TRIGGER
OPERATOR               TYPE
PACKAGE                TYPE BODY
PACKAGE BODY           VIEW
PROCEDURE

Use SNAPSHOT type of the object is a materialized view.

ddl_text

For objects of type MATERIALIZED VIEW, the DDL needed to create the object. For other types, use the default:

'' (an empty string)

If a materialized view with the same name already exists, then Oracle ignores the DDL and registers the existing materialized view as a replicated object. If the master table or master materialized view for a materialized view does not exist in the replication group of the master designated for this schema, then Oracle raises a missingobject error.

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.

If the object is not of type MATERIALIZED VIEW, then the materialized view site connects to the master site or master materialized view site and pulls down the DDL text to create the object. If the object type is TYPE or TYPE BODY, then the object identifier (OID) for the object at the materialized view site is the same as the OID at the master site or master materialized view site.

comment

This comment is added to the OBJECT_COMMENT field of the DBA_REPOBJECT view.

gname

Name of the replicated materialized view group to which you are adding an object. The schema name is used as the default group name if none is specified, and a materialized view group with the same name as the schema must exist for the procedure to complete successfully.

gen_objs_owner

Name of the user you want to assign as owner of the transaction.

min_communication

This parameter is obsolete. Use the default value (true).

generate_80_compatible

Set to true if the materialized view's master site is running a version of Oracle server prior to Oracle release 8.1.5. Set to false if the materialized view's master site or master materialized view site is running Oracle release 8.1.5 or greater.

gowner

Owner of the materialized view group.

Exceptions

Table 18-60 CREATE_MVIEW_REPOBJECT Procedure Exceptions  
Exception Description
nonmview

Invocation site is not a materialized view site.

nonmaster

Master is no longer a master site or master materialized view site.

missingobject

Specified object does not exist in the master's replication group.

duplicateobject

Specified object already exists with a different shape.

typefailure

Type is not an allowable type.

ddlfailure

DDL did not succeed.

commfailure

Master site or master materialized view site is not accessible.

missingschema

Schema does not exist as a database schema.

badmviewddl

DDL was executed but materialized view does not exist.

onlyonemview

Only one materialized view for master table or master materialized view can be created.

badmviewname

Materialized view differs from master table or master materialized view.

missingrepgroup

Replication group at the master does not exist.