Skip Headers
Oracle® Application Server mod_plsql User's Guide
10g Release 2 (10.1.2)
B14010-02
  Go To Documentation Library
Home
Go To Product List
Solution Area
Go To Table Of Contents
Contents
Go To Index
Index

Previous
Previous
Next
Next
 

1 Configuring mod_plsql

This chapter describes how you can set up and use mod_plsql. It contains the following sections:

1.1 Verifying Requirements

Before you run mod_plsql, you must satisfy the following requirements:

1.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 instance 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.

  1. Navigate to the directory where the owaload.sql file is located. This directory is ORACLE_HOME/Apache/modpsql/owa.

  2. Using SQL*Plus, login to the Oracle Database as the SYS user.

  3. You can check the version of the OWA packages currently installed by running the following query:

    select owa_util.get_version from dual;
    
    
  4. At the SQL prompt, run the following command:

    @owaload.sql log_file  
    
    

    Table 1-1 Installing Required Packages Parameters

    Elements Description

    owaload.sql

    Installs the PL/SQL Web Toolkit packages into the SYS schema. It also creates public synonyms and makes the packages public so that all users in the database have access to them. Therefore, only one installation for each database is needed.

    log_file

    The installation log file. Make sure that you have write permissions to create the log file


  5. Scan the log file for any errors.


    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.


  6. Perform a manual recompile.


    Note:

    Installing the OWA packages might invalidate 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 10.1.2.0.0 or later.

  7. Note that public access is now granted to:

    • OWA_CUSTOM

    • OWA

    • HTF

    • HTP

    • OWA_COOKIE

    • OWA_IMAGE

    • OWA_OPT_LOCK

    • OWA_PATTERN

    • OWA_SEC

    • OWA_TEXT

    • OWA_UTIL

    • OWA_CACHE

    • WPG_DOCLOAD

    • OWA_MATCH

  8. Note also that the following public synonyms are created:

    • 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

    • OWA_MATCH for OWA_MATCH

1.3 Accessing mod_plsql Configuration Pages

You can use the Application Server Control Console to configure, as well as monitor, mod_plsql. The mod_plsql Services page (shown in Figure 1-1) is accessible through the Oracle HTTP Server component. From this page you can configure DAD information and the cache settings.

Figure 1-1 Application Server Control Console - mod_plsql Services Page

Description of Figure 1-1  follows
Description of "Figure 1-1 Application Server Control Console - mod_plsql Services Page"

Use the following page sections to monitor and configure mod_plsql:

Configuring mod_plsql Through Oracle Enterprise Manager 10g

To display the mod_plsql Services page (shown in Figure 1-1):

  1. Access the Application Server Control Console by entering the following URL in your Web browser

    http://<hostname>:<port_number>

    For example, http://mgmthost.company.com:1810. The port is typically on 1810, however the possible port range for the Application Server Control Console varies upwards in increments of 1.

  2. In Application Server Control Console, navigate to the Oracle Application Server home page where Oracle HTTP Server and mod_plsql are installed.

  3. Click HTTP_Server in the System Components table to navigate to the Oracle HTTP Server home page.

  4. Click Administration, and then PL/SQL Properties.

    This displays the mod_plsql Services page shown in Figure 1-1. Click the Help link for more information.

1.4 Configuring mod_plsql for Use with OracleAS Portal 3.0.9

