Reader small image

You're reading from  Oracle Advanced PL/SQL Developer Professional Guide

Product typeBook
Published inMay 2012
Reading LevelExpert
PublisherPackt
ISBN-139781849687225
Edition1st Edition
Languages
Right arrow
Author (1)
Saurabh K. Gupta
Saurabh K. Gupta
author image
Saurabh K. Gupta

Saurabh K. Gupta is a seasoned database technologist with extensive experience in designing high performance and highly available database applications. His technology focus has been centered around Oracle Database architecture, Oracle Cloud platform, Database In-Memory, Database Consolidation, Multitenant, Exadata, Big Data, and Hadoop. He has authored the first edition of this book. He is an active speaker at technical conferences from Oracle Technology Network, IOUG Collaborate'15, AIOUG Sangam, and Tech Days. Connect with him on his twitter handle (or SAURABHKG) or through his technical blog www.sbhoracle. wordpress.com, with comments, suggestions, and feedback regarding this book.
Read more about Saurabh K. Gupta

Right arrow

Reviewing Oracle-supplied packages


Oracle-supplied packages are provided by the Oracle server and inbuilt in the database as a wrapper code. These packages not only facilitate the database programmers to work on extended functionalities but also reduce writing extensive and complex code. Use of Oracle-supplied API is always recommended as it improves the code standardization, too.

The scripts for these packages are available in the $ORACLE_HOME\RDBMS\ADMIN\ folder. All packages reside on the database server. Public synonyms are available for these packages so that these packages are accessible to all users. Until Oracle 11g, more than 1000 packages were available and this count tends to increase with every database release.

Some of the important packages are listed as follows:

  • DBMS_ALERT: This package is used for notification of database events

  • DBMS_LOCK: This package is used for managing the lock operations (lock, conversion, release) in PL/SQL applications

  • DBMS_SESSION: This package is used to set session level preferences from PL/SQL programs (similar to ALTER SESSION)

  • DBMS_OUTPUT: This package is one of the most frequently used built ins for buffering of data messages and display debug information

  • DBMS_HTTP: This package is used for HTTP callouts

  • UTL_FILE: This package is used for reading, writing and other file operations on the server

  • UTL_MAIL: This package is used to compose and send mails

  • DBMS_SCHEDULER: This package is used for scheduling execution of stored procedures at a given time

Based on the objective achieved, the packages can be categorized as follows:

  • Standard application development: DBMS_OUTPUT is the most frequently used package to display the required text. It is used for tracing and debugging purposes. Accessing and writing OS files was made possible through UTL_FILE. Similarly, system dependent binary files are accessed through the DBMS_LOB package.

The Oracle supplied packages often try to access SQL features which is their other big advantage.

  • General usage and application administration: The Oracle server has many packages to monitor the applications and users. Stats generation, load history, and space management are the key objectives accomplished by these packages

  • Internal support packages: Oracle maintains these packages for its own use.

  • Transaction processing packages: Oracle provides utility packages which enables the monitoring of transaction stages. Though they are rarely used, but could efficiently ensure transparent and smooth transactions. For example, DBMS_TRANSACTION.

Among these categories, standard application development packages are the most frequently used ones.

Previous PageNext Page
You have been reading a chapter from
Oracle Advanced PL/SQL Developer Professional Guide
Published in: May 2012Publisher: PacktISBN-13: 9781849687225
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
undefined
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at $15.99/month. Cancel anytime

Author (1)

author image
Saurabh K. Gupta

Saurabh K. Gupta is a seasoned database technologist with extensive experience in designing high performance and highly available database applications. His technology focus has been centered around Oracle Database architecture, Oracle Cloud platform, Database In-Memory, Database Consolidation, Multitenant, Exadata, Big Data, and Hadoop. He has authored the first edition of this book. He is an active speaker at technical conferences from Oracle Technology Network, IOUG Collaborate'15, AIOUG Sangam, and Tech Days. Connect with him on his twitter handle (or SAURABHKG) or through his technical blog www.sbhoracle. wordpress.com, with comments, suggestions, and feedback regarding this book.
Read more about Saurabh K. Gupta