Oracle9i Supplied PL/SQL Packages and Types Reference Release 1 (9.0.1) Part Number A89852-02 |
|
DBMS_REPCAT_RGT, 11 of 33
This function adds object definitions to a target deployment template container. The specified object DDL is executed when the target deployment template is instantiated at the remote materialized view site. In addition to adding materialized views, this function can add tables, procedures, and other objects to your template. The number returned by this function is used internally by Oracle to manage deployment templates.
DBMS_REPCAT_RGT.CREATE_TEMPLATE_OBJECT ( refresh_template_name IN VARCHAR2, object_name IN VARCHAR2, object_type IN VARCHAR2, ddl_text IN CLOB, master_rollback_seg IN VARCHAR2 := NULL, flavor_id IN NUMBER := -1e-130) return NUMBER;
Exception | Description |
---|---|
miss_refresh_template |
Specified refresh template name is invalid or missing. Query the |
bad_object_type |
Object type is specified incorrectly. See Table 51-24 for a list of valid object types. |
dupl_template_object |
An object of the same name and type has already been added to the specified deployment template. |
Return Value | Description |
---|---|
<system-generated number> |
System-generated number used internally by Oracle. |
Because CREATE_TEMPLATE_OBJECT
utilizes a CLOB
, you must use the DBMS_LOB
package when using the CREATE_TEMPLATE_OBJECT
function. The following example illustrates how to use the DBMS_LOB
package with the CREATE_TEMPLATE_OBJECT
function:
DECLARE tempstring VARCHAR2(100); templob CLOB; a NUMBER; BEGIN DBMS_LOB.CREATETEMPORARY(templob, TRUE, DBMS_LOB.SESSION); tempstring := 'CREATE MATERIALIZED VIEW mview_sales AS SELECT * FROM sales WHERE salesperson = :salesid'; DBMS_LOB.WRITE(templob, length(tempstring), 1, tempstring); a := DBMS_REPCAT_RGT.CREATE_TEMPLATE_OBJECT( refresh_template_name => 'rgt_personnel', object_name => 'mview_sales', object_type => 'SNAPSHOT', ddl_text => templob, master_rollback_seg => 'RBS'); DBMS_LOB.FREETEMPORARY(templob); END; /
|
Copyright © 1996-2001, Oracle Corporation. All Rights Reserved. |
|