The following is a selected list of available Oracle packages and a description of their purpose. This list does not include packages specifically related to database administration, security, moving data between databases, scheduling jobs within the database, queuing and other specialized optional packages.
Oracle supplied packages can be associated with various owner/schemas. The packages available vary by the database version, edition type (Standard, Enterprise) and options installed. To see the available Oracle installed packages owned by SYS in your installation, run the following query when logged in with a username (such as SYSTEM) that has permission to select the DBA_OBJECTS view.
Oracle supplied package specifications can be referenced the same way as user defined packages. From the SQL*Plus command line, use the describe command and from SQL Developer click on the Connection Navigator tree on the left hand side of the screen.
The following are a few examples of Oracle supplied packages that are commonly available and do not require special configuration or administrative prerequisites. The first of these will be of interest to PL/SQL developers interested in taking advantage of new language features but work in environments with a mixture of Oracle versions.
BEGIN $IF DBMS_DB_VERSION.VER_LE_10 $THEN dbms_output.put_line('version 10 and earlier'); $ELSIF DBMS_DB_VERSION.VER_LE_11 $THEN dbms_output.put_line('version 11'); $ELSE dbms_output.put_line('version 12 and later'); $END END; /
For the most part, PL/SQL is backwards compatible with previous versions of Oracle. If you write code that you only want to compile in certain versions of the database, the DBMS_DB_VERSION package is used to retrieve Oracle version numbers and other information required.