To run an Oracle Application Server middle tier against an OracleAS Portal 3.0.9 repository, you need to perform the following steps:

  1. Use Oracle Enterprise Manager 10g to create two Portal-style DADs: one for the 3.0.9 OracleAS Portal repository and another for the 3.0.9 Oracle Application Server Single Sign-On repository.


    Note:

    The DAD name is case-sensitive in Oracle Application Server. You must ensure that the DAD is created with the same case as it exists for OracleAS Portal version 3.0.9. Mostly, the DAD name is all in lowercase. To see a version 3.0.9 DAD name, view the file OLD_HOME/Apache/modplsql/cfg/wdbsvr.app.


  2. For each DAD, edit the DAD configuration and set PlsqlCompatibilityMode to 1. To edit the DAD configuration:

    1. Edit the file ORACLE_HOME/Apache/modplsql/conf/dads.conf.

    2. Locate the DADs used to connect to the version 3.0.9 OracleAS Portal and OracleAS Single Sign-On repositories.

    3. Add the following line in the DADs:

      PlsqlCompatibilityMode  1
      
      
    4. Run the following command:

      ORACLE_HOME/dcm/bin/dcmctl updateConfig -ct ohs
      
      
    5. Run the following command to restart Oracle HTTP Server:

      ORACLE_HOME/opmn/bin/opmnctl restartproc type=ohs
      
      

      Note:

      • If PlsqlCompatibilityMode is not set for a DAD which is used to access an OracleAS Portal version 3.0.9 repository, you will be unable to download documents that have spaces in the document name, and reside in the Portal document table. Access to such documents will result in the error: HTTP 404 - File not found.

      • If PlsqlCompatibilityMode is set for a DAD which is used to access an OracleAS Portal repository of version 9.0.x or later, you will be unable to download documents that have spaces or plus (+) signs in the document name, and reside in the Portal document table. Access to such documents will result in the error: HTTP 404 - File not found.



      Warning:

      Once the back-end OracleAS Portal repository is upgraded to version 9.0.x or later, you should remove the PlsqlCompatibilityMode flag from the DAD. See the section "Removing the PlsqlCompatibilityMode Flag from a DAD" for detailed instructions.


Removing the PlsqlCompatibilityMode Flag from a DAD

To remove the PlsqlCompatibilityMode flag from a DAD, after the back-end OracleAS Portal repository is upgraded to version 9.0.x or later, perform the following steps:

  1. Edit the file ORACLE_HOME/Apache/modplsql/conf/dads.conf.

  2. Locate the DADs used to connect to the version 9.0.x or later OracleAS Portal and Oracle Application Server Single Sign-On repositories.

  3. Remove the following line in the DAD:

    PlsqlCompatibilityMode  1
    
    
  4. Run the following command:

    ORACLE_HOME/dcm/bin/dcmctl updateConfig -ct ohs
    
    
  5. Run the following command to restart Oracle HTTP Server:

    ORACLE_HOME/opmn/bin/opmnctl restartproc type=ohs
    
    

1.5 Creating a DAD for Your PL/SQL Application

To access a Web-enabled PL/SQL application, you must first 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 for 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.

1.6 Diagnostic Output of mod_plsql

mod_plsql is an Oracle HTTP Server module that enables you to invoke PL/SQL applications over HTTP. As mod_plsql is an Oracle HTTP Server module, its logging is performed through Oracle HTTP Server.

Logging is controlled by the LogLevel parameter found in the configuration file httpd.conf, which is usually located at:

ORACLE_HOME/Apache/Apache/conf

Valid values for LogLevel are the following:

The values build incrementally. For example, if LogLevel is set to notice, then notice, warn, error, crit, alert, and emerg messages are recorded. If the value of LogLevel is altered, then Oracle HTTP Server must be restarted for this change to take effect.

mod_plsql Log File Contents

The location of the mod_plsql diagnostic information is dictated by the Oracle HTTP Server parameter called ErrorLog found in the httpd.conf file. Although this parameter is called ErrorLog, the file it describes can contain more than just error messages. A typical value for the ErrorLog parameter is the following:

ORACLE_HOME/Apache/Apache/logs/error_log

Two types of mod_plsql messages appear in the Oracle HTTP Server error log:

Standard mod_plsql Messages

The following is an example of a standard mod_plsql message found in the Oracle HTTP Server error log:

[Thu Jun 30 08:34:20 2005] [warn] mod_plsql: 'PlsqlCacheCleanupSize' is deprecated.

The content of the standard mod_plsql message is as follows: