Oracle9i Application Server Using the PL/SQL Gateway
Release 1 (v1.0.2.2)

Part Number A90099-01

Contents

Index

Go to previous page Go to next page

4
Configuring the PL/SQL Gateway

The PL/SQL Gateway provides a Web page for configuring Database Access Descriptors (DADs). A DAD is a set of values that specify how the PL/SQL Gateway connects to a database server to fulfill an HTTP request.

4.1 Accessing the Gateway Configuration Menu

Access the Gateway Configuration Menu at:

http://<hostname>:<port>/pls/admin_/gateway.htm

4.1.1 Accessing the Gateway Configuration Menu from Oracle Portal

You can also access the Gateway Configuration Menu through Oracle Portal. To do so:

  1. From the Oracle Portal home page, click the Administer tab. By default, this is where the Services portlet is located.

  2. In the Services portlet, click Listener Gateway Settings.

4.2 Accessing the Global Settings

From the Gateway Configuration Menu page, access the Global Settings page by clicking the Gateway Global Settings link. Or access the Global Settings page directly at:

http://<hostname>:<port>/pls/admin_/globalsettings.htm

The Global Settings page is shown below.

Table 4-1 Global Setting through the Gateway Configuration Page
Global Setting  Description 

Default Database Access Descriptor (DAD)  

Specifies a path that points to the default DAD. If the end user enters a URL without specifying the DAD name, the home page for the default DAD is displayed.

Default = none Change the DAD name by typing a new one in this field.  

4.2.1 Global Settings Accessible through the Configuration File

Access the following settings through the wdbsvr.app configuration file (not through the Gateway Configuration page). This configuration file describes settings for the PL/SQL Gateway module. The location of your Oracle9i Application Server installation is<ORACLE_HOME>. For UNIX, the configuration file is located at:

<ORACLE_HOME>/Apache/modplsql/cfg/wdbsvr.app

For NT, it is located at:

<ORACLE_HOME>\Apache\modplsql\cfg\wdbsvr.app

Table 4-2 Global Settings in the Configuration File
Global Settings  Description 

Administrators
(administrators) 

Specifies who can view the admin pages. By default, this is set to ALL. Change this to a comma separated list of users to enforce security on the admin pages. For example scott, mike where scott and mike are local database user names. Or, scott, mike@orcl where orcl is a connect string for a remote database. Refer to "Protecting the Administration pages" for more information.  

Admin Path
(adminPath) 

Specifies the URL path element that identifies an admin page. Usually this is left unchanged as /admin_/. 

Admin DAD
(admindad) 

Specifies the DAD to authenticate the user who can view the admin pages. Refer to "Protecting the Administration pages" for more information.  

Error Reporting Mode
(error_style) 

Specifies the Error Reporting Mode for errors. This parameter can be specified at the DAD level or at the Global level and must be changed by manually editing the file. This parameter accepts the following values:

error_style = WebServer (default for mod_plsql)

PL/SQL Gateway indicates to the Web Server what HTTP error was encountered. The Web Server then generates the error page. This can be used with Apache's ErrorDocument directive to produce customized error messages.

error_stye = Gateway

The PL/SQL Gateway generates the error pages, usually a short message indicating the PL/SQL error that was encountered (e.g. "scott.foo PROCEDURE NOT FOUND").

error_style = GatewayDebug

The PL/SQL Gateway generates information specified by the "Gateway" setting and also produces server configuration information. This mode is for debugging purposes only. Do not use in a production system since displaying internal server variables could produce a security risk.

Note: If the PL/SQL Application generates its own error page, then the error_style setting is ignored and the page generated by the application is displayed 

4.3 Accessing Database Access Descriptor settings

You can access the Database Access Descriptor Settings page from the Gateway Database Access Descriptor Settings link on the Gateway Configuration Menu page, or directly at:

http://<hostname>:<port>/pls/admin_/dadentries.htm

A section of the Database Access Descriptor Settings page is shown below.

Table 4-3 DAD Settings through the Gateway Configuration Page
DAD Settings  Description 

Database Access Descriptor Name  

Displays the name for this DAD. The name is set at installation or during the creation of new web sites. Change the name by typing a new one in this field. 

Oracle User Name  

Displays the Oracle database account user name. The user name is typically set at installation or during the creation of new web sites. Change it by typing a new name in this field.  

Oracle Password 

Displays the Oracle database account password. The password is typically set at installation, but you can change it by typing a new password in this field.

Note: The Oracle User Name and Password are the default user name and password for logging in to a Web site or page. If you leave the Oracle User Name and Oracle Password fields blank, the user is prompted to enter a user name and password when first logging in.  

Oracle Connect String 

Specify in the format of HOST:PORT:SID if the database is remote. You can leave this field blank if the database is local.

