Results for DBMS_METADATA


1 to 20 of 93 results. Prev  Next
Results per page:  20 |  40  | 60


Supplied PL/SQL Packages and Types Reference, 9i Release 2 (9.2.0.2)

DBMS_METADATA, 1 of 2

30 DBMS_METADATAWith DBMS_METADATA you can retrieve complete database object definitions (metadata) from the … externally. DBMS_METADATA provides the following retrieval interfaces: For programmatic use: OPEN … chapter discusses the following topics: Summary of DBMS_METADATA Subprograms Copyright © 2000, 2002 Oracle

Supplied PL/SQL Packages and Types Reference, 9i Release 2 (9.2.0.2)

DBMS_METADATA, 2 of 2

Summary of DBMS_METADATA SubprogramsTable 30-1 provides a summary of DBMS_METADATA subprograms. Table 30-1  DBMS_METADATA Subprograms

Supplied PL/SQL Packages and Types Reference, 9i Release 2 (9.2.0.2)

DBMS_METADATA, 2 of 2

ExceptionsINVALID_ARGVAL. A NULL or invalid value was supplied for an input parameter. The error message text identifies the parameter. INVALID_OPERATION. ADD_TRANSFORM was called after the first call to FETCH_xxx for the OPEN context. After the first call to FETCH_xxx is made, no further calls to ADD_TRANSFORM for the current OPEN context are permitted.

Supplied PL/SQL Packages and Types Reference, 9i Release 2 (9.2.0.2)

DBMS_METADATA, 2 of 2

ExceptionsINVALID_ARGVAL. A NULL or invalid value was supplied for an input parameter. The error message text identifies the parameter. INVALID_OPERATION. SET_TRANSFORM_PARAM was called after the first call to FETCH_xxx for the OPEN context. After the first call to FETCH_xxx is made, no further calls to SET_TRANSFORM_PARAM are permitted. INCONSISTENT_ARGS. The transform parameter name is not valid for the object

Supplied PL/SQL Packages and Types Reference, 9i Release 2 (9.2.0.2)

DBMS_METADATA, 2 of 2

ReturnsThe metadata for the objects or NULL if all objects have been returned.

Supplied PL/SQL Packages and Types Reference, 9i Release 2 (9.2.0.2)

DBMS_METADATA, 2 of 2

ParametersTable 30-14 describes the parameters for the CLOSE procedure. Table 30-14  CLOSE Parameters Parameter Description handle The handle returned from OPEN.

Supplied PL/SQL Packages and Types Reference, 9i Release 2 (9.2.0.2)

DBMS_METADATA, 2 of 2

