U of A University of Arkansas Division of Agriculture

Pictures of chickens, flowers, wheat, a boy looking through a magnifying glass, irrigation pipe, soybean pods, and fruits and vegetables.

Cooperative Extension Service

Cooperative Extension Service

Agricultural Experiment Station

Steve Rea's
Oracle Tips, Tricks, and Scripts

Link to Steve Rea's Oracle Certification graphic


Search | Publications | Jobs | Personnel Directory | Links

Application Express Installation

Oracle's Application Express (APEX), formerly called HTML DB, is a rapid web application development tool for the Oracle database.  You can read all about it at:
    http://www.oracle.com/technology/products/database/application_express/index.html
and then download it (77 Meg .zip file, including the documentation and a 2+-day developers guide/tutorial) from:
    http://www.oracle.com/technology/products/database/application_express/download.html.

For the step-by-step instructions that I went through to install APEX 3.0 into an Oracle 9.2.0.6 database on a Windows 2003 server, including installing the prerequisites for it, see below.  Those prerequisites include:

    Oracle Java Virtual Machine
    Oracle XML DB
    Oracle Text
    PL/SQL Web Toolkit 10.1.2.0.6 (included with APEX download)
    init.ora settings:
        java_pool_size >= 150M
        job_queue_processes >= 20
        shared_pool_size >= 100M
    100 Meg of free space in system tablespace
    100 Meg Application Express tablespace
    Additional tablespaces for XML DB (50+ Meg) and Oracle Text (10+ Meg), if not already installed.

Our platform and database specifics used in this installation:
    Oracle Database Version: 9.2.0.6
    Server: Windows 2003
    Server Name: myserver
    Oracle SID: apps
    Connect String: myserver_apps
    Web Address: http://myserver.uaex.edu
    Datafile Directory: D:\oradata\APPS
    Oracle Home Directory: D:\oracle\v9206
    APEX Installation Directory: D:\downloads\apex
        Downloaded and unzipped from:
       
http://www.oracle.com/technology/products/database/application_express/download.html
    APEX Documentation: D:\downloads\apex\welcome.html

