 |
|
Oracle Scripting
Oracle Tips by Burleson
|
The oldest form of system
automation involves the use of scripts and other mechanisms to batch
jobs. Every major operating system provides some capacity to develop
scripts, from the simple DOS batch programming to the potentially
unlimited applications of awk, sed, and perl on Unix systems. On
Oracle systems, the developer can utilize both SQL*Plus and PL/SQL in
addition to any scripting languages supported by the operating system.
Within the context of an
Oracle database, scripting usually follows one of several predominant
types. More detailed information about the development of scripts
using SQL and PL/SQL can be found in Chapter 3.
Stored PL/SQL Objects
Stored PL/SQL allows you, the application developer, to write
code once and enforce your business logic inside the database. This
provides a tremendous advantage in an environment where business rules
are regularly subject to change. The modular nature of these objects
allows business rules to be enabled and disabled quite easily.
All stored PL/SQL objects have certain common traits, including:
-
Their source code is stored within the
ALL_SOURCE view (with the exception of database triggers, whose
source code is stored in the ALL_TRIGGERS view).
-
They execute with the authorities of the user
who created the object.
-
They incorporate both SQL and PL/SQL
statements.
-
Their access is controlled like all other
objects in the database. The ability of an individual user to
execute a specific stored object (or all stored objects) must be
granted to a user.
This is an
excerpt from the book "High Performance Oracle Database
Automation" by Jonathan Ingram and Donald K. Burleson, Series
Editor. |