Oracle8i Replication Management API Reference
Release 2 (8.1.6)

A76958-01

Library

Product

Contents

Index

Prev Up Next

Replication Management API Reference, 134 of 179


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 snapshot 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 8-248 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 (allows 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). The object type must be specified using the following numerical identifiers (DATABASE LINK or SNAPSHOT are not a valid object types for this function):

SEQUENCE PROCEDURE

INDEX FUNCTION

TABLE PACKAGE

VIEW PACKAGE BODY

SYNONYM TRIGGER 

Exceptions

Table 8-249 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 8-250 CREATE_OBJECT_FROM_EXISTING Function Returns
Return Value  Description 

<system-generated number

System-generated number used internally by Oracle. 


Prev Up Next
Oracle
Copyright © 1999 Oracle Corporation.

All Rights Reserved.

Library

Product

Contents

Index