Oracle9i Replication Management API Reference
Release 1 (9.0.1)

Part Number A87502-01
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

Replication Catalog Views, 3 of 81


ALL_REPCAT_TEMPLATE_OBJECTS

Contains the individual object definitions that are contained in each deployment template accessible to the current user. Individual objects are added to a template by specifying the target template in REFRESH_TEMPLATE_NAME.

DDL_TEXT can contain variables to create parameterized templates. Variables are created by placing a colon (:) at the beginning of the variable name (for example, :region). Templates that use parameters allow for greater flexibility during the template instantiation process (that is, in defining data sets specific for a materialized view site).

When the object is added to the template, the specified DDL is examined and if any parameters have been defined, Oracle automatically adds the parameter to the ALL_REPCAT_TEMPLATE_PARMS view.

Related Views:

Because the DDL_TEXT column is defined as a CLOB, you receive an error if you simply try to perform a SELECT on the ALL_REPCAT_TEMPLATE_OBJECTS view. If you do not need to see the object DDL, then use the following select statement (be sure to exclude the DDL_TEXT parameter):

SELECT REFRESH_TEMPLATE_NAME, OBJECT_NAME, OBJECT_TYPE, MASTER_ROLLBACK_SEG, 
FLAVOR_ID FROM DBA_REPCAT_TEMPLATE_OBJECTS;

The following script uses cursors and the DBMS_LOB package to view the entire contents of the ALL_REPCAT_TEMPLATE_OBJECTS view. Use this script to view the entire contents of the ALL_REPCAT_TEMPLATE_OBJECTS view, including the DDL_TEXT column:

SET SERVEROUTPUT ON

DECLARE
  CURSOR mycursor IS
        SELECT REFRESH_TEMPLATE_NAME, OBJECT_NAME, OBJECT_TYPE, DDL_TEXT,
          MASTER_ROLLBACK_SEG, FLAVOR_ID
          FROM DBA_REPCAT_TEMPLATE_OBJECTS;
  tempstring VARCHAR2(1000);
  len NUMBER;
BEGIN
  FOR myrec IN mycursor LOOP
        len := DBMS_LOB.GETLENGTH(myrec.ddl_text);
        DBMS_LOB.READ(myrec.ddl_text, len, 1, tempstring);
        DBMS_OUTPUT.PUT_LINE(myrec.refresh_template_name||' '||
          myrec.object_name||' '||myrec.object_type||' '||tempstring||' '||
          myrec.master_rollback_seg||' '||myrec.flavor_id);
  END LOOP;
END;
/

See Also:

Oracle9i Application Developer's Guide - Fundamentals for more information on using cursors. Also, see Oracle9i Application Developer's Guide - Large Objects (LOBs) for more information on using the DBMS_LOB package and LOBs in general. 


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