O'Reilly logo

Oracle Built-in Packages by John Beresniewicz, Charles Dye, Steven Feuerstein

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

DBMS_DDL: Compiling and Analyzing Objects

The DBMS_DDL package provides access from within PL/SQL to two DDL (Data Definition Language) statements. It also offers special administrative services that are not available through DDL syntax (Oracle8 only).

Getting Started with DBMS_DDL

This DBMS_DDL package is created when the Oracle database is installed. The dbmsdesc.sql script (found in the built-in packages source code directory, as described in Chapter 1) contains the source code for this package’s specification. This script is called by catproc.sql, which is normally run immediately after database creation. The script creates the public synonym DBMS.DDL for the package and grants EXECUTE privilege on the package to public. All Oracle users can reference and make use of this package.

DBMS_DDL programs “run as user,” which means that they execute with the privileges of the user who calls that program.

Note

All programs in DBMS_DDL first commit the current transaction, then perform the specified operation. When the operation is completed, another commit is performed.

DBMS_DDL programs

Table 10-3 shows the programs defined in DBMS_DDL.

Table 10-3. DBMS_DDL Programs

Name

Description

Use in SQL

ALTER_COMPILE

Compiles the specified PL/SQL object.

No

ANALYZE_OBJECT

Computes statistics for the specified database object.

No

REFERENCEABLE

Makes the specified table referenceable for object identifiers (OIDs) in existing data structures. Available in Oracle8 only.

No

ALTER_TABLE_NOT_REFERENCEABLE ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required