Oracle9i Supplied PL/SQL Packages and Types Reference
Release 1 (9.0.1)

Part Number A89852-02
Go To Documentation Library
Home
Go To Product List
Book List
Go To Table Of Contents
Contents
Go To Index
Index

Master Index

Feedback

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

DBMS_REPCAT_RGT, 3 of 33


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 re-instantiate 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 51-4 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.

Note: Do not set this parameter unless directed to do so by Oracle Support Services. 

Exceptions

Table 51-5 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 Support Services. 

bad_object_type
 

Object type is specified incorrectly. See Table 51-4 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 MATERIALIZED VIEW mview_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 => 'MVIEW_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-2001, Oracle Corporation.

All Rights Reserved.
Go To Documentation Library
Home
Go To Product List
Book List
Go To Table Of Contents
Contents
Go To Index
Index

Master Index

Feedback