Note: We are using Oracle HTTP Server and mod_plsql included with Oracle 9.2 (http://myserver.uaex.edu:7778 shows "Mod_plsql Configuration Menu" as one of it's options; which is where Data Access Descriptors (DAD's) are created).

Installation Steps for APEX and it's prerequisites. In the commands below, <syspw> is the password for the SYS user in your database, <xmlpw> is the password for the Oracle XML DB schema that will be created, <ctxsyspw> is the password for the Oracle Text schema that will be created, and <apexpw> is the password for the APEX schemas that will be created.

Edit the init.ora parameter file and change the following settings, if needed, making them at least the sizes shown below if not larger (in sqlplus, you can do a "show parameter pool_size" to see the various pool sizes):
    java_pool_size = 150M
    job_queue_processes = 20
    shared_pool_size = 100M

Check to see if Oracle Java Virtual Machine is installed. In a command prompt session on MyServer (similarly for the rest of these instructions):
    set oracle_sid=apps
    set oracle_home=d:\oracle\v9206
    d:
    cd %oracle_home%
    sqlplus "sys/<syspw> as sysdba"
    column comp_name format a30
    select comp_name,version,status from dba_registry;
If the above doesn't list "JServer JAVA Virtual Machine 9.2.0.6.0" or similar, install Oracle Java Virtual Machine:
    shutdown immediate
    startup mount
    alter system set "_system_trig_enabled" = false scope=memory;
    alter database open;
    @?/javavm/install/initjvm.sql
    @?/xdk/admin/initxml.sql
    @?/xdk/admin/xmlja.sql
    @?/rdbms/admin/catjava.sql
    shutdown immediate
    startup

Create a new tablespace for Application Express (note: install used almost 98 Meg of this apex tablespace) and make sure there is enough free space in the system tablespace (change the datafile names below as needed):
    create tablespace apex datafile 'D:\oradata\APPS\apex_APPS_01.dbf'
        size 102464K extent management local uniform size 64K
        segment space management auto;
    alter tablespace system add datafile 'D:\oradata\APPS\sys_APPS_02.dbf'
        size 100064K;

Check to see if Oracle XML DB is installed:
    select comp_name,version,status from dba_registry;
If the above does not list "Oracle XML Database" or similar, install Oracle XML DB (note: installation used almost 46 Meg of the xmldb tablespace). For installation information, see:
http://www.idevelopment.info/data/Oracle/tips/xmldb/XMLDB_3.shtml
http://orafaq.com/faq/how_does_one_install_xmldb_into_a_database
CMS-14112 on ActionWeb (http://connect.sungardhe.com)
    create tablespace xmldb datafile 'D:\oradata\APPS\xmldb_APPS_01.dbf'
        size 76864K extent management local uniform size 64K
        segment space management auto;
    shutdown immediate
    exit
    cd %oracle_home%\rdbms\admin
    sqlplus "sys/<syspw> as sysdba"
    startup
    set echo on
    spool xdb_install.log
    @catqm <xmlpw> xmldb temp
    select comp_name,version,status from dba_registry;
        (should list "Oracle XML Database" now)
    spool off
    connect sys/<syspw> as sysdba
    set echo on
    spool xdbj_install.log
    @catxdbj.sql
    select count(*) from dba_objects where owner='XDB'
        and status='INVALID';
            (should show zero)
    spool off
    exit
Edit the init.ora parameter file and add the following setting:
    dispatchers="(PROTOCOL=TCP) (SERVICE=APPSXDB)"
Reboot the database and the listener:
    sqlplus "sys/<syspw> as sysdba"
    shutdown immediate
    startup
    exit
    lsnrctl stop
    lsnrctl start

Check to see if Oracle Text is installed:
    cd %oracle_home%\ctx\admin
    sqlplus "sys/<syspw> as sysdba"
    select object_name from dba_objects where object_name like 'CTX%';
If the above does not list any CTX objects, install Oracle Text (note: install used only 5 Meg of this ctx tablespace). For installation information, see:
http://download-west.oracle.com/docs/html/B10163_01/config.htm#i1005647
http://www.idevelopment.info/data/DBA_tips/Oracle_Text/TEXT_2.shtml
    create tablespace ctx datafile 'D:\oradata\APPS\ctx_APPS_01.dbf'
        size 76864K extent management local uniform size 64K
        segment space management auto;
    set echo on
    spool ctx_install.log
    @dr0csys.sql <ctxsyspw> ctx temp
    connect ctxsys/<ctxsyspw>
    @dr0inst.sql
    @defaults/drdefus.sql
    spool off

Check to see if the PL/SQL Web Toolkit needs upgrading:
    select owa_util.get_version from dual;
If the above shows "3.0.0.0.4" or some version less than 10.1.2.0.6, install the PL/SQL Web Toolkit upgrade from the APEX download:
    exit
    cd d:\downloads\apex\owa
    sqlplus "sys/<syspw> as sysdba"
    set echo on
    spool owa_install.log
    @owainst.sql
    connect sys/<syspw> as sysdba
    select owa_util.get_version from dual;
    @?/rdbms/admin/utlrp.sql
    spool off
    exit

Install Application Express (our installation took 1 hour and 16 minutes):
    cd d:\downloads\apex
    sqlplus "sys/<syspw> as sysdba"
    set echo on
    spool apex_install.log
    @apexins <apexpw> apex apex temp /i/
        (exited sqlplus at end)
At the end of the installation, it showed:
    Oracle Application Express is installed in the FLOWS_030000 schema.
    The structure of the link to the Application Express administration
    services is as follows:
        http://host:port/pls/apex/apex_admin
    The structure of the link to the Application Express development
    interface is as follows:
        http://host:port/pls/apex

Postinstallation:
The http port routines below didn't exist for some reason, although APEX came up OK:
    sqlplus "sys/<syspw> as sysdba"
    select dbms_xdb.gethttpport from dual;
        If the port number returns 0, the Oracle XML DB HTTP Server is disabled.
        Enable it:
            exec dbms_xdb.sethttpport(8080);
    exit
xcopy /E /I images d:\oracle\v9206\Apache\Apache\images
Add a DAD (Database Access Descriptor) for APEX (note: doing it this way will encode the password, although the APEX installation instructions do show info on Obfuscating Passwords; also, your port number may differ from 7778):
    Go to http://myserver.uaex.edu:7778/
    Click on Mod_plsql Configuration Menu
    Click on Gateway Database Access Descriptor Settings
    Click on Add Default (blank configuration)
    Enter:
        Database Access Descriptor Name: apex
        Schema Name: apex_public_user
        Oracle User Name: apex_public_user
        Oracle Password: <apexpw>
        Oracle Connect String: myserver_apps
        Default (Home) Page: apex
        Document Table: wwv_flow_file_objects$
        Document Access Path: docs
        Document Access Procedure: wwv_flow_file_mgr.process_download
        Click on Apply button
        Click on OK button
    Edit the resulting d:\oracle\v9206\Apache\modplsql\cfg\wdbsvr.app to
    change the DAD_apex language (this isn't in the DAD creation page above):
        nls_lang = American_America.AL32UTF8
Edit d:\oracle\v9206\Apache\Apache\conf\httpd.conf to add the following in the appropriate sections:
    Alias /i/ "d:\oracle\v9206\Apache\Apache\images/"
    AddType text/xml .xbl
    AddType text/x-component .htc
Stop and restart the HTTP Server:
    Start | Programs | Oracle - Ora_9206 | Oracle HTTP Server | Stop HTTP Server
    Start | Programs | Oracle - Ora_9206 | Oracle HTTP Server | Start HTTP Server
If the above doesn't work, stop and restart the HTTP Service itself (OracleORA_9206HTTPServer or similar name):
    Start | Programs | Administrative Tools | Services
    Right click on OracleORA_9206HTTPServer and select Stop
    Right click on OracleORA_9206HTTPServer and select Start

Log into the Application Express administration services using the following (note: your port number may differ from 7778):
    http://myserver.uaex.edu:7778/pls/apex/apex_admin
        User Name: ADMIN
        Password: <apexpw>
and change the password (maybe to the same password) when prompted.

To log in to the Application Express development interface, use the following (note: your port number may differ from 7778):
    http://myserver.uaex.edu:7778/pls/apex

This Page was Last Updated on 08/15/07

You Are Visitor Number

Hit Counter

Link to CES Home PageBack To CES Home Page

Link to Steve Rea's Oracle PageBack To Steve Rea's Oracle Page

Back to top of this pageBack To Top


© 2006
University of Arkansas
Division of Agriculture
All rights reserved.
Last Date Modified 02/09/2008
Webmaster

University of Arkansas • Division of Agriculture
Cooperative Extension Service
2301 South University Avenue
Little Rock, Arkansas 72204 • USA
Phone (501) 671-2000 • Fax (501) 671-2209
 

MissionDisclaimerEEO
PrivacyFOI