Call now: 252-767-6166  
Oracle Training Oracle Support Development Oracle Apps

 E-mail Us
 Oracle Articles
New Oracle Articles

 Oracle Training
 Oracle Tips

 Oracle Forum
 Class Catalog

 Remote DBA
 Oracle Tuning
 Emergency 911
 RAC Support
 Apps Support
 Oracle Support

 SQL Tuning

 Oracle UNIX
 Oracle Linux
 Remote s
 Remote plans
 Application Server

 Oracle Forms
 Oracle Portal
 App Upgrades
 SQL Server
 Oracle Concepts
 Software Support

 Remote S


 Consulting Staff
 Consulting Prices
 Help Wanted!


 Oracle Posters
 Oracle Books

 Oracle Scripts

Don Burleson Blog 








  Oracle Database Tips by Donald Burleson


The Oracle Web Agent (OWA) packages are not part of the APEX installation, but they do warrant some coverage since APEX uses them.  They are further documented in Oracle document B10802.  The name of the document is PL/SQL Packages and Types Reference.  It is a huge document and a valuable asset to which developers and programmers should have ready access.  The document can be found by using the link at the top of the chapter.

The OWA_COOKIE package deals with browser cookies.  It will write to a cookie and read from a cookie stored on the client machine.  If no date is specified, the cookie only exists during the client's session.

Types used with the OWA_COOKIE package

type vc_arr is table of varchar2(4000)
index by binary_integer. 

type cookie is record (
name varchar2(4000),
vals vc_arr,
num_vals integer);

       name in varchar2,
       value in varchar2,
       expires in date default null,
       path in varchar2 default null,
       domain in varchar2 default null,
       secure in varchar2 default null);

This creates a cookie on the client browser machine.  The expires date should be specified or the cookie only exists during the life of the session.


   owa_util.mime_header('text/html', FALSE);
      expires => sysdate + 365); 

   -- Set the cookie and redirect to another page
'f?p=&APP_ID.:2101:&SESSION.' );
   when others then

get( name in varchar2) return cookie;

This will return a type of cookie as explained earlier.  It receives the name of the cookie to return.


    v varchar2(255) := null;
    c owa_cookie.cookie;
   c := owa_cookie.get('LOGIN_USERNAME_COOKIE');
   :P2100_COOKIE_TARGET := c.vals(1);
   when others then

       name in varchar2,
       val in varchar2,
       path in varchar2 default null);

This procedure forces the cookie to expire, which essentially removes its availability to be used.  It does this by setting the expiration date to 01-JAN-1990.


      name => 'EASY_COOKIE',
      value => NULL);


This prints all CGI environment variable's available to the CGI Gateway.  This procedure can be placed directly in a PL/SQL region to display the values of all the CGI variables.  Put the following code in the PL/SQL region:


The above book excerpt is from:

Easy HTML-DB Oracle Application Express

Create Dynamic Web Pages with OAE

ISBN 0-9761573-1-4   

Michael Cunningham & Kent Crotty

Oracle Training at Sea
oracle dba poster

Follow us on Twitter 
Oracle performance tuning software 
Oracle Linux poster


Burleson is the American Team

Note: This Oracle documentation was created as a support and Oracle training reference for use by our DBA performance tuning consulting professionals.  Feel free to ask questions on our Oracle forum.

Verify experience! Anyone considering using the services of an Oracle support expert should independently investigate their credentials and experience, and not rely on advertisements and self-proclaimed expertise. All legitimate Oracle experts publish their Oracle qualifications.

Errata?  Oracle technology is changing and we strive to update our BC Oracle support information.  If you find an error or have a suggestion for improving our content, we would appreciate your feedback.  Just  e-mail:  

and include the URL for the page.


Burleson Consulting

The Oracle of Database Support

Oracle Performance Tuning

Remote DBA Services


Copyright © 1996 -  2020

All rights reserved by Burleson

Oracle ® is the registered trademark of Oracle Corporation.