For example, if your SQL*Net Listener for database sid ORCL is running on port 1521 of machine mydb.us.oracle.com, you can specify the Oracle Connect String to be "mydb.us.oracle.com:1521:ORCL".

The previous mode of specifying a Net8 TNS Alias is also still allowed.  

Authentication Mode 

This parameter can be set to one of the following values:

  • Basic - authentication is performed using Basic HTTP Authentication. Most applications use Basic Authentication.

  • Global OWA - authorization id performed in the OWA package schema.

  • Custom OWA - authorization is performed using packages and procedures in the user's schema, or if not found, in the OWA package schema

  • PerPackage - authentication is performed using packages and procedures in the user's schema

Single Sign-On - authentication is performed using the Oracle Single Sign-On feature of the Login Server. Use this mode only if your application is set up to work with the Login Server.
 

Session Cookie Name 

Enter a session cookie name only for Oracle Portal 3.X installations that participate in a distributed environment. 

Create a Stateful Session? 

Choose Yes to preserve the database package/session state for each database request. Choose No to reset it after each request. For the PL/SQL Gateway, this parameter must be set to No

Keep Database Connection Open Between Requests? 

Choose whether, after processing one URL request, the database connection stays open to process future requests. Choose Yes for maximum performance. Choose No for debugging purposes.

The PL/SQL Gateway cleanup thread cleans up database sessions that have not been used for 15 minutes.

Refer to the "Controlling Database Processes for Each mod_plsql Request", for information regarding database sessions.
 

Default (Home) Page  

Enter the PL/SQL procedure that is invoked when one is not specified as part of the URL. For example, if you specify a default home page of myapp.home and an end user enters this URL in a browser:

http://myapp.myserver.com:2000/pls/myapp/

It automatically updates the URL to:

http://myapp.myserver.com:2000/pls/
myapp/myapp.home

 

Document Table  

Enter the name of the database table where files uploaded through a web browser will be stored. Refer to "File Upload and Download" for more information.

 

Document Access Path 

Enter a path in the URL installation that is used to indicate a document is being referenced. In the following URL, for example:

http://myapp.myserver.com:2000/pls/my_site/
docs/folder1/presentation.htm

docs is the document access path.

 

Document Access Procedure  

Enter the procedure for uploading and downloading documents.

 

Extensions to be Uploaded as LONGRAW

 

Specify extensions for files to be uploaded as LONGRAW. 

Path Alias 

To be used by PL/SQL applications for path aliasing.

WebDB 2.X Note: Leave this field blank if the DAD is for an existing WebDB 2.x Web site. Refer to "Path Aliasing (Direct Access URLs)" for more information.

 

Path Alias Procedure 

To be used by PL/SQL applications for path aliasing.

WebDB 2.X Note: Leave this field blank if the DAD is for an existing WebDB 2.x Web site. Refer to "Path Aliasing (Direct Access URLs)" for more information 

4.3.1 DAD Settings Accessible through the Configuration File

Access the following settings through the wdbsvr.app configuration file (not through the Gateway Configuration page). This configuration file describes settings for the PL/SQL Gateway module. The location of your Oracle9i Application Server installation is <ORACLE_HOME>. For UNIX, the configuration file is located at:

<ORACLE_HOME>/Apache/modplsql/cfg/wdbsvr.app

For NT, it is located at:

<ORACLE_HOME>\Apache\modplsql\cfg\wdbsvr.app

.

Table 4-4 DAD Settings in the Configuration File
DAD Settings  Description 