SyntaxDBMS_METADATA.GET_DEPENDENT_XML ( object_type IN VARCHAR2, base_object_name IN VARCHAR2, base_object_schema IN VARCHAR2 DEFAULT NULL, version IN VARCHAR2 DEFAULT 'COMPATIBLE', model IN VARCHAR2 DEFAULT 'ORACLE', transform IN VARCHAR2 DEFAULT NULL, object_count IN NUMBER DEFAULT 10000) RETURN CLOB; DBMS_METADATA.GET_DEPENDENT_DDL ( object_type IN VARCHAR2, base_object_name IN VARCHAR2, base_object_schema

Supplied PL/SQL Packages and Types Reference, 9i Release 2 (9.2.0.2)

DBMS_METADATA, 2 of 2

ReturnsThe metadata for the objects as XML or DDL.

Supplied PL/SQL Packages and Types Reference, 9i Release 2 (9.2.0.2)

DBMS_METADATA, 2 of 2

Usage NotesThe GET_DEPENDENT_xxx functions allow you to fetch metadata for dependent objects with a single call. For some object types, you can use more than one function. For example, you can use GET_xxx to fetch an index by its name or you can use GET_DEPENDENT_xxx to fetch the same index by specifying the table on which it is defined. An arbitrary number of dependent objects may match the input criteria for

Supplied PL/SQL Packages and Types Reference, 9i Release 2 (9.2.0.2)

DBMS_METADATA, 2 of 2

ExceptionsINVALID_ARGVAL. A NULL or invalid value was supplied for an input parameter. The error message text identifies the parameter. INVALID_OBJECT_PARAM. The version or model parameter was not valid for the object_type.

Supplied PL/SQL Packages and Types Reference, 9i Release 2 (9.2.0.2)

DBMS_METADATA, 2 of 2

SyntaxDBMS_METADATA.SET_COUNT ( handle IN NUMBER, value IN NUMBER);

Supplied PL/SQL Packages and Types Reference, 9i Release 2 (9.2.0.2)

DBMS_METADATA, 2 of 2

ExceptionsINVALID_ARGVAL. A NULL or invalid value was supplied for an input parameter. The error message text identifies the parameter. INVALID_OPERATION. SET_COUNT was called after the first call to FETCH_xxx for the OPEN context. After the first call to FETCH_xxx is made, no further calls to SET_COUNT for the current OPEN context are permitted.

Supplied PL/SQL Packages and Types Reference, 9i Release 2 (9.2.0.2)

DBMS_METADATA, 2 of 2

SyntaxDBMS_METADATA.SET_PARSE_ITEM ( handle IN NUMBER, name IN VARCHAR2);

Supplied PL/SQL Packages and Types Reference, 9i Release 2 (9.2.0.2)

DBMS_METADATA, 2 of 2

SyntaxDBMS_METADATA.ADD_TRANSFORM ( handle IN NUMBER, name IN VARCHAR2, encoding IN VARCHAR2 DEFAULT NULL) RETURN NUMBER;

Supplied PL/SQL Packages and Types Reference, 9i Release 2 (9.2.0.2)

DBMS_METADATA, 2 of 2

ParametersTable 30-11 describes the parameters for the SET_TRANSFORM_PARAM procedure. Table 30-11  SET_TRANSFORM_PARAM Parameters Parameters Description transform_handle Either (1) the handle returned from ADD_TRANSFORM, or (2) the enumerated constant SESSION_TRANSFORM that designates the DDL transform for the whole session. Note that the handle returned by OPEN is not a valid transform handle. name The name

Supplied PL/SQL Packages and Types Reference, 9i Release 2 (9.2.0.2)

DBMS_METADATA, 2 of 2

FETCH_xxx ProcedureFETCH_xxx returns metadata for objects meeting the criteria established by OPEN, SET_FILTER, SET_COUNT, ADD_TRANSFORM, and so on. See \"Usage Notes\" for the variants.

Supplied PL/SQL Packages and Types Reference, 9i Release 2 (9.2.0.2)

DBMS_METADATA, 2 of 2

SyntaxThe FETCH functions and procedures are: DBMS_METADATA.FETCH_XML ( handle IN NUMBER) RETURN sys.XMLType; See Also: Oracle9i XML Database Developer's Guide - Oracle XML DB for a description of XMLType DBMS_METADATA.FETCH_DDL ( handle IN NUMBER) RETURN sys.ku$_ddls; The following types comprise the return nested table type sys.ku$_ddls: TYPE sys.ku$_parsed_item AS OBJECT ( item VARCHAR2(30), value VARCHAR2(4000),

Supplied PL/SQL Packages and Types Reference, 9i Release 2 (9.2.0.2)

DBMS_METADATA, 2 of 2

ExceptionsINVALID_ARGVAL. The value for the handle parameter is NULL or invalid.

Supplied PL/SQL Packages and Types Reference, 9i Release 2 (9.2.0.2)

DBMS_METADATA, 2 of 2

Example: Retrieving Payroll Tables and their Indexes as DDLThis example retrieves the creation DDL for all tables in the current schema whose names begin with PAYROLL. For each table it also returns the creation DDL for the indexes defined on the table. The returned DDL is written to an output file. CREATE OR REPLACE PACKAGE dbms_metadata_example AS PROCEDURE get_payroll_tables; END; / CREATE OR REPLACE PACKAGE BODY dbms_metadata_example AS -- Global Variables

Supplied PL/SQL Packages and Types Reference, 9i Release 2 (9.2.0.2)

DBMS_METADATA, 2 of 2

Example: Fetch the DDL For All Object Grants On SCOTT.EMPSQL> SET PAGESIZE 0 SQL> SET LONG 90000 SQL> SELECT DBMS_METADATA.GET_DEPENDENT_DDL('OBJECT_GRANT', > 'EMP', 'SCOTT') FROM DUAL;





Was this page helpful?

Integrated Cloud Applications & Platform Services