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_OBJECT_FROM_EXISTING Function

This function creates a template object definition from existing database objects and adds it to a target deployment template. The object DDL that created the original database object is executed when the target deployment template is instantiated at the remote materialized view site. This is ideal for adding existing triggers and procedures to your template. The number returned by this function is used internally by Oracle to manage deployment templates.

Syntax

DBMS_REPCAT_RGT.CREATE_OBJECT_FROM_EXISTING(
     refresh_template_name  IN   VARCHAR2,
     object_name            IN   VARCHAR2,
     sname                  IN   VARCHAR2,
     oname                  IN   VARCHAR2,
     otype                  IN   VARCHAR2)
     return NUMBER;

Parameters

Table 21-18 CREATE_OBJECT_FROM_EXISTING Function Parameters  
Parameter Description
refresh_template_name

Name of the deployment template to which you want to add this object.

object_name

Optionally, the new name of the existing object that you are adding to your deployment template (enables you to define a new name for an existing object).

sname

The schema that contains the object that you are creating your template object from.

oname

Name of the object that you are creating your template object from.

otype

The type of database object that you are adding to the template (that is, PROCEDURE, TRIGGER, and so on). Objects of the following type may be specified (DATABASE LINK, MATERIALIZED VIEW, and MATERIALIZED VIEW are not valid object types for this function):

SEQUENCE               PROCEDURE
INDEX                  FUNCTION
TABLE                  PACKAGE
VIEW                   PACKAGE BODY
SYNONYM                TRIGGER

Exceptions

Table 21-19 CREATE_OBJECT_FROM_EXISTING Function Exceptions  
Exception Description
miss_refresh_template

The specified refresh template name is invalid or missing. Query the DBA_REPCAT_REFRESH_TEMPLATES view for a list of existing deployment templates.

bad_object_type

The object type is specified incorrectly.

dupl_template_object

An object of the same name and type has already been added to the specified deployment template.

objectmissing

The object specified does not exist.

Returns

Table 21-20 CREATE_OBJECT_FROM_EXISTING Function Returns
Return Value Description

<system-generated number>

System-generated number used internally by Oracle.