Oracle8i Replication Management API Reference
Release 2 (8.1.6)

Part Number A76958-01

Library

Product

Contents

Index

Go to previous page Go to beginning of chapter Go to next page

Replication Management API Reference, 128 of 179


ALTER_TEMPLATE_OBJECT procedure

This procedure alters objects that have been added to a specified deployment template. The most common changes are altering the object DDL and assigning the object to a different deployment template.

Changes made to the template are reflected only at new sites instantiating the deployment template. Remote sites that have already instantiated the template must reinstantiate the deployment template to apply the changes.

Syntax

DBMS_REPCAT_RGT.ALTER_TEMPLATE_OBJECT (
   refresh_template_name       IN   VARCHAR2, 
   object_name                 IN   VARCHAR2,
   object_type                 IN   VARCHAR2,
   new_refresh_template_name   IN   VARCHAR2 := '-',
   new_object_name             IN   VARCHAR2 := '-',
   new_object_type             IN   VARCHAR2 := '-',
   new_ddl_text                IN   CLOB  := '-',
   new_master_rollback_seg     IN   VARCHAR2 := '-',
   new_flavor_id               IN   NUMBER := -1e-130);

Parameters

Table 8-234 ALTER_TEMPLATE_OBJECT Procedure Parameters
Parameter  Description 
refresh_template_
name
 

Deployment template name that contains the object that you want to alter. 

object_name
 

Name of the template object that you want to alter. 

object_type
 

Type of object that you want to alter. 

new_refresh_
template_name
 

Name of the new deployment template to which you want to reassign this object. Do not specify a value to keep the object assigned to the current deployment template. 

new_object_name
 

New name of the template object. Do not specify a value to keep the current object name. 

new_object_type
 

If specified, then the new object type. Objects of the following type may be specified:

SNAPSHOT PROCEDURE

INDEX FUNCTION

TABLE PACKAGE

VIEW PACKAGE BODY

SYNONYM TRIGGER

SEQUENCE DATABASE LINK 

new_ddl_text
 

New object DDL for specified object. Do not specify any new DDL text to keep the current object DDL. 

new_master_rollback_
seg
 

New master rollback segment for specified object. Do not specify a value to keep the current rollback segment. 

new_flavor_id
 

This parameter is for internal use only. Do not set this parameter unless directed to do so by Oracle Worldwide Support. 

Exceptions

Table 8-235 ALTER_TEMPLATE_OBJECT Procedure Exceptions
Exception  Description 
miss_refresh_
template
 

Deployment template name specified is invalid or does not exist. 

miss_flavor_id
 

If you receive this exception, contact Oracle Worldwide Support. 

bad_object_type
 

Object type is specified incorrectly. See Table 8-234 for a list of valid object types. 

miss_template_object
 

Template object name specified is invalid or does not exist. 

dupl_template_object
 

New template name specified in the new_refresh_template_name parameter already exists. 

Usage Notes

Because the ALTER_TEMPLATE_OBJECT procedure utilizes a CLOB, you must use the DBMS_LOB package when using the ALTER_TEMPLATE_OBJECT procedure. The following example illustrates how to use the DBMS_LOB package with the ALTER_TEMPLATE_OBJECT procedure:

DECLARE
   tempstring VARCHAR2(100);
   templob CLOB;
BEGIN
   DBMS_LOB.CREATETEMPORARY(templob, TRUE, DBMS_LOB.SESSION);
   tempstring := 'CREATE SNAPSHOT snap_sales AS SELECT *
      FROM sales WHERE salesperson = :salesid and region_id = :region';
   DBMS_LOB.WRITE(templob, length(tempstring), 1, tempstring);
   DBMS_REPCAT_RGT.ALTER_TEMPLATE_OBJECT(
      refresh_template_name => 'rgt_personnel',
      object_name => 'SNAP_SALES',
      object_type => 'SNAPSHOT',
      new_ddl_text => templob);
   DBMS_LOB.FREETEMPORARY(templob);
END;
/


Go to previous page Go to beginning of chapter Go to next page
Oracle
Copyright © 1996-2000, Oracle Corporation.

All Rights Reserved.

Library

Product

Contents

Index