Oracle® Database Advanced Replication Management API Reference 10g Release 1 (10.1) Part Number B10733-01 |
|
|
View PDF |
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.
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);
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 21-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 |
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 => 'MATERIALIZED VIEW', new_ddl_text => templob); DBMS_LOB.FREETEMPORARY(templob); END; /