2 Configuring mod_plsql
This chapter describes how you can set
up and use mod_plsql. It contains the following sections:
2.1 Verifying Requirements
Before you ru
n mod_plsql, you must satisfy the following requirements:
- You
must have a SYS user password on the database where you plan to load PL/SQL Web Toolkit packages required by mod_plsql.
- The database to which you plan to connect mod_plsql must be up and running.
- Oracle HTTP Server mod_plsql ships with OWA package version 9.0.4.0.1. It is recommended that
the OWA packages installed in the database are at least version 9.0.4.0.1.
2.2 Installing Required Packages
After installation, if you need to use Oracle HTTP Server mod_plsql with a database that is not
shipped with the product, you must manually install additional required packages using the owaload.sql script.
Note:
Even if a full database export is made with the Export utility you still must reinstall mod_plsql in the new target instanc
e by running the OWALOAD.SQL script as SYS. Objects in SYS are not imported with the Import/Export mechanism, and the PL
/SQL toolkit has to be installed in SYS.
|
- Navigate to the directory where the
owaload.sql file is located. This directory is ORA
CLE_HOME/Apache/modpsql/owa.
- Using SQL*Plus, l
ogin to the Oracle database as the SYS user.
- You can check the version
of the OWA packages currently installed by running the following query:
select owa_util.get_v
ersion from dual;
- If the query succ
eeds, but shows a version less than 9.0.4.0.1, it is recommended that you install the newer OWA packages.
- If the query fails, you either do not have the OWA packages installed, or are running a very old version
of OWA packages, and it is recommended that you install, or upgrade to the new OWA packages.
- At a SQL prompt, run the following command:
@o
waload.sql log_file
Table 2-1 Installing Required Packages Parameters
- Scan the log file for any errors.
p>
Note:
The owaload script checks the existing version of the OWA packages in the database and installs a
new version only if:
- No OWA package exists or,
- Older OWA packages were detected. If your database already has the latest OWA packages or has a
newer version installed, the
owaload script does nothing and reports this in the log file.
|
- Do a manual recompile.
Note:
Installing the OWA packages invalidates all dependent objects. These packages automatically recompile on first access,
but a manual recompile is recommended after the reinstallation.
|
After the install, check the version of the OWA packages by running "Select owa_util.get_version from dual;". Confirm
that the version shown is 9.0.4.0.1 or later.
- Note that public acc
ess is now granted to:
- OWA_CUSTOM
- OWA
- HTF
- HTP
- OWA_COOKIE
- OWA_IMAGE
- OWA_OPT_LOCK
- OWA_PATTERN
- OWA_SEC
- OW
A_TEXT
- OWA_UTIL
- OWA_CAC
HE
- WPG_DOCLOAD
- Note also that the following public synonyms are created:
-
a>OWA_CUSTOM for OWA_CUSTOM
- OWA_GLOBAL for OWA_CUSTOM
- OWA for OWA
- HTF for HTF
- HTP for HTP
- OWA_COOKIE for OWA_COOKIE
- OWA_IMAGE for OWA_IMAGE
- OWA_OPT
_LOCK for OWA_OPT_LOCK
- OWA_PATTERN for OWA_PATTERN
- OWA_SEC for OWA_SEC
- OWA_TEXT for OWA_TEXT
- OWA_UTIL for OWA_UTIL
- OWA_INIT
for OWA_CUSTOM
- OWA_CACHE for OWA_CACHE
- WPG_DOCLOAD for WPG_DOCLOAD
a>
2.3 Creating a DAD for Your PL/SQL
Application
To access a Web-enabled PL/SQL application, you must fi
rst configure a PL/SQL Database Access Descriptor (DAD) for mod_plsql. A DAD is a set of values that specifies how mod_plsql connects
to a database server to fulfill an HTTP request. Besides the connection details, a DAD contains important configuration parameters f
or various operations in the database, and for mod_plsql in general. For detailed instructions, refer to the mod_plsql section in the
Oracle HTTP Server Administrator's Guide.