Debug
(debugModules 

To log messages to Apache logs, ensure that the Apache logging level (LogLevel parameter in httpd.conf) is set to the same level (or higher) as that of debugModules.

The error levels mirror that of Apache. Messages with a severity level of Emergency through Info are logged to the Apache error log file $IAS_HOME/Apache/Apache/logs/*error*.

  • Emerg

  • Alert

  • Crit

  • Error

  • Warn (Default) Logs critical warning/errors to the Apache error logs.

  • Notice

  • Info

  • Debug (all) Similar to the older debugModules=all. Logs information to mod_plsql specific log files created under $IAS_HOME/Apache/modplsql/log.

Refer to "Logging" for more information.

Note: The following warnings are informational only and relate to performance overhead incurred. Refer to "Overhead Problems" for more information.

  • Procedure had to be described for execution - overhead incurred because mod_plsql had to describe the procedure before executing it.

  • Procedure is using older style flexible parameter passing style - overhead incurred because less efficient 4-parameter flexible parameter passing is being used.

 

Environment List
(cgi_env_list) 

Specifies overriding and/or new CGI environment variables. This is a comma separated list of name and value pairs of environment variables to be added or overridden. Refer to "Adding and Overiding CGI Environment Variables"

Error Reporting Mode
(error_style) 

Specifies the Error Reporting Mode for errors. This parameter can be specified at the DAD level or at the Global level and must be changed by manually editing the file. This parameter accepts the following values:

error_style = WebServer (default for mod_plsql)

PL/SQL Gateway indicates to the Web Server what HTTP error was encountered. The Web Server then generates the error page. This can be used with Apache's ErrorDocument directive to produce customized error messages.

error_stye = Gateway

The PL/SQL Gateway generates the error pages, usually a short message indicating the PL/SQL error that was encountered (e.g. "scott.foo PROCEDURE NOT FOUND").

error_style = GatewayDebug

The PL/SQL Gateway generates information specified by the "Gateway" setting and also produces server configuration information. This mode is for debugging purposes only. Do not use in a production system since displaying internal server variables could produce a security risk.

Note: If the PL/SQL Application generates its own error page, then the error_style setting is ignored and the page generated by the application is displayed 

Exclusion List
(exclusion_list) 

Specifies the procedures/packages/schema names which are forbidden to be directly executed from a browser. This is a comma separated list in which each string in the list is case insensitive and can accept wildcards. If this parameter is not specified, the default procedures are used. Refer to "Protecting the PL/SQL Procedures Granted to PUBLIC" for examples. 

National Language Support
(nls_lang) 

Specifies the NLS_LANG for this DAD. This parameter overrides the NLS_LANG environment variable. When this parameter is set, the PL/SQL Gateway uses the specified NLS_LANG to connect to the database. Once connected, an alter session is issued to switch to the specified language and territory.

Furthermore, all data transferred to the PL/SQL Gateway is in the specified charset. For example,

nls_lang = JAPANESE_JAPAN.JA16SJIS 

With this NLS_LANG setting, the PL/SQL Gateway issues the following statement upon connecting to the database:

alter session set nls_language=JAPANESE nls_
territory=JAPAN 

All content transferred from the database will be in JA16SJIS charset.  

Response Array Size (response_array_size)

 

Specifies the number of rows of content to fetch from the database for each trip. This performance tuning parameter can affect the response time of each request. For large generated pages, setting this parameter higher can decrease the number of trips to the database to get the content. However, the memory usage increases. The minimum is 28 rows. The default is 128 rows.

For Japanese, Chinese or multi-byte character set languages, set this parameter to 256. 

4.4 Accessing the Cache settings

Refer to the "Caching" chapter for more information about caching. Access the Cache Settings page from the Cache Settings link on the Gateway Configuration Menu page, or directly at:

http://<hostname>:<port>/pls/admin_/cache.htm

This page is split into two subsections for the two types of caching: PL/SQL caching and Session Cookie caching. A section of the Cache Settings page is shown below.

4.4.1 PL/SQL Caching

Table 4-5 PL/SQL Cache Settings
PL/SQL Cache Settings  Description 

Enable PL/SQL Caching 

Yes enables PL/SQL caching for maximum performance. Choose No if there are problems relating to this feature.

 

Cache Directory 

Enter a directory that PL/SQL caching uses to store cached content files.

Note: Ensure that this directory exists and has permissions that allow the PL/SQL Gateway to read and write files to and from it.

 

Total Cache Size (in bytes) 

Specifies the total amount of disk space PL/SQL caching can use.

Note: This is setting is not a hard limit. The cache may exceed this limit temporarily.

 

Maximum Cacheable File Size (in bytes) 

Specifies the maximum size for all cached files. Any dynamically generated content that exceeds this limit is not cached.

 

Total Cleanup Limit Size (in bytes) 

Specifies the total size of the cache to maintain after the cleanup has occurred. This ensures that frequently accessed contents stay in the cache after cleanup is over.

 

Cleanup Interval (in seconds) 

Specifies the number of seconds the cleanup takes. A high number improves performance, but total cache size may be exceeded. A low number decreases performance, but total cache size is not exceeded. 

4.4.2 Session Cookie Caching (Portal only)

Table 4-6 Session Cookie Cache Settings
Session Cookie Cache Settings  Description 

Enable Session Caching 

Choose Yes to enable session cookie caching for maximum performance. Choose No if there are problems relating to this feature.

 

Cache Directory 

Enter a directory that session cookie caching uses to store cached content files.

Note: Ensure that this directory exists and has permissions that allow the PL/SQL Gateway to read and write files to and from it. 

Total Cache Size (in bytes) 

Specifies the total amount of disk space session cookie caching can use.

Note: This is setting is not a hard limit. The cache may exceed this limit temporarily.

 

Total Cleanup Limit Size (in bytes) 

Specifies the total size of the cache to maintain after the cleanup has occurred. This ensures that frequently accessed contents stay in the cache after cleanup is over.

 

Cleanup Interval (in seconds) 

Specifies the number of seconds the cleanup takes. A high number improves performance, but total cache size may be exceeded. A low number decreases performance, but total cache size is not exceeded.

 


Go to previous page Go to next page
Oracle
Copyright © 2001 Oracle Corporation.

All Rights Reserved.

Contents

Index