Top Previous Next TOC Index

PL/SQL Agent


The PL/SQL Agent can be invoked through either the WRB or CGI, as determined by the directory and MIME type mappings set by the WebServer Administrator. If it is through CGI, the script name specified in the URL must be "owa". If it is through the WRB, the directory and MIME type mappings are sufficient to specify the PL/SQL Agent. The PL/SQL Agent executes application code written in PL/SQL and returns the output in HTML form for the Web Listener to output as a Web page.

PL/SQL procedures are stored in the database. The PL/SQL Agent invokes them by issuing commands to the database, which then performs the actual execution and sends the output and status messages back to the PL/SQL Agent.

Since PL/SQL is actually executed in the database, the PL/SQL Agent, whether executed through the WRB or CGI, must connect to the Oracle7 Server to run. If the PL/SQL Agent uses the WRB, the WRBX connects to the database in the following two stages:

Since the first stage actually takes most of the time involved in establishing a database session, this technique speeds execution considerably, yet the effect is as though each request connected to the database independently. If run through CGI, the PL/SQL Agent must go through the entire procedure for each request. The username, schema, and password that the PL/SQL Agent uses to connect is specified by the URL through the use of a DCD, as explained below.


Specifying the Database Connection

A URL that invokes the PL/SQL Agent must specify a DCD (Database Connection Descriptor). This is an OS file maintained by the WebServer that provides the username, password, database, and other information to be used to establish the database connection. The DCD determines both the database access privileges the PL/SQL Agent has when executing this request and the schema (portion of the database) that it accesses. The filename of the DCD is given in the URL as a file within the directory configured for the PL/SQL Agent. The file need not actually reside in that directory; its association with the PL/SQL Agent is set in the WebServer Manager PL/SQL Agent configuration page. If the PL/SQL Agent is invoked through CGI, the DCD precedes the script name "owa", with the two separated by a slash (/).

Oracle WebServer also provides you with Java classes that can invoke PL/SQL. For more information, see Java or the Java Interpreter.


The PL/SQL WebToolkit

To make it easier for you to develop Web applications using Oracle data, Oracle WebServer provides you a group of PL/SQL packages that you can use to easily generate Web pages from data stored in an Oracle database. These packages are called the PL/SQL Web Toolkit. The intent is for you to create PL/SQL procedures that access and process the Oracle data you wish to place on the Web. From within these procedures, you call the PL/SQL Web Toolkit procedures you need to create the HTML you want. You store the procedures you write in the database, just as other PL/SQL packages, including the toolkit, are stored. You also design your Web pages, including the dynamically-generated ones, to produce URLs that call the PL/SQL procedures you want in response to specified user actions. Having your code executed within the database brings many performance, security, and portability benefits. For more information on the PL/SQL Web Toolkit, see The PL/SQL Web Toolkit Reference.


Click Here to Go to the top of the section.

Click Here to Go to the previous topic.

Click Here to Go to the next topic.

Click here to Go to the Table of Contents.

Click here to Go to the Index.


This document was last modified at 07:32pm PDT on April 29, 1996.

To report any problems or comments, e-mail Oracle WebServer Documentation.