1.5. Types of Packages

The different types of packages are determined by who wrote them and by where they lay in the layers of PL/SQL code. As we mentioned earlier, the lowest-level and therefore most broadly available packages are the builtin packages, provided by Oracle Corporation. The next level of packages are the prebuilt packages, written by a third party and made available to you for inclusion in your applications. Finally, there are packages you build yourself.

1.5.1. Builtin Packages

Table 1.1 shows a partial list of builtin packages provided by Oracle Corporation. Unless otherwise noted, these packages are available in PL/SQL Release 2.1 and beyond. Most of these packages are installed by default when you create a database instance. In some cases, you may have to grant execute privileges on specific packages (such as DBMS_LOCK and DBMS_SQL) in order to make them available to your user community.

Table 1.1. Some of the Builtin Packages Stored in the Oracle Database
Package NameDescription
DBMS_ALERTProvides support for notification of database events on an asynchronous basis. Registers a process with an alert and then waits for a signal from that alert.
DBMS_DDLProvides a programmatic access to some of the SQL DDL statements.
DBMS_JOBUsed to submit and manage regularly scheduled jobs for execution inside the database.
DBMS_LOCKAllows users to create their own locks using the Oracle Lock Management (OLM) services in the database.
DBMS_MAILOffers an interface to Oracle ...

Get Advanced Oracle PL/SQL Programming with 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.