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_METADATA , 2 of 11


OPEN Procedure

OPEN specifies the type of object to be retrieved, the version of its metadata, and the object model. The return value is an opaque context handle for the set of objects to be used in subsequent calls.

Syntax

FUNCTION open
( object_type  IN VARCHAR2,
    version IN VARCHAR2 DEFAULT 'COMPATIBLE',
    model IN VARCHAR2 DEFAULT 'ORACLE', 
) RETURN NUMBER;

Parameters

Table 28-2 Open() Parameters
Parameter  Description 
object_type
 

The type of object to be retrieved. Table 28-3 lists the valid type names and their meanings. These object types will be supported for the ORACLE model of metadata (see model in this table) in Oracle9i. Future models may support a different set of object types.

Most objects have names, belong to schemas, and are uniquely identified within their namespace by their schema and name. Some objects (for example, outlines) are not schema objects; these are marked with an "N" in Table 28-3. Some objects (for example, system privilege grants) do not have names; see the "Notes" column in Table 28-3. These differences are relevant when choosing object selection criteria. See "SET_FILTER Procedure" for more information. 

version
 

The version of metadata to be extracted. Database objects or attributes that are incompatible with the version will not be extracted. Legal values for this parameter are:

COMPATIBLE (default)--the version of the metadata corresponds to the database compatibility level. Note that database compatibility must be set to 9.0.0 or higher.

LATEST--the version of the metadata corresponds to the database version.

A specific database version, for example, 9.0.0.  

model
 

Specifies which view to use, since the API can support multiple views on the metadata. Only the ORACLE model is supported in Oracle9i


Table 28-3 DBMS_METADATA: Object Types
Type Name  Meaning  Schema Object  Notes 

FUNCTION 

stored functions 

 

 

INDEX 

indexes 

 

 

INDEXTYPE 

indextypes 

 

 

OBJECT_GRANT 

object grants 

 

Not a named object. 

OPERATOR 

operators 

 

 

OUTLINE 

stored outlines 

 

PACKAGE 

stored packages 

 

By default, both package specification and package body are retrieved. See "SET_FILTER Procedure"

PROCEDURE 

stored procedures 

 

 

SYNONYM 

synonyms 

See notes. 

Private synonyms are schema objects. Public synonyms are not, but for the purposes of this API, their schema name is PUBLIC. The name of a synonym is considered to be the synonym itself. For example, in CREATE PUBLIC SYNONYM FOO FOR BAR, the resultant object is considered to have name FOO and schema PUBLIC

SYSTEM_GRANT 

system privilege grants 

Not a named object. 

TABLE 

tables 

 

 

TRIGGER 

triggers 

 

 

TYPE 

user-defined types 

 

By default, both type and type body are retrieved. See "SET_FILTER Procedure"

VIEW 

views 

 

 

Returns

An opaque handle to the class of objects. This handle is used as input to SET_FILTER, SET_COUNT, ADD_TRANSFORM, GET_QUERY, SET_PARSE_ITEM, FETCH_xxx, and CLOSE.

Exceptions


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