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 ... |
Get Oracle Built-in Packages now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.