Oracle® Application Express

Installation Guide

Release 3.1.2

E10496-03

August 2008

Oracle Application Express Installation Guide, Release 3.1.2

E10496-03

Copyright © 2003, 2008, Oracle. All rights reserved.

Primary Author:  Terri Winters

Contributors:  Marco Adelfio, Christina Cho, Joel Kallman, Anne Romano, and Jason Straub

The Programs (which include both the software and documentation) contain proprietary information; they are provided under a license agreement containing restrictions on use and disclosure and are also protected by copyright, patent, and other intellectual and industrial property laws. Reverse engineering, disassembly, or decompilation of the Programs, except to the extent required to obtain interoperability with other independently created software or as specified by law, is prohibited.

The information contained in this document is subject to change without notice. If you find any problems in the documentation, please report them to us in writing. This document is not warranted to be error-free. Except as may be expressly permitted in your license agreement for these Programs, no part of these Programs may be reproduced or transmitted in any form or by any means, electronic or mechanical, for any purpose.

If the Programs are delivered to the United States Government or anyone licensing or using the Programs on behalf of the United States Government, the following notice is applicable:

U.S. GOVERNMENT RIGHTS Programs, software, databases, and related documentation and technical data delivered to U.S. Government customers are "commercial computer software" or "commercial technical data" pursuant to the applicable Federal Acquisition Regulation and agency-specific supplemental regulations. As such, use, duplication, disclosure, modification, and adaptation of the Programs, including documentation and technical data, shall be subject to the licensing restrictions set forth in the applicable Oracle license agreement, and, to the extent applicable, the additional rights set forth in FAR 52.227-19, Commercial Computer Software--Restricted Rights (June 1987). Oracle USA, Inc., 500 Oracle Parkway, Redwood City, CA 94065.

The Programs are not intended for use in any nuclear, aviation, mass transit, medical, or other inherently dangerous applications. It shall be the licensee's responsibility to take all appropriate fail-safe, backup, redundancy and other measures to ensure the safe use of such applications if the Programs are used for such purposes, and we disclaim liability for any damages caused by such use of the Programs.

Oracle, JD Edwards, PeopleSoft, and Siebel are registered trademarks of Oracle Corporation and/or its affiliates. Other names may be trademarks of their respective owners.

The Programs may provide links to Web sites and access to content, products, and services from third parties. Oracle is not responsible for the availability of, or any content provided on, third-party Web sites. You bear all risks associated with the use of such content. If you choose to purchase any products or services from a third party, the relationship is directly between you and the third party. Oracle is not responsible for: (a) the quality of third-party products or services; or (b) fulfilling any of the terms of the agreement with the third party, including delivery of products or services and warranty obligations related to purchased products or services. Oracle is not responsible for any loss or damage of any sort that you may incur from dealing with any third party.

Contents

Preface

- Audience

- Documentation Accessibility

- Related Documents

- Conventions

- Third-Party License Information

1 Oracle Application Express Installation Overview

- 1.1 Overview of the Installation Process

- 1.2 Upgrading from a Previous Version of Oracle Application Express

- 1.3 About the Oracle Application Express Runtime Environment

- 1.4 About Choosing an HTTP Server

- 1.4.1 About Oracle HTTP Server and mod_plsql

- 1.4.2 About the Embedded PL/SQL Gateway

- 1.4.3 Selecting an HTTP Server in an Oracle RAC Environment

- 1.5 Available Installation Scenarios

- 1.5.1 Scenario 1: Downloading from OTN and Configuring the Embedded PL/SQL Gateway

- 1.5.2 Scenario 2: Downloading from OTN and Configuring Oracle HTTP Server

- 1.5.3 Scenario 3: Install from the Database and Configure the Embedded PL/SQL Gateway

- 1.5.4 Scenario 4: Install from the Database and Configure Oracle HTTP Server

2 Oracle Application Express Installation Requirements

- 2.1 Oracle Database Requirement

- 2.1.1 Oracle JVM Requirement

- 2.1.2 Checking the shared_pool_size of the Target Database

- 2.2 Browser Requirement

- 2.3 HTTP Server Requirements

- 2.4 Disk Space Requirement

- 2.5 Oracle XML DB Requirement

- 2.6 Oracle Text Requirement

- 2.7 PL/SQL Web Toolkit

3 Downloading from Oracle Technology Network

- 3.1 Recommended Pre-installation Tasks

- 3.2 Choosing an HTTP Server

- 3.3 Downloading from OTN and Configuring the Embedded PL/SQL Gateway

- 3.3.1 Install the Oracle Database and Complete Pre-installation Tasks

- 3.3.2 Download and Install Oracle Application Express

- 3.3.3 Change the Password for the ADMIN Account

- 3.3.4 Restart Processes

- 3.3.5 Configure the Embedded PL/SQL Gateway

- 3.3.6 Enable Network Services in Oracle Database 11g

- 3.3.7 Security Considerations

- 3.3.8 About Running Oracle Application Express in Other Languages

- 3.3.9 About Managing JOB_QUEUE_PROCESSES

- 3.3.10 Configuring the SHARED_SERVERS Parameter

- 3.3.11 Log In to Oracle Application Express

- 3.4 Downloading from OTN and Configuring Oracle HTTP Server

- 3.4.1 Install the Oracle Database and Complete Pre-installation Tasks

- 3.4.2 Download and Install Oracle Application Express

- 3.4.3 Change the Password for the ADMIN Account

- 3.4.4 Restart Processes

- 3.4.5 Configure Oracle HTTP Server Distributed with Oracle Database 11g or Oracle Application Server 10g

- 3.4.6 Enable Network Services in Oracle Database 11g

- 3.4.7 Security Considerations

- 3.4.8 About Running Oracle Application Express in Other Languages

- 3.4.9 About Managing JOB_QUEUE_PROCESSES

- 3.4.10 About Obfuscating PlsqlDatabasePassword Parameter

- 3.4.11 Log In to Oracle Application Express

- 3.5 About the Oracle Application Express Runtime Environment

- 3.5.1 Converting a Runtime Environment to a Full Development Environment

- 3.5.2 Converting a Full Development Environment to a Runtime Environment

4 Configuration Tasks When Installing from the Database

- 4.1 About Patching Oracle Application Express

- 4.2 Recommended Pre-installation Tasks

- 4.3 Choosing an HTTP Server

- 4.4 Install from the Database and Configure the Embedded PL/SQL Gateway

- 4.4.1 Install the Oracle Database and Complete Pre-installation Tasks

- 4.4.2 Configure the Embedded PL/SQL Gateway

- 4.4.3 Enable Network Services in Oracle Database 11g

- 4.4.4 Security Considerations

- 4.4.5 About Running Oracle Application Express in Other Languages

- 4.4.6 About Managing JOB_QUEUE_PROCESSES

- 4.4.7 Configuring the SHARED_SERVERS Parameter

- 4.4.8 Log In to Oracle Application Express

- 4.5 Install from the Database and Configure Oracle HTTP Server

- 4.5.1 Install the Oracle Database and Complete Pre-installation Tasks

- 4.5.2 Configure Oracle HTTP Server Distributed with Oracle Database 11g or Oracle Application Server 10g

- 4.5.3 Enable Network Services in Oracle Database 11g

- 4.5.4 Security Considerations

- 4.5.5 About Running Oracle Application Express in Other Languages

- 4.5.6 About Managing JOB_QUEUE_PROCESSES

- 4.5.7 About Obfuscating PlsqlDatabasePassword Parameter

- 4.5.8 Log In to Oracle Application Express

- 4.6 About the Oracle Application Express Runtime Environment

- 4.6.1 Convert a Runtime Environment to a Full Development Environment

- 4.6.2 Convert a Full Development Environment to a Runtime Environment

A Oracle Application Express Troubleshooting

- A.1 Reviewing a Log of an Installation Session

- A.2 Verifying the Validity of an Oracle Application Express Installation

- A.3 Cleaning Up After a Failed Installation

- A.3.1 Reverting to a Previous Release After a Failed Upgrade Installation

- A.3.2 Removing Oracle Application Express from the Database

- A.4 Images Displaying Incorrectly in Oracle Application Express

- A.5 Online Help Not Working

- A.5.1 Online Help Not Working When Using a Virtual Host

- A.5.2 Problems Searching Online Help

B Configuring Oracle HTTP Server Distributed with Oracle9i Release 2

- B.1 Recommended Pre-installation Tasks

- B.2 Downloading from OTN and Configuring Oracle HTTP Server

- B.2.1 Install the Oracle Database and Complete Pre-installation Tasks

- B.2.2 Download and Install the Software

- B.2.3 Change the Password for the ADMIN Account

- B.2.4 Restart Processes

- B.2.5 Configure Oracle HTTP Server

- B.2.6 About Enabling Network Services in Oracle Database 11g

- B.2.7 Security Considerations

- B.2.8 About Running Oracle Application Express in Other Languages

- B.2.9 About Managing JOB_QUEUE_PROCESSES

- B.2.10 About Obfuscating PlsqlDatabasePassword Parameter

- B.2.11 Log In to Oracle Application Express

- B.3 Install the Database and Configure Oracle HTTP Server

- B.3.1 Install the Oracle Database and Complete Pre-installation Tasks

- B.3.2 Configure Oracle HTTP Server Distributed with Oracle Database Release 9.0.3

- B.3.3 About Enabling Network Services in Oracle Database 11g

- B.3.4 Security Considerations

- B.3.5 About Running Oracle Application Express in Other Languages

- B.3.6 About Managing JOB_QUEUE_PROCESSES

- B.3.7 About Obfuscating PlsqlDatabasePassword Parameter

- B.3.8 Log In to Oracle Application Express

C Third-Party License

- C.1 Apache License

Index

Preface

This guide explains how to install and configure Oracle Application Express.

This Preface contains these topics:

- Audience

- Documentation Accessibility

- Related Documents

- Conventions

- Third-Party License Information

Audience

Oracle Application Express Installation Guide is intended for anyone responsible for installing Oracle Application Express.

To use this manual, you must have administrative privileges on the computer where you installed your Oracle database and familiarity with object-relational database management concepts.

Documentation Accessibility

Our goal is to make Oracle products, services, and supporting documentation accessible, with good usability, to the disabled community. To that end, our documentation includes features that make information available to users of assistive technology. This documentation is available in HTML format, and contains markup to facilitate access by the disabled community. Accessibility standards will continue to evolve over time, and Oracle is actively engaged with other market-leading technology vendors to address technical obstacles so that our documentation can be accessible to all of our customers. For more information, visit the Oracle Accessibility Program Web site at

http://www.oracle.com/accessibility/

Accessibility of Code Examples in Documentation

Screen readers may not always correctly read the code examples in this document. The conventions for writing code require that closing braces should appear on an otherwise empty line; however, some screen readers may not always read a line of text that consists solely of a bracket or brace.

Accessibility of Links to External Web Sites in Documentation

This documentation may contain links to Web sites of other companies or organizations that Oracle does not own or control. Oracle neither evaluates nor makes any representations regarding the accessibility of these Web sites.

TTY Access to Oracle Support Services

Oracle provides dedicated Text Telephone (TTY) access to Oracle Support Services within the United States of America 24 hours a day, 7 days a week. For TTY support, call 800.446.2398. Outside the United States, call +1.407.458.2479.

Related Documents

For more information, see these Oracle resources:

- Oracle Application Express Release Notes

- Oracle Database 2 Day + Oracle Application Express Developer's Guide

- Oracle Application Express Application Builder User's Guide

- Oracle Application Express Administration Guide

- Oracle Application Express SQL Workshop and Utilities Guide

- Oracle Application Express API Reference

- Oracle Application Migration Guide

- Oracle Application Express Advanced Tutorials

- Oracle Database Concepts

- Oracle HTTP Server Administrator's Guide

- Oracle9i Application Server Administrator's Guide

- Oracle Database Advanced Application Developer's Guide

- Oracle Database Administrator's Guide

- Oracle Database SQL Language Reference

- SQL*Plus User's Guide and Reference

For information about Oracle error messages, see Oracle Database Error Messages. Oracle error message documentation is available only in HTML. If you have access to the Oracle Database Documentation Library, you can browse the error messages by range. Once you find the specific range, use your browser's "find in page" feature to locate the specific message. When connected to the Internet, you can search for a specific error message using the error message search feature of the Oracle online documentation.

Many books in the documentation set use the sample schemas of the seed database, which is installed by default when you install Oracle. Refer to Oracle Database Sample Schemas for information on how these schemas were created and how you can use them yourself

Printed documentation is available for sale in the Oracle Store at

http://oraclestore.oracle.com/

To download free release notes, installation documentation, white papers, or other collateral, please visit the Oracle Technology Network (OTN). You must register online before using OTN; registration is free and can be done at

http://www.oracle.com/technology/membership/

If you already have a user name and password for OTN, then you can go directly to the documentation section of the OTN Web site at

http://www.oracle.com/technology/documentation/

Conventions

The following text conventions are used in this document:

Convention

Meaning

boldface

Boldface type indicates graphical user interface elements associated with an action, or terms defined in text or the glossary.

italic

Italic type indicates book titles, emphasis, or placeholder variables for which you supply particular values.

monospace

Monospace type indicates commands within a paragraph, URLs, code in examples, text that appears on the screen, or text that you enter.

Third-Party License Information

Oracle Application Express contains third-party code. Oracle is required to provide the following notices. Note, however, that the Oracle program license that accompanied this product determines your right to use the Oracle program, including the third-party software, and the terms contained in the following notices do not change those rights.

AnyChart

Flash chart support in Oracle Application Express is based on the Anychart Flash Chart Component. Anychart is a flexible Macromedia Flash-based solution that enables developers to create animated, compact, interactive flash charts. Flash charts are rendered by a browser and require Flash player 8 or later. Flash charts used in interactive reports require Flash Player 9 or later. For more information about Anychart, go to

http://www.anychart.com

FCKeditor

Oracle Application Express uses FCKeditor version 2.3.2 for the following item types; HTML Editor Minimal and HTML Editor Standard. This software is licensed under the Apache License, Version 2.0 (the "License"). To view a copy of the Apache License, see Appendix C, "Third-Party License".

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

For more information about FCKeditor, go to:

http://www.fckeditor.net/

Apache FOP

Oracle Application Express includes the Apache FOP Version 0.20.5 libraries and a custom XSL-FO processing JSP. This software is licensed under the Apache License, Version 2.0 (the "License"). To view a copy of the Apache License, see Appendix C, "Third-Party License".

If you wish to use Apache FOP as your report server for PDF region printing, this is now a supported report server configuration. Installation and configuration instructions can be found on Oracle Technology Network. See Installing and Configuring Apache FOP at:

http://www.oracle.com/technology/products/database/application_express/html/configure_printing.html#05

1 Oracle Application Express Installation Overview

This chapter provides an overview of installing Oracle Application Express and describes issues to consider before installing.

This chapter contains these topics:

- Overview of the Installation Process

- Upgrading from a Previous Version of Oracle Application Express

- About the Oracle Application Express Runtime Environment

- About Choosing an HTTP Server

- Available Installation Scenarios

1.1 Overview of the Installation Process

The installation process consists of four parts:

1. Plan your installation: This chapter offers an overview of the steps required to install Oracle Application Express. During the planning phase, you should also determine whether to install a full development environment or runtime environment.
A full development environment provides complete access to the Application Builder environment to develop applications. A runtime environment is an appropriate choice for production implementations in which you want to run applications that cannot be modified. To learn more, see "About the Oracle Application Express Runtime Environment".

2. Verify installation requirements: "Oracle Application Express Installation Requirements" describes the minimum requirements that your system must meet before you install the software.

3. Install the software: As described in Figure 1-1, the required installation steps depend upon:

- How you install the Oracle Application Express. Available options include downloading a ZIP file from Oracle Technology Network (OTN), or using the version of Oracle Application Express that installs with Oracle Database 11g or later.

- Which HTTP server you decide to use. Available options include the embedded PL/SQL gateway or Oracle HTTP Server and mod_plsql.
To learn more, see "About Choosing an HTTP Server".

Figure 1-1 Key Decision Points in the Installation Process

1.2 Upgrading from a Previous Version of Oracle Application Express

If you have version 1.5.0.00.33, 1.5.1.00.12, 1.6.0.00.87, 1.6.1.00.03, 2.0.0.00.49, 2.2.1.00.04, 3.0.0.00.20, 3.0.1.00.07, 3.0.1.00.08, or 3.0.1.00.12 of Oracle Application Express, following any of the installation scenarios in this guide upgrades your Oracle Application Express instance to version 3.0 and creates Oracle Application Express 3.0 database objects in a new schema and migrates the application metadata to the new version.

1.3 About the Oracle Application Express Runtime Environment

For testing and production instances, Oracle Application Express supports the ability to install just a runtime version of Oracle Application Express. This runtime environment minimizes the installed footprint and privileges and improves application security since in a runtime instance developers cannot advertently update a production application.

An Oracle Application Express runtime environment enables you to run production applications, but it does not provide a Web interface for administration. A runtime environment only includes the packages necessary to run your application, making it a more hardened environment. You administer the Oracle Application Express runtime environment using SQL*Plus or SQL Developer and the APEX_INSTANCE_ADMIN API. To learn more see, "Managing a Runtime Environment" in Oracle Application Express Application Builder User's Guide.

Scripts are provided to remove or add the developer interface from an existing instance. To learn more, see "About the Oracle Application Express Runtime Environment" in "Downloading from Oracle Technology Network" and "Configuration Tasks When Installing from the Database".

1.4 About Choosing an HTTP Server

In order to run, Oracle Application Express must have access to either Oracle HTTP Server and mod_plsql or the embedded PL/SQL gateway.

Topics in this section include:

- About Oracle HTTP Server and mod_plsql

- About the Embedded PL/SQL Gateway

- Selecting an HTTP Server in an Oracle RAC Environment

1.4.1 About Oracle HTTP Server and mod_plsql

Oracle HTTP Server uses the mod_plsql plug-in to communicate with the Oracle Application Express engine within the Oracle database. It functions as communication broker between the Web server and the Oracle Application Express objects in the Oracle database. More specifically, it maps browser requests into database stored procedure calls over a SQL*Net connection. The following graphic illustrates the Oracle Application Express architecture using Oracle HTTP Server and mod_plsql.

See Also:
"HTTP Server Requirements"

Note that this three tier architecture consists of the following components: a Web browser, Oracle HTTP Server (Apache) with mod_plsql, and an Oracle database containing Oracle Application Express.

Advantages of Oracle HTTP Server (Apache) with mod_plsql:

- Separation of of mid-tier for the database tier

- Appropriate for Oracle Real Application Clusters (RAC) environments

1.4.1.1 Where Images Are Stored When Using Oracle HTTP Server

In an Oracle HTTP Server or Oracle Application Server configuration, images are stored on the file system in the location referenced by the alias /i/. To locate the images directory on the file system, review the following files and search for the text alias /i/:

- Oracle9i HTTP Server Release 2—see the httpd.conf file.

- Oracle HTTP Server distributed with Oracle Database 11g—see the dads.conf file.

- Oracle Application Server 10g—see the marvel.conf file.

Specific examples for locating the text alias /i/ can be found in "Downloading from Oracle Technology Network" and "Configuration Tasks When Installing from the Database".

1.4.2 About the Embedded PL/SQL Gateway

The embedded PL/SQL gateway installs with Oracle Database 11g. It provides the Oracle database with a Web server and also the necessary infrastructure to create dynamic applications. The embedded PL/SQL gateway runs in the Oracle XML DB HTTP server in the Oracle database and includes the core features of mod_plsql. The following graphic illustrates the Oracle Application Express architecture using the embedded PL/SQL gateway.

As shown in the previous graphic, the embedded PL/SQL gateway is a simple two tier architecture and consists of theses components: a Web browser and an Oracle database, containing the embedded PL/SQL and Oracle Application Express.

Advantages of the embedded PL/SQL gateway:

- Ease of configuration

- Included in the database

- No separate server installation

1.4.2.1 Where Images Are Stored When Using the Embedded PL/SQL Gateway

When running Oracle Application Express with the embedded PL/SQL gateway, images are stored directly in the database within the Oracle XML DB repository. You can access images by using the WebDAV feature of Oracle XML DB or by using FTP. To learn more, see "Using Protocols to Access the Repository" in Oracle XML DB Developer's Guide.

1.4.3 Selecting an HTTP Server in an Oracle RAC Environment

When running Oracle Application Express in an Oracle Real Application Clusters (RAC) environment, Oracle recommends that you use Oracle HTTP Server with mod_plsql. Oracle HTTP Server with mod_plsql permits you to specify a connection in the service name format, so that one HTTP Server can access all nodes.

Oracle recommends that you do not select the embedded PL/SQL gateway option for Oracle RAC installations. The embedded PL/SQL gateway uses an HTTP Server built into the database instance, and because of this, it does not take advantage of the Oracle RAC shared architecture.

1.5 Available Installation Scenarios

How you install Oracle Application Express depends upon where you install the software from and which HTTP server you decide to use. This section provides an overview of each installation scenario.

See Also:
"About Choosing an HTTP Server" and "About the Oracle Application Express Runtime Environment"

Topics in this section include:

- Scenario1: Downloading from OTN and Configuring the Embedded PL/SQL Gateway

- Scenario2: Downloading from OTN and Configuring Oracle HTTP Server

- Scenario3: Install from the Database and Configure the Embedded PL/SQL Gateway

- Scenario4: Install from the Database and Configure Oracle HTTP Server

1.5.1 Scenario 1: Downloading from OTN and Configuring the Embedded PL/SQL Gateway

Follow the steps in this scenario if you are downloading Oracle Application Express from Oracle Technology Network (OTN) and the embedded PL/SQL gateway. Required installation steps in this scenario include:

- Step 1: Install the Oracle Database and Complete Pre-installation Tasks

- Step 2: Download and Install Oracle Application Express

- Step 3: Change the Password for the ADMIN Account

- Step 4: Restart Processes

- Step 5: Configure the Embedded PL/SQL Gateway

- Step 6: Enable Network Servicesin Oracle Database 11g

- Step 7: Security Considerations

- Step 8: About Running Oracle Application Express in Other Languages

- Step 9: About Managing JOB_QUEUE_PROCESSES

- Step 10: Log In to Oracle Application Express

1.5.2 Scenario 2: Downloading from OTN and Configuring Oracle HTTP Server

Follow the steps in this scenario if you are downloading Oracle Application Express from Oracle Technology Network (OTN) and Oracle HTTP Server with mod_plsql distributed with Oracle Database 11g or Oracle Application Server 10g. Required steps in this scenario include:

- Step 1: Install the Oracle Database and Complete Pre-installation Tasks

- Step 2: Download and Install Oracle Application Express

- Step 3: Change the Password for the ADMIN Account

- Step 4: Restart Processes

- Step 5: Configure Oracle HTTP Server Distributed with Oracle Database 11g or Oracle Application Server 10g

- Step 6: Enable Network Services in Oracle Database 11g

- Step 7: Security Considerations

- Step 8: About Running Oracle Application Express in Other Languages

- Step 9: About Managing JOB_QUEUE_PROCESSES

- Step 10: About Obfuscating PlsqlDatabasePassword Parameter

- Step 11: Log In to Oracle Application Express

See Also:
"Configuring Oracle HTTP Server Distributed with Oracle9i Release 2".

1.5.3 Scenario 3: Install from the Database and Configure the Embedded PL/SQL Gateway

Follow the steps in this scenario if you are using a version of Oracle Application Express that installs with Oracle Database 11g or later and the embedded PL/SQL gateway. Required steps in this scenario include:

- Step 1: Install the Oracle Database and Complete Pre-installation Tasks

- Step 2: Configure the Embedded PL/SQL Gateway

- Step 3: Enable Network Services in Oracle Database 11g

- Step 4: Security Considerations

- Step 5: About Running Oracle Application Express in Other Languages

- Step 6: About Managing JOB_QUEUE_PROCESSES

- Step 7: Log In to Oracle Application Express

1.5.4 Scenario 4: Install from the Database and Configure Oracle HTTP Server

Follow the steps in this scenario if you are using a version of Oracle Application Express that installs with Oracle Database 11g or later and Oracle HTTP Server with mod_plsql distributed with Oracle Database 11g or Oracle Application Server 10g. Required steps in this scenario include:

- Step 1: Install the Oracle Database and Complete Pre-installation Tasks

- Step 2: Configure Oracle HTTP Server Distributed with Oracle Database 11g or Oracle Application Server 10g

- Step 3: Enable Network Services in Oracle Database 11g

- Step 4: Security Considerations

- Step 5: About Running Oracle Application Express in Other Languages

- Step 6: About Managing JOB_QUEUE_PROCESSES

- Step 7: About Obfuscating PlsqlDatabasePassword Parameter

- Step 8: Log In to Oracle Application Express

See Also:
"Configuring Oracle HTTP Server Distributed with Oracle9i Release 2".

2 Oracle Application Express Installation Requirements

This chapter describes the requirements for installing Oracle Application Express.

This chapter contains these topics:

- Oracle Database Requirement

- Browser Requirement

- HTTP Server Requirements

- Disk Space Requirement

- Oracle XML DB Requirement

- Oracle Text Requirement

- PL/SQL Web Toolkit

2.1 Oracle Database Requirement

Oracle Application Express version 3.1 requires an Oracle database that is release 9.2.0.3 or later.

Note:
You can upgrade the version of Oracle Application Express in Oracle Database Express Edition 10g Release 2 (10.2), by installing Oracle Application Express version 3.1. For more information, see the Oracle Application Express page on Oracle Technology Network (OTN).

2.1.1 Oracle JVM Requirement

If you plan to run Oracle Application Express with an Oracle database earlier than Oracle Database 10g release 1 (10.1), you must install Oracle Java Virtual Machine (JVM). To learn more, see the Oracle Database Installation Guide for your operating environment.

2.1.2 Checking the shared_pool_size of the Target Database

Note:
Ignore this requirement if your configuration uses non-null values for the database initialization parameters SGA_TARGET (in Oracle Database 10g and 11g) or MEMORY_TARGET (in Oracle Database 11g).

Oracle Application Express requires the shared_pool_size of the target database to be at least 100 MB.

To check the shared_pool_size of the target database:

1. Start the database:

SQL> STARTUP

2. If necessary, enter the following command to determine whether the system uses an initialization parameter file (initsid.ora) or a server parameter file (spfiledbname.ora):

SQL> SHOW PARAMETER PFILE;

This command displays the name and location of the server parameter file or the initialization parameter file.

3. Determine the current values of the shared_pool_size parameter:

SQL> SHOW PARAMETER SHARED_POOL_SIZE

4. If the system is using a server parameter file, set the value of the SHARED_POOL_SIZE initialization parameter to at least 100 MB:

SQL> ALTER SYSTEM SET SHARED_POOL_SIZE='100M' SCOPE=spfile;

5. If the system uses an initialization parameter file, change the values of the SHARED_POOL_SIZE parameter to at least 100 MB in the initialization parameter file (initsid.ora).

6. Shut down the database:

SQL> SHUTDOWN

7. Restart the database:

SQL> STARTUP

2.2 Browser Requirement

To view or develop Oracle Application Express applications, Web browsers must support Java Script and the HTML 4.0 and CSS 1.0 standards. The following browsers meet these requirements:

- Microsoft Internet Explorer 6.0 or later version

- Firefox 1.0 or later

2.3 HTTP Server Requirements

In order to run, Oracle Application Express must have access to one of the following:

- Embedded PL/SQL gateway

- Oracle HTTP Server and mod_plsql

Oracle XML DB HTTP Server with the embedded PL/SQL gateway installs with Oracle Database 11g. It provides the database with a Web server and the necessary infrastructure to create dynamic applications.

Oracle HTTP Server uses the mod_plsql plug-in to communicate with the Oracle Application Express engine within the Oracle database. The following products include appropriate versions of HTTP Server and mod_plsql:

- Oracle9i release 2 (9.2) or later

- Oracle9i Application Server release 1 (1.0.2.2) or later

- Oracle Database 10g Companion CD release 1 or 2

- Oracle Database 11g release 1

See Also:
"About Choosing an HTTP Server"

2.4 Disk Space Requirement

Oracle Application Express disk space requirements are as follows:

- Free space for Oracle Application Express software files on the file system: 450 MB

- Free space in Oracle Application Express tablespace: 125 MB

- Free space in SYSTEM tablespace: 85 MB

- Free space in Oracle Application Express tablespace for each additional language (other than English) installed: 34 MB

2.5 Oracle XML DB Requirement

Oracle XML DB must be installed in the Oracle database that you want to use. If you are using a preconfigured database created either during an installation or by Database Configuration Assistant (DBCA), Oracle XML DB is already installed and configured.

See Also:
Oracle XML DB Developer's Guide for more information about manually adding Oracle XML DB to an existing database

Tip:
The installer does a prerequisite check for Oracle XML DB and will exit if it is not installed.

2.6 Oracle Text Requirement

Oracle Text must be installed in order to use the searchable online Help in Oracle Application Express. By default, Oracle Text is installed as part of Oracle Database.

In addition, make sure that the default language preferences for Oracle Text have been installed. To install the Oracle Text default language, log in to the Oracle database where you plan to install Oracle Application Express and run the appropriate drdeflang.sql script, which by default is located in ORACLE_BASE\ORACLE_HOME\ctx\admin\defaults. For example, to run the language preferences script for US English, drdefus.sql:

jstraub: c:\> sqlplus /nolog
SQL> connect ctxsys
Enter password: password
SQL> @c:\oracle\product\10.2.0\db_1\ctx\admin\defaults\drdefus.sql

See Also:
Oracle Text Application Developer's Guide for more information on Oracle Text and "Enabling Network Services in Oracle Database 11g" for your configuration scenario.

Tip:
The installer does a prerequisite check for Oracle Text and will exit if it is not installed.

2.7 PL/SQL Web Toolkit

Oracle Application Express requires the PL/SQL Web Toolkit version 10.1.2.0.6 or later. For instructions on determining the current version of the PL/SQL Web Toolkit, and for instructions on installing version 10.1.2.0.6, please review the README.txt file contained in the directory apex/owa.

3 Downloading from Oracle Technology Network

This chapter describes how to install Oracle Application Express by downloading a ZIP file from Oracle Technology Network (OTN) and completing the appropriate post-installation tasks.

The instructions in this chapter apply to both new and upgrade installations. To learn more, see "Upgrading from a Previous Version of Oracle Application Express".

This chapter contains these topics:

- Recommended Pre-installation Tasks

- Choosing an HTTP Server

- Downloading from OTN and Configuring the Embedded PL/SQL Gateway

- Downloading from OTN and Configuring Oracle HTTP Server

- About the Oracle Application Express Runtime Environment

Note:
Within the context of this document, the Apache Oracle home directory (ORACLE_HTTPSERVER_HOME) is the location where Oracle HTTP Server is installed.

3.1 Recommended Pre-installation Tasks

Before installing Oracle Application Express, Oracle recommends that you complete the following steps:

1. Review and satisfy all Oracle Application Express installation requirements. See "Oracle Application Express Installation Requirements".

2. Shut down any existing Oracle Database instances with normal or immediate priority, except for the database where you plan to install the Oracle Application Express schemas. On Real Application Clusters (RAC) systems, shut down all instances on each node.
If Automatic Storage Management (ASM) is running, shut down all databases that use ASM except for the database where you will install Oracle Application Express, and then shut down the ASM instance.

You can use the Windows Services utility, located either in the Windows Control Panel or from the Administrative Tools menu (under Start and then Programs), to shut down Oracle Database and ASM instances. Names of Oracle databases are preceded with OracleService. The Oracle ASM service is named OracleASMService+ASM. In addition, shut down the OracleCSService service, which ASM uses. Right-click the name of the service and from the menu, choose Stop.

3. Back up the Oracle Database installation.
Oracle recommends that you create a backup of the current installation of Oracle Database installation before you install Oracle Application Express. You can use Oracle Database Recovery Manager, which is included the Oracle Database installation, to perform the backup.

See Also:
Oracle Database Backup and Recovery User's Guide

4. Start the Oracle Database instance that contains the target database.
After backing up the system, you must start the Oracle instance that contains the target Oracle database. Do not start other processes such as the listener or Oracle HTTP Server. However, if you are performing a remote installation, make sure the database listener for the remote database has started.

Note:
If you are connecting to a remote database, then start the listener.

3.2 Choosing an HTTP Server

In order to run, Oracle Application Express must have access to either the embedded PL/SQL gateway or Oracle HTTP Server and mod_plsql. To learn more, see "About Choosing an HTTP Server".

3.3 Downloading from OTN and Configuring the Embedded PL/SQL Gateway

This section describes how to install Oracle Application Express by downloading a ZIP file from OTN and then configuring the embedded PL/SQL gateway.

Topics in this section include:

- Install the Oracle Database and Complete Pre-installation Tasks

- Download and Install Oracle Application Express

- Change the Password for the ADMIN Account

- Restart Processes

- Configure the Embedded PL/SQL Gateway

- Enable Network Servicesin Oracle Database 11g

- Security Considerations

- About Running Oracle Application Express in Other Languages

- About Managing JOB_QUEUE_PROCESSES

- Configuring the SHARED_SERVERS Parameter

- Log In to Oracle Application Express

See Also:
"About the Oracle Application Express Runtime Environment"

3.3.1 Install the Oracle Database and Complete Pre-installation Tasks

Oracle Application Express requires an Oracle database that is release 9.2.0.3 or later. To learn more, see the Oracle Database Installation Guide for your operating environment and "Recommended Pre-installation Tasks".

3.3.2 Download and Install Oracle Application Express

To install Oracle Application Express:

1. Download the file apex_3.1.zip from the Oracle Application Express download page. See:

http://www.oracle.com/technology/products/database/application_express/download.html

Note that the actual file name may differ if a more recent release has shipped since this document was published.

2. Unzip apex_3.1.zip as follows, preserving directory names:

- UNIX and Linux: Unzip apex_3.1.zip

- Windows: Double click the file apex_3.1.zip in Windows Explorer

3. Change your working directory to apex.

4. Start SQL*Plus and connect to the database where Oracle Application Express is installed as SYS specifying the SYSDBA role. For example:

- On Windows:

SYSTEM_DRIVE:\ sqlplus /nolog
SQL> CONNECT SYS as SYSDBA
Enter password: SYS_password

- On UNIX and Linux:

$ sqlplus /nolog
SQL> CONNECT SYS as SYSDBA
Enter password: SYS_password

5. Select the appropriate installation option.
Full development environment provides complete access to the Application Builder environment to develop applications. ARuntime environment enables users to run applications that cannot be modified. To learn more, see "About the Oracle Application Express Runtime Environment".

Available installation options include:

- Full development environment. Run apexins.sql passing the following four arguments in the order shown:

@apexins tablespace_apex tablespace_files tablespace_temp images

Where:

- tablespace_apex is the name of the tablespace for the Oracle Application Express application user.

- tablespace_files is the name of the tablespace for the Oracle Application Express files user.

- tablespace_temp is the name of the temporary tablespace.

- images is the virtual directory for Oracle Application Express images. To support future Oracle Application Express upgrades, define the virtual image directory as /i/.

Example:

@apexins SYSAUX SYSAUX TEMP /i/

- Runtime environment. Run apxrtins.sql passing the following arguments in the order shown:

@apxrtins tablespace_apex tablespace_files tablespace_temp images

Where:

- tablespace_apex is the name of the tablespace for the Oracle Application Express application user.

- tablespace_files is the name of the tablespace for the Oracle Application Express files user.

- tablespace_temp is the name of the temporary tablespace.

- images is the virtual directory for Oracle Application Express images. To support future Oracle Application Express upgrades, define the virtual image directory as /i/.

Example:

@apxrtins SYSAUX SYSAUX TEMP /i/

See Also:
Oracle Database PL/SQL Language Reference for more information about SQL*Plus

When Oracle Application Express installs it creates three new database accounts:

- FLOWS_030100 - The account that owns the Oracle Application Express schema and metadata.

- FLOWS_FILES - The account that owns the Oracle Application Express uploaded files.

- APEX_PUBLIC_USER - The minimally privileged account used for Oracle Application Express configuration with Oracle HTTP Server and mod_plsql.

If you are upgrading from a previous release, FLOWS_FILES, already exists and APEX_PUBLIC_USER is created if it does not already exist.

Tip:
Oracle Application Express must be installed from a writable directory on the file system. See "Reviewing a Log of an Installation Session".

3.3.3 Change the Password for the ADMIN Account

In a new installation of Oracle Application Express, or if you are converting a runtime environment to a development environment, you must change the password of the internal ADMIN account. In an upgrade scenario, the password will be preserved and carried over from the prior release.

To change the password for the ADMIN account:

1. Change your working directory to the apex directory where you unzipped the installation software.

2. Start SQL*Plus and connect to the database where Oracle Application Express is installed as SYS specifying the SYSDBA role. For example:

- On Windows:

SYSTEM_DRIVE:\ sqlplus /nolog
SQL> CONNECT SYS as SYSDBA
Enter password: SYS_password

- On UNIX and Linux:

$ sqlplus /nolog
SQL> CONNECT SYS as SYSDBA
Enter password: SYS_password

3. Run apxchpwd.sql. For example:

@apxchpwd

When prompted enter a password for the ADMIN account.

See Also:
Oracle Database PL/SQL Language Reference for more information about SQL*Plus

3.3.4 Restart Processes

After you install Oracle Application Express, you need to restart the processes that you stopped before you began the installation, such as listener and other processes.

3.3.5 Configure the Embedded PL/SQL Gateway

The embedded PL/SQL gateway installs with the Oracle Database 11g. However, you must configure it before you can use it with Oracle Application Express. To accomplish this, you run a configuration file and unlock the ANONYMOUS account.

Note:
The Oracle XML DB HTTP Server with the embedded PL/SQL gateway is not supported prior to Oracle Database 11g.

Topics in this section include:

- Running the apex_epg_config.sql Configuration Script

- Updating the Images Directory When Upgrading from Release 3.0

- Verifying the Oracle XML DB HTTP Server Port

- Enabling Oracle XML DB HTTP Server

- Disabling Oracle XML DB HTTP Server

See Also:
"About Choosing an HTTP Server" and "About the Embedded PL/SQL Gateway"

3.3.5.1 Running the apex_epg_config.sql Configuration Script

In a new installation, you configure the embedded PL/SQL gateway by running the configuration script apex_epg_config.sql. Then, you unlock the ANONYMOUS account.

Note:
If you are upgrading and have previously configured the embedded PL/SQL gateway, skip this section and go to "Updating the Images Directory When Upgrading from Release 3.0".

To run the apex_epg_config.sql configuration script:

1. Change your working directory to the apex directory where you unzipped the Oracle Application Express software.

2. Start SQL*Plus and connect to the database where Oracle Application Express is installed as SYS specifying the SYSDBA role. For example:

- On Windows:

SYSTEM_DRIVE:\ sqlplus /nolog
SQL> CONNECT SYS as SYSDBA
Enter password: SYS_password

- On UNIX and Linux:

$ sqlplus /nolog
SQL> CONNECT SYS as SYSDBA
Enter password: SYS_password

3. Run apex_epg_config.sql passing the file system path to the base directory where the Oracle Application Express software was unzipped as shown in the following example:

- On Windows:

@apex_epg_config SYSTEM_DRIVE:\TEMP

- On UNIX and Linux:

@apex_epg_config /tmp

4. Enter the following statement to unlock the ANONYMOUS account:

ALTER USER ANONYMOUS ACCOUNT UNLOCK;

3.3.5.2 Updating the Images Directory When Upgrading from Release 3.0

If you are upgrading Oracle Application Express from release 3.0, you must run the apxldimg.sql script to update the images directory.

Tip:
If you are not upgrading from a prior release of Oracle Application Express, this step is unnecessary. The images will be loaded by running apex_epg_config.sql as described in the prior section.

To run the apxldimg.sql script:

1. Start SQL*Plus and connect to the database where Oracle Application Express is installed as SYS specifying the SYSDBA role:

- On Windows:

SYSTEM_DRIVE:\ sqlplus /nolog
SQL> CONNECT SYS as SYSDBA
Enter password: SYS_password

- On UNIX and Linux:

$ sqlplus /nolog
SQL> CONNECT SYS as SYSDBA
Enter password: SYS_password

2. Run apxldimg.sql passing the file system path to the base directory where the Oracle Application Express software was unzipped as shown in the following example:

- On Windows:

@apxldimg.sql SYSTEM_DRIVE:\TEMP

- On UNIX and Linux:

@apxldimg.sql /tmp

Tip:
The above examples assume that you unzipped Oracle Application Express in a directory called TEMP on Windows and tmp on UNIX or Linux.

3.3.5.3 Verifying the Oracle XML DB HTTP Server Port

The embedded PL/SQL gateway runs in the Oracle XML DB HTTP server in the Oracle database. You can determine if the Oracle XML DB HTTP server is enabled by verifying the associated port number.

To verify the port number where the Oracle XML DB HTTP Server is running:

1. Start SQL*Plus and connect to the database where Oracle Application Express is installed as SYS specifying the SYSDBA role:

- On Windows:

SYSTEM_DRIVE:\ sqlplus /nolog
SQL> CONNECT SYS as SYSDBA
Enter password: SYS_password

- On UNIX and Linux:

$ sqlplus /nolog
SQL> CONNECT SYS as SYSDBA
Enter password: SYS_password

2. Enter the following statement to verify the port number:

SELECT DBMS_XDB.GETHTTPPORT FROM DUAL;

If the port number returns 0, the Oracle XML DB HTTP Server is disabled.

3. To enable it, follow the instructions in "Enabling Oracle XML DB HTTP Server".

3.3.5.4 Enabling Oracle XML DB HTTP Server

The embedded PL/SQL gateway runs in the Oracle XML DB HTTP server in the Oracle database.

To enable Oracle XML DB HTTP server:

1. Start SQL*Plus and connect to the database where Oracle Application Express is installed as SYS specifying the SYSDBA role. For example:

- On Windows:

SYSTEM_DRIVE:\ sqlplus /nolog
SQL> CONNECT SYS as SYSDBA
Enter password: SYS_password

- On UNIX and Linux:

$ sqlplus /nolog
SQL> CONNECT SYS as SYSDBA
Enter password: SYS_password

2. Enter a statement similar to the following:

EXEC DBMS_XDB.SETHTTPPORT(port);

For example:

EXEC DBMS_XDB.SETHTTPPORT(8080);

Note:
Port numbers less than 1024 are reserved for use by privileged processes on many operating systems. To enable the XML DB HTTP listener on a port less than 1024, such as 80, review the following documentation:

- "Using Protocols to Access the Repository" in Oracle XML DB Developer's Guide.

- "Protocol Address Configuration" and "Port Number Limitations" in Oracle Database Net Services Reference.

3.3.5.5 Disabling Oracle XML DB HTTP Server

The embedded PL/SQL gateway runs in the Oracle XML DB HTTP server in the Oracle database.

To disable Oracle XML DB HTTP server:

1. Start SQL*Plus and connect to the database where Oracle Application Express is installed as SYS specifying the SYSDBA role. For example:

- On Windows:

SYSTEM_DRIVE:\ sqlplus /nolog
SQL> CONNECT SYS as SYSDBA
Enter password: SYS_password

- On UNIX and Linux:

$ sqlplus /nolog
SQL> CONNECT SYS as SYSDBA
Enter password: SYS_password

2. Run the following command:

EXEC DBMS_XDB.SETHTTPPORT(0);

3.3.6 Enable Network Services in Oracle Database 11g

By default, the ability to interact with network services is disabled in Oracle Database 11g release 1 (11.1). Therefore, if you are running Oracle Application Express with Oracle Database 11g release 1 (11.1), you need to use the new DBMS_NETWORK_ACL_ADMIN package to grant connect privileges to any host for the FLOWS_030100 database user. Failing to grant these privileges results in issues with:

- Sending outbound mail in Oracle Application Express.
Users can call methods from the APEX_MAIL package, but issues arise when sending outbound email.

- Using Web services in Oracle Application Express.

- PDF/report printing.

- Searching for content in online Help (that is, using the Find link).

Topics in this section include:

- Granting Connect Privileges

- Troubleshooting an Invalid ACL Error

Tip:
To run the examples described in this section, the compatible initialization parameter of the database must be set to at least 11.1.0.0.0. By default an 11g database will already have the parameter set properly, but a database upgraded to 11g from a prior version may not. See "Creating and Configuring an Oracle Database" in Oracle Database Administrator's Guide for information about changing database initialization parameters.

3.3.6.1 Granting Connect Privileges

The following example demonstrates how to grant connect privileges to any host for the FLOWS_030100 database user.

DECLARE
ACL_PATH  VARCHAR2(4000);
ACL_ID    RAW(16);
BEGIN
-- Look for the ACL currently assigned to '*' and give FLOWS_030100
-- the "connect" privilege if FLOWS_030100 does not have the privilege yet.

SELECT ACL INTO ACL_PATH FROM DBA_NETWORK_ACLS
WHERE HOST = '*' AND LOWER_PORT IS NULL AND UPPER_PORT IS NULL;

-- Before checking the privilege, make sure that the ACL is valid
-- (for example, does not contain stale references to dropped users).
-- If it does, the following exception will be raised:
--
-- ORA-44416: Invalid ACL: Unresolved principal 'FLOWS_030100'
-- ORA-06512: at "XDB.DBMS_XDBZ", line ...
--
SELECT SYS_OP_R2O(extractValue(P.RES, '/Resource/XMLRef')) INTO ACL_ID
FROM XDB.XDB$ACL A, PATH_VIEW P
WHERE extractValue(P.RES, '/Resource/XMLRef') = REF(A) AND
EQUALS_PATH(P.RES, ACL_PATH) = 1;

DBMS_XDBZ.ValidateACL(ACL_ID);
IF DBMS_NETWORK_ACL_ADMIN.CHECK_PRIVILEGE(ACL_PATH, 'FLOWS_030100',
'connect') IS NULL THEN
DBMS_NETWORK_ACL_ADMIN.ADD_PRIVILEGE(ACL_PATH,
'FLOWS_030100', TRUE, 'connect');
END IF;

EXCEPTION
-- When no ACL has been assigned to '*'.
WHEN NO_DATA_FOUND THEN
DBMS_NETWORK_ACL_ADMIN.CREATE_ACL('power_users.xml',
'ACL that lets power users to connect to everywhere',
'FLOWS_030100', TRUE, 'connect');
DBMS_NETWORK_ACL_ADMIN.ASSIGN_ACL('power_users.xml','*');
END;
/
COMMIT;

The following example demonstrates how to provide less privileged access to local network resources. This example would enable indexing the Oracle Application Express Online Help and could possibly enable email and PDF printing if those servers were also on the local host.

DECLARE
ACL_PATH  VARCHAR2(4000);
ACL_ID    RAW(16);
BEGIN
-- Look for the ACL currently assigned to 'localhost' and give FLOWS_030100
-- the "connect" privilege if FLOWS_030100 does not have the privilege yet.
SELECT ACL INTO ACL_PATH FROM DBA_NETWORK_ACLS
WHERE HOST = 'localhost' AND LOWER_PORT IS NULL AND UPPER_PORT IS NULL;

-- Before checking the privilege, make sure that the ACL is valid
-- (for example, does not contain stale references to dropped users).
-- If it does, the following exception will be raised:
--
-- ORA-44416: Invalid ACL: Unresolved principal 'FLOWS_030100'
-- ORA-06512: at "XDB.DBMS_XDBZ", line ...
--

SELECT SYS_OP_R2O(extractValue(P.RES, '/Resource/XMLRef')) INTO ACL_ID
FROM XDB.XDB$ACL A, PATH_VIEW P
WHERE extractValue(P.RES, '/Resource/XMLRef') = REF(A) AND
EQUALS_PATH(P.RES, ACL_PATH) = 1;

DBMS_XDBZ.ValidateACL(ACL_ID);
IF DBMS_NETWORK_ACL_ADMIN.CHECK_PRIVILEGE(ACL_PATH, 'FLOWS_030100',
'connect') IS NULL THEN
DBMS_NETWORK_ACL_ADMIN.ADD_PRIVILEGE(ACL_PATH,
'FLOWS_030100', TRUE, 'connect');
END IF;

EXCEPTION
-- When no ACL has been assigned to 'localhost'.
WHEN NO_DATA_FOUND THEN
DBMS_NETWORK_ACL_ADMIN.CREATE_ACL('local-access-users.xml',
'ACL that lets power users to connect to everywhere',
'FLOWS_030100', TRUE, 'connect');
DBMS_NETWORK_ACL_ADMIN.ASSIGN_ACL('local-access-users.xml','localhost');
END;
/
COMMIT;

3.3.6.2 Troubleshooting an Invalid ACL Error

If you receive an ORA-44416: Invalid ACL error after running the previous script, use the following query to identify the invalid ACL:

REM Show the dangling references to dropped users in the ACL that is assigned
REM to '*'.

SELECT ACL, PRINCIPAL
FROM DBA_NETWORK_ACLS NACL, XDS_ACE ACE
WHERE HOST = '*' AND LOWER_PORT IS NULL AND UPPER_PORT IS NULL AND
NACL.ACLID = ACE.ACLID AND
NOT EXISTS (SELECT NULL FROM ALL_USERS WHERE USERNAME = PRINCIPAL);

Next, run the following code to fix the ACL:

DECLARE
ACL_ID   RAW(16);
CNT      NUMBER;
BEGIN
-- Look for the object ID of the ACL currently assigned to '*'
SELECT ACLID INTO ACL_ID FROM DBA_NETWORK_ACLS
WHERE HOST = '*' AND LOWER_PORT IS NULL AND UPPER_PORT IS NULL;

-- If just some users referenced in the ACL are invalid, remove just those
-- users in the ACL. Otherwise, drop the ACL completely.
SELECT COUNT(PRINCIPAL) INTO CNT FROM XDS_ACE
WHERE ACLID = ACL_ID AND
EXISTS (SELECT NULL FROM ALL_USERS WHERE USERNAME = PRINCIPAL);

IF (CNT > 0) THEN

FOR R IN (SELECT PRINCIPAL FROM XDS_ACE
WHERE ACLID = ACL_ID AND
NOT EXISTS (SELECT NULL FROM ALL_USERS
WHERE USERNAME = PRINCIPAL)) LOOP
UPDATE XDB.XDB$ACL
SET OBJECT_VALUE =
DELETEXML(OBJECT_VALUE,
'/ACL/ACE[PRINCIPAL="'||R.PRINCIPAL||'"]')
WHERE OBJECT_ID = ACL_ID;
END LOOP;

ELSE
DELETE FROM XDB.XDB$ACL WHERE OBJECT_ID = ACL_ID;
END IF;

END;
/

REM commit the changes.

COMMIT;

Once the ACL has been fixed, you need to run the first script in this section to apply the ACL to the FLOWS_030100 user. See "Granting Connect Privileges".

3.3.7 Security Considerations

Oracle highly recommends you configure and use Secure Sockets Layer (SSL) to ensure that passwords and other sensitive data are not transmitted in clear text in HTTP requests. Without the use of SSL, passwords could potentially be exposed, compromising security.

SSL is an industry standard protocol that uses RSA public key cryptography in conjunction with symmetric key cryptography to provide authentication, encryption, and data integrity.

3.3.8 About Running Oracle Application Express in Other Languages

The Oracle Application Express interface is translated into German, Spanish, French, Italian, Japanese, Korean, Brazilian Portuguese, Simplified Chinese, and Traditional Chinese. A single instance of Oracle Application Express can be installed with one or more of these translated versions. At runtime, each user's Web browser language settings determine the specific language version.

The translated version of Oracle Application Express should be loaded into a database that has a character set that supports the specific language. If you attempt to install a translated version of Oracle Application Express into a database that does not support the character encoding of the language, the installation may fail or the translated Oracle Application Express instance may appear corrupt when run. The database character set AL32UTF8 supports all the translated versions of Oracle Application Express.

You can manually install translated versions of Oracle Application Express using SQL*Plus. The installation files are encoded in AL32UTF8.

Note:
Regardless of the target database character set, to install a translated version of Oracle Application Express, you must set the character set value of the NLS_LANG environment variable to AL32UTF8 prior to starting SQL*Plus.

The following examples illustrate valid NLS_LANG settings for loading Oracle Application Express translations:

American_America.AL32UTF8
Japanese_Japan.AL32UTF8

3.3.8.1 Installing a Translated Version of Oracle Application Express

Whether you are installing for the first time or upgrading from a previous release, you must run the load_lang.sql script to run a translated version of Oracle Application Express.

The installation scripts are located in subdirectories identified by a language code in the unzipped distribution apex/builder. For example, the German version is located in apex/builder/de and the Japanese version is located in apex/builder/ja. Within each of directory, there is a language loading script identified by the language code (for example, load_de.sql or load_ja.sql).

To install a translated version of Oracle Application Express:

1. Set the NLS_LANG environment variable, making sure that the character set is AL32UTF8. For example:

- Bourne or Korn shell:

NLS_LANG=American_America.AL32UTF8
export NLS_LANG

- C shell:

setenv NLS_LANG American_America.AL32UTF8

- For Windows based systems:

set NLS_LANG=American_America.AL32UTF8

2. Start SQL*Plus and connect to the database where Oracle Application Express is installed as SYS specifying the SYSDBA role. For example:

- On Windows:

SYSTEM_DRIVE:\ sqlplus /nolog
SQL> CONNECT SYS as SYSDBA
Enter password: SYS_password

- On UNIX and Linux:

$ sqlplus /nolog
SQL> CONNECT SYS as SYSDBA
Enter password: SYS_password

3. Execute the following statement:

ALTER SESSION SET CURRENT_SCHEMA = FLOWS_030100;

4. Execute the appropriate language specific script. For example:

@load_lang.sql

Where lang is the specific language (for example, load_de.sql for German or load_ja.sql for Japanese).

3.3.9 About Managing JOB_QUEUE_PROCESSES

JOB_QUEUE_PROCESSES determine the maximum number of concurrently running jobs. In Oracle Application Express release 3.0, transactional support and SQL scripts require jobs. If JOB_QUEUE_PROCESSES is not enabled and working properly, you cannot successfully execute a script.

Topics in this section include:

- Viewing the Number of JOB_QUEUE_PROCESSES

- Changing the Number of JOB_QUEUE_PROCESSES

3.3.9.1 Viewing the Number of JOB_QUEUE_PROCESSES

There are currently three ways to view the number of JOB_QUEUE_PROCESSES:

- In the installation log file

- On the About Application Express page in Oracle Application Express

- From SQL*Plus

3.3.9.1.1 Viewing JOB_QUEUE_PROCESSES in the Installation Log File

After installing or upgrading Oracle Application Express to release 3.0, you can view the number of JOB_QUEUE_PROCESSES in the installation log files. See "Reviewing a Log of an Installation Session".

3.3.9.1.2 Viewing JOB_QUEUE_PROCESSES in Oracle Application Express

You can also view the number of JOB_QUEUE_PROCESSES on the About Application Express page.

To view the About Application Express page:

1. Log in to Oracle Application Express. See "Log In to Oracle Application Express".

2. On the Administration list, click About Application Express.
The current number JOB_QUEUE_PROCESSES displays at the bottom of the page.

3.3.9.1.3 Viewing JOB_QUEUE_PROCESSES from SQL*Plus

You can also view the number of JOB_QUEUE_PROCESSES from SQL*Plus by running the following SQL statement:

SELECT VALUE FROM v$parameter WHERE NAME = 'job_queue_processes'

3.3.9.2 Changing the Number of JOB_QUEUE_PROCESSES

You can change the number of JOB_QUEUE_PROCESSES by running a SQL statement in SQL*Plus:

To update the number of JOB_QUEUE_PROCESSES:

1. Start SQL*Plus and connect to the database where Oracle Application Express is installed as SYS specifying the SYSDBA role:

- On Windows:

SYSTEM_DRIVE:\ sqlplus /nolog
SQL> CONNECT SYS as SYSDBA
Enter password: SYS_password

- On UNIX and Linux:

$ sqlplus /nolog
SQL> CONNECT SYS as SYSDBA
Enter password: SYS_password

2. In SQL*Plus run the following SQL statement:

ALTER SYSTEM SET JOB_QUEUE_PROCESSES = <number>

For example, running the statement ALTER SYSTEM SET JOB_QUEUE_PROCESSES = 20 sets JOB_QUEUE_PROCESSES to 20.

3.3.10 Configuring the SHARED_SERVERS Parameter

The embedded PL/SQL gateway uses the shared server architecture of the Oracle Database. To achieve acceptable performance when using the embedded PL/SQL gateway, ensure the SHARED_SERVERS database initialization parameter is set to a reasonable value (that is, not 0 or 1). For a small group of concurrent users, Oracle recommends a value of 5 for SHARED_SERVERS.

Consider the following example:

1. Start SQL*Plus and connect to the database where Oracle Application Express is installed as SYS specifying the SYSDBA role. For example:

- On Windows:

SYSTEM_DRIVE:\ sqlplus /nolog
SQL> CONNECT SYS as SYSDBA
Enter password: SYS_password

- On UNIX and Linux:

$ sqlplus /nolog
SQL> CONNECT SYS as SYSDBA
Enter password: SYS_password

2. Run the following statement:

ALTER SYSTEM SET SHARED_SERVERS = 5 SCOPE=BOTH;

3.3.11 Log In to Oracle Application Express

You access the Oracle Application Express home page in a Web browser. To view or develop Oracle Application Express applications, the Web browser must support JavaScript and the HTML 4.0 and CSS 1.0 standards. See "Browser Requirement".

Topics in this section include:

- About Application Express User Roles

- About Setting Up Your Local Development Environment

3.3.11.1 About Application Express User Roles

In the Oracle Application Express development environment, users log in to a shared work area called a workspace. Users are divided into four primary roles:

- Oracle Application Express administrators are superusers that manage an entire hosted instance using the Oracle Application Express Administration Services application.

- Workspace administrators are users who perform administrator tasks specific to a workspace such as managing user accounts, monitoring workspace activity, and viewing log files.

- Developers are users who create and edit applications. Developers can have their own workspace or share a workspace.

- End users have no development privileges. You define end users so that they can access applications that do not use an external authentication scheme.

3.3.11.2 About Setting Up Your Local Development Environment

How you set up Oracle Application Express depends upon your user role. If you are a developer accessing a hosted development environment, an administrator must grant you access to a workspace. If you are an Oracle Application Express administrator, you must perform the following steps:

1. Log in to Oracle Application Express Administration Services. Oracle Application Express Administration Services is a separate application for managing an entire Oracle Application Express instance. You log in using the ADMIN account and password created or reset during the installation process.

2. Specify a provisioning mode. In Oracle Application Express Administration Services, you need to determine how the process of creating (or provisioning) a workspace will work in your development environment.

3. Create a Workspace. A workspace is a virtual private database allowing multiple users to work within the same Oracle Application Express installation while keeping their objects, data and applications private. Each workspace has a unique ID and name. An Oracle Application Express administrator can create a workspace manually or have users submit requests.

4. Log in to a Workspace. Once you create a workspace in Oracle Application Express Administration Services, return to the Oracle Application Express Login page and log in to that workspace.

To learn more about setting up your environment, see Oracle Database 2 Day + Oracle Application Express Developer's Guide or "Quick Start" in Oracle Application Express Application Builder User's Guide

3.4 Downloading from OTN and Configuring Oracle HTTP Server

This section describes how to install Oracle Application Express by downloading a ZIP file from OTN and then configuring Oracle HTTP Server with mod_plsql distributed with Oracle Database 11g or Oracle Application Server 10g.

Topics in this section include:

- Install the Oracle Database and Complete Pre-installation Tasks

- Download and Install Oracle Application Express

- Change the Password for the ADMIN Account

- Restart Processes

- Configure Oracle HTTP Server Distributed with Oracle Database 11g or Oracle Application Server 10g

- Enable Network Services in Oracle Database 11g

- Security Considerations

- About Running Oracle Application Express in Other Languages

- About Managing JOB_QUEUE_PROCESSES

- About Obfuscating PlsqlDatabasePassword Parameter

- Log In to Oracle Application Express

See Also:
"About the Oracle Application Express Runtime Environment" and "Configuring Oracle HTTP Server Distributed with Oracle9i Release 2"

3.4.1 Install the Oracle Database and Complete Pre-installation Tasks

Oracle Application Express requires an Oracle database that is release 9.2.0.3 or later. To learn more, see the Oracle Database Installation Guide for your operating environment and "Recommended Pre-installation Tasks".

3.4.2 Download and Install Oracle Application Express

To install Oracle Application Express:

1. Download the file apex_3.1.zip from the Oracle Application Express download page. See:

http://www.oracle.com/technology/products/database/application_express/download.html

Note that the actual file name may differ if a more recent release has shipped since this document was published.

2. Unzip apex_3.1.zip as follows, preserving directory names:

- UNIX and Linux: Unzip apex_3.1.zip

- Windows: Double click the file apex_3.1.zip in Windows Explorer

3. Change your working directory to apex.

4. Start SQL*Plus and connect to the database where Oracle Application Express is installed as SYS specifying the SYSDBA role. For example:

- On Windows:

SYSTEM_DRIVE:\ sqlplus /nolog
SQL> CONNECT SYS as SYSDBA
Enter password: SYS_password

- On UNIX and Linux:

$ sqlplus /nolog
SQL> CONNECT SYS as SYSDBA
Enter password: SYS_password

5. Select the appropriate installation option.
Full development environment provides complete access to the Application Builder environment to develop applications. ARuntime environment enables users to run applications that cannot be modified. To learn more, see "About the Oracle Application Express Runtime Environment".

Available installation options include:

- Full development environment. Run apexins.sql passing the following four arguments in the order shown:

@apexins tablespace_apex tablespace_files tablespace_temp images

Where:

- tablespace_apex is the name of the tablespace for the Oracle Application Express application user.

- tablespace_files is the name of the tablespace for the Oracle Application Express files user.

- tablespace_temp is the name of the temporary tablespace.

- images is the virtual directory for Oracle Application Express images. To support future Oracle Application Express upgrades, define the virtual image directory as /i/.

Example:

@apexins SYSAUX SYSAUX TEMP /i/

- Runtime environment. Run apxrtins.sql passing the following arguments in the order shown:

@apxrtins tablespace_apex tablespace_files tablespace_temp images

Where:

- tablespace_apex is the name of the tablespace for the Oracle Application Express application user.

- tablespace_files is the name of the tablespace for the Oracle Application Express files user.

- tablespace_temp is the name of the temporary tablespace.

- images is the virtual directory for Oracle Application Express images. To support future Oracle Application Express upgrades, define the virtual image directory as /i/.

Example:

@apxrtins SYSAUX SYSAUX TEMP /i/

See Also:
Oracle Database PL/SQL Language Reference for more information about SQL*Plus

When Oracle Application Express installs it creates three new database accounts:

- FLOWS_030100 - The account that owns the Oracle Application Express schema and metadata.

- FLOWS_FILES - The account that owns the Oracle Application Express uploaded files.

- APEX_PUBLIC_USER - The minimally privileged account used for Oracle Application Express configuration with Oracle HTTP Server and mod_plsql.

If you are upgrading from a previous release, FLOWS_FILES, already exists and APEX_PUBLIC_USER is created if it does not already exist.

Tip:
Oracle Application Express must be installed from a writable directory on the file system. See "Reviewing a Log of an Installation Session".

3.4.3 Change the Password for the ADMIN Account

In a new installation of Oracle Application Express, or if you are converting a runtime environment to a development environment, you must change the password of the internal ADMIN account. In an upgrade scenario, the password will be preserved and carried over from the prior release.

To change the password for the ADMIN account:

1. Change your working directory to the apex directory where you unzipped the installation software.

2. Start SQL*Plus and connect to the database where Oracle Application Express is installed as SYS specifying the SYSDBA role. For example:

- On Windows:

SYSTEM_DRIVE:\ sqlplus /nolog
SQL> CONNECT SYS as SYSDBA
Enter password: SYS_password

- On UNIX and Linux:

$ sqlplus /nolog
SQL> CONNECT SYS as SYSDBA
Enter password: SYS_password

3. Run apxchpwd.sql. For example:

@apxchpwd

When prompted enter a password for the ADMIN account.

See Also:
Oracle Database PL/SQL Language Reference for more information about SQL*Plus

3.4.4 Restart Processes

After you install Oracle Application Express, you need to restart the processes that you stopped before you began the installation, such as listener and other processes. In addition, restart Oracle HTTP Server.

3.4.5 Configure Oracle HTTP Server Distributed with Oracle Database 11g or Oracle Application Server 10g

This section describes how to configure Oracle HTTP Server with mod_plsql distributed with Oracle Database 11g or Oracle Application Server 10g.

Topics in this section include:

- Unlocking the APEX_PUBLIC_USER Account

- Changing the Password for the APEX_PUBLIC_USER Account

- Copying the Images Directory

- Configuring Oracle HTTP Server 11g or Oracle Application Server 10g

See Also:
"Configuring Oracle HTTP Server Distributed with Oracle9i Release 2"

3.4.5.1 Unlocking the APEX_PUBLIC_USER Account

The APEX_PUBLIC_USER account is locked at the end of a new installation of Oracle Application Express. You need to unlock this account prior to configuring the database access descriptor (DAD) in a new installation.

Tip:
If you are upgrading from a prior release of Oracle Application Express, this step is unnecessary.

To unlock the APEX_PUBLIC_USER account:

1. Start SQL*Plus and connect to the database where Oracle Application Express is installed as SYS specifying the SYSDBA role. For example:

- On Windows:

SYSTEM_DRIVE:\ sqlplus /nolog
SQL> CONNECT SYS as SYSDBA
Enter password: SYS_password

- On UNIX and Linux:

$ sqlplus /nolog
SQL> CONNECT SYS as SYSDBA
Enter password: SYS_password

2. Run the following statement:

ALTER USER APEX_PUBLIC_USER ACCOUNT UNLOCK

3.4.5.2 Changing the Password for the APEX_PUBLIC_USER Account

The APEX_PUBLIC_USER account is created with a random password in a new installation of Oracle Application Express. You will need to change the password for this account prior to configuring the database access descriptor (DAD) in a new installation.

Tip:
If you are upgrading from a prior release of Oracle Application Express, this step is unnecessary.

To change the password for the APEX_PUBLIC_USER account:

1. Start SQL*Plus and connect to the database where Oracle Application Express is installed as SYS specifying the SYSDBA role. For example:

- On Windows:

SYSTEM_DRIVE:\ sqlplus /nolog
SQL> CONNECT SYS as SYSDBA
Enter password: SYS_password

- On UNIX and Linux:

$ sqlplus /nolog
SQL> CONNECT SYS as SYSDBA
Enter password: SYS_password

2. Run the following statement:

ALTER USER APEX_PUBLIC_USER IDENTIFIED BY new_password

Where new_password is the new password you are setting for APEX_PUBLIC_USER. You will use this password when creating the DAD in the sections that follow.

3.4.5.3 Copying the Images Directory

Whether you are loading a new installation or upgrading from a previous release, you must copy the images directory from the top level of the apex\images directory to the location on the file system containing the Oracle home for Oracle HTTP Server.

Topics in this section include:

- Copying the Images Directory After an Upgrade

- Copying the Images Directory in a New Installation

3.4.5.3.1 Copying the Images Directory After an Upgrade

During an upgrade, you must overwrite your existing images directory. Before you begin the upgrade, to ensure that you can revert to the previous version, Oracle recommends that you create a copy of your existing images directory for Oracle Application Express, indicating the release number of the images (for example, images_3_0).

To locate the images directory on the file system, review the following files for the text alias /i/:

- Oracle HTTP Server distributed Oracle9i Release 2—see the httpd.conf file.

- Oracle Application Server 10g—see the marvel.conf file.

- Oracle HTTP Server distributed with Oracle Database 11g—see the marvel.conf file.

When you locate the images directory path, copy the existing images directory to a backup location. Doing so enables you to revert to the previous release, if that becomes necessary.

After you copy the existing images directory, use the following command syntax to copy the apex\images directory from the Oracle Database home to the existing images directory path, overwriting the existing images:

- Oracle Application Server 10g:

- On Windows:

xcopy /E /I APEX_HOME\apex\images ORACLE_HTTPSERVER_HOME\Apache\images

- On UNIX and Linux:

cp -rf APEX_HOME/apex/images ORACLE_HTTPSERVER_HOME/Apache

- Oracle HTTP Server distributed with Oracle Database 11g:

- On Windows:

xcopy /E /I APEX_HOME\apex\images ORACLE_HTTPSERVER_HOME\ohs\images

- On UNIX and Linux:

cp -rf APEX_HOME/apex/images ORACLE_HTTPSERVER_HOME/ohs

In the preceding syntax examples:

- APEX_HOME is the directory where the Oracle Application Express software was unzipped

- ORACLE_HTTPSERVER_HOME is the existing Oracle Application Server or Oracle HTTP Server Oracle home

3.4.5.3.2 Copying the Images Directory in a New Installation

After installation, copy the directory apex/images.

- Oracle Application Server 10g:

- On Windows:

xcopy /E /I ORACLE_HOME\apex\images ORACLE_HTTPSERVER_HOME\Apache\images

- On UNIX and Linux:

cp -rf $ORACLE_HOME/apex/images ORACLE_HTTPSERVER_HOME/Apache

- Oracle HTTP Server distributed with Oracle Database 11g:

- On Windows:

xcopy /E /I ORACLE_HOME\apex\images ORACLE_HTTPSERVER_HOME\ohs\images

- On UNIX and Linux:

cp -rf $ORACLE_HOME/apex/images ORACLE_HTTPSERVER_HOME/ohs

In the preceding syntax examples:

- ORACLE_HOME is the Oracle Database Oracle home

- ORACLE_HTTPSERVER_HOME is the existing Oracle Application Server or Oracle HTTP Server Oracle home

3.4.5.4 Configuring Oracle HTTP Server 11g or Oracle Application Server 10g

Perform the following post-installation steps if:

- This is a new installation of Oracle Application Express (that is, you are not upgrading from a previous release).

- You are running Oracle HTTP Server distributed with Oracle Database 11g or Oracle Application Server 10g.

- Oracle HTTP Server is installed in an Oracle home.

Topics in this section include:

- Editing the dads.conf File

- Stopping and Restarting Oracle HTTP Server

Note that these instructions do not apply if you are running Oracle HTTP Server release 9.0.3. To learn more, see "Configuring Oracle HTTP Server Distributed with Oracle9i Release 2".

Note:
Within the context of this document, ORACLE_HTTPSERVER_HOME is the location where Oracle HTTP Server is installed.

3.4.5.4.1 Editing the dads.conf File

If this is a new installation of Oracle Application Express, you need to edit the dads.conf file. The dads.conf file contains the information about the DAD to access Oracle Application Express.

To edit the dads.conf file:

1. Use a text editor and open the dads.conf.

- Oracle Application Server 10g:

- On Windows see:

ORACLE_HTTPSERVER_HOME\Apache\modplsql\conf\dads.conf

- On UNIX and Linux see:

ORACLE_HTTPSERVER_HOME/Apache/modplsql/conf/dads.conf

- Oracle HTTP Server distributed with Oracle Database 11g:

- On Windows see:

ORACLE_HTTPSERVER_HOME\ohs\modplsql\conf\dads.conf

- On UNIX and Linux see:

ORACLE_HTTPSERVER_HOME/ohs/modplsql/conf/dads.conf

2. In the dads.conf file, replace ORACLE_HTTPSERVER_HOME, host, port, service_name, and apex_public_user_password with values appropriate for your environment. Note that the apex_public_user_password is the password you changed in "Changing the Password for the APEX_PUBLIC_USER Account".
Note that the path listed is only an example. The path in the dads.conf file should reference the file system path described in "Copying the Images Directory".

Alias /i/ "ORACLE_HTTPSERVER_HOME/apex/images/"
AddType text/xml       xbl
AddType text/x-component       htc

<Location /pls/apex>
Order deny,allow
PlsqlDocumentPath docs
AllowOverride None
PlsqlDocumentProcedure         wwv_flow_file_mgr.process_downloadd
PlsqlDatabaseConnectString     host:port:service_name ServiceNameFormat
PlsqlNLSLanguage               AMERICAN_AMERICA.AL32UTF8
PlsqlAuthenticationMode        Basic
SetHandler                     pls_handler
PlsqlDocumentTablename         wwv_flow_file_objects$
PlsqlDatabaseUsername          APEX_PUBLIC_USER
PlsqlDefaultPage               apex
PlsqlDatabasePassword          apex_public_user_password
PlsqlRequestValidationFunction wwv_flow_epg_include_modules.authorize
Allow from all
</Location>

3. Locate the line containing PlsqlNLSLanguage.
The PlsqlNLSLanguage setting determines the language setting of the DAD. The character set portion of the PlsqlNLSLanguage value must be set to AL32UTF8, regardless of whether or not the database character set is AL32UTF8. For example:

...
PlsqlNLSLanguage            AMERICAN_AMERICA.AL32UTF8
...

4. Save and exit the dads.conf file.

3.4.5.4.2 Stopping and Restarting Oracle HTTP Server

To stop and restart Oracle HTTP Server:

- For UNIX and Linux, execute the following:

ORACLE_HTTPSERVER_HOME/opmn/bin/opmnctl stopproc ias-component=HTTP_Server
ORACLE_HTTPSERVER_HOME/opmn/bin/opmnctl startproc ias-component=HTTP_Server

- For Windows, execute the following:

ORACLE_HTTPSERVER_HOME\opmn\bin\opmnctl stopproc ias-component=HTTP_Server
ORACLE_HTTPSERVER_HOME\opmn\bin\opmnctl startproc ias-component=HTTP_Server

3.4.6 Enable Network Services in Oracle Database 11g

By default, the ability to interact with network services is disabled in Oracle Database 11g release 1 (11.1). Therefore, if you are running Oracle Application Express with Oracle Database 11g release 1 (11.1), you need to use the new DBMS_NETWORK_ACL_ADMIN package to grant connect privileges to any host for the FLOWS_030100 database user. Failing to grant these privileges results in issues with:

- Sending outbound mail in Oracle Application Express.
Users can call methods from the APEX_MAIL package, but issues arise when sending outbound email.

- Using Web services in Oracle Application Express.

- PDF/report printing.

- Searching for content in online Help (that is, using the Find link).

Topics in this section include:

- Granting Connect Privileges

- Troubleshooting an Invalid ACL Error

Tip:
To run the examples described in this section, the compatible initialization parameter of the database must be set to at least 11.1.0.0.0. By default an 11g database will already have the parameter set properly, but a database upgraded to 11g from a prior version may not. See "Creating and Configuring an Oracle Database" in Oracle Database Administrator's Guide for information about changing database initialization parameters.

3.4.6.1 Granting Connect Privileges

The following example demonstrates how to grant connect privileges to any host for the FLOWS_030100 database user.

DECLARE
ACL_PATH  VARCHAR2(4000);
ACL_ID    RAW(16);
BEGIN
-- Look for the ACL currently assigned to '*' and give FLOWS_030100
-- the "connect" privilege if FLOWS_030100 does not have the privilege yet.

SELECT ACL INTO ACL_PATH FROM DBA_NETWORK_ACLS
WHERE HOST = '*' AND LOWER_PORT IS NULL AND UPPER_PORT IS NULL;

-- Before checking the privilege, make sure that the ACL is valid
-- (for example, does not contain stale references to dropped users).
-- If it does, the following exception will be raised:
--
-- ORA-44416: Invalid ACL: Unresolved principal 'FLOWS_030100'
-- ORA-06512: at "XDB.DBMS_XDBZ", line ...
--
SELECT SYS_OP_R2O(extractValue(P.RES, '/Resource/XMLRef')) INTO ACL_ID
FROM XDB.XDB$ACL A, PATH_VIEW P
WHERE extractValue(P.RES, '/Resource/XMLRef') = REF(A) AND
EQUALS_PATH(P.RES, ACL_PATH) = 1;

DBMS_XDBZ.ValidateACL(ACL_ID);
IF DBMS_NETWORK_ACL_ADMIN.CHECK_PRIVILEGE(ACL_PATH, 'FLOWS_030100',
'connect') IS NULL THEN
DBMS_NETWORK_ACL_ADMIN.ADD_PRIVILEGE(ACL_PATH,
'FLOWS_030100', TRUE, 'connect');
END IF;

EXCEPTION
-- When no ACL has been assigned to '*'.
WHEN NO_DATA_FOUND THEN
DBMS_NETWORK_ACL_ADMIN.CREATE_ACL('power_users.xml',
'ACL that lets power users to connect to everywhere',
'FLOWS_030100', TRUE, 'connect');
DBMS_NETWORK_ACL_ADMIN.ASSIGN_ACL('power_users.xml','*');
END;
/
COMMIT;

The following example demonstrates how to provide less privileged access to local network resources. This example would enable indexing the Oracle Application Express Online Help and could possibly enable email and PDF printing if those servers were also on the local host.

DECLARE
ACL_PATH  VARCHAR2(4000);
ACL_ID    RAW(16);
BEGIN
-- Look for the ACL currently assigned to 'localhost' and give FLOWS_030100
-- the "connect" privilege if FLOWS_030100 does not have the privilege yet.
SELECT ACL INTO ACL_PATH FROM DBA_NETWORK_ACLS
WHERE HOST = 'localhost' AND LOWER_PORT IS NULL AND UPPER_PORT IS NULL;

-- Before checking the privilege, make sure that the ACL is valid
-- (for example, does not contain stale references to dropped users).
-- If it does, the following exception will be raised:
--
-- ORA-44416: Invalid ACL: Unresolved principal 'FLOWS_030100'
-- ORA-06512: at "XDB.DBMS_XDBZ", line ...
--

SELECT SYS_OP_R2O(extractValue(P.RES, '/Resource/XMLRef')) INTO ACL_ID
FROM XDB.XDB$ACL A, PATH_VIEW P
WHERE extractValue(P.RES, '/Resource/XMLRef') = REF(A) AND
EQUALS_PATH(P.RES, ACL_PATH) = 1;

DBMS_XDBZ.ValidateACL(ACL_ID);
IF DBMS_NETWORK_ACL_ADMIN.CHECK_PRIVILEGE(ACL_PATH, 'FLOWS_030100',
'connect') IS NULL THEN
DBMS_NETWORK_ACL_ADMIN.ADD_PRIVILEGE(ACL_PATH,
'FLOWS_030100', TRUE, 'connect');
END IF;

EXCEPTION
-- When no ACL has been assigned to 'localhost'.
WHEN NO_DATA_FOUND THEN
DBMS_NETWORK_ACL_ADMIN.CREATE_ACL('local-access-users.xml',
'ACL that lets power users to connect to everywhere',
'FLOWS_030100', TRUE, 'connect');
DBMS_NETWORK_ACL_ADMIN.ASSIGN_ACL('local-access-users.xml','localhost');
END;
/
COMMIT;

3.4.6.2 Troubleshooting an Invalid ACL Error

If you receive an ORA-44416: Invalid ACL error after running the previous script, use the following query to identify the invalid ACL:

REM Show the dangling references to dropped users in the ACL that is assigned
REM to '*'.

SELECT ACL, PRINCIPAL
FROM DBA_NETWORK_ACLS NACL, XDS_ACE ACE
WHERE HOST = '*' AND LOWER_PORT IS NULL AND UPPER_PORT IS NULL AND
NACL.ACLID = ACE.ACLID AND
NOT EXISTS (SELECT NULL FROM ALL_USERS WHERE USERNAME = PRINCIPAL);

Next, run the following code to fix the ACL:

DECLARE
ACL_ID   RAW(16);
CNT      NUMBER;
BEGIN
-- Look for the object ID of the ACL currently assigned to '*'
SELECT ACLID INTO ACL_ID FROM DBA_NETWORK_ACLS
WHERE HOST = '*' AND LOWER_PORT IS NULL AND UPPER_PORT IS NULL;

-- If just some users referenced in the ACL are invalid, remove just those
-- users in the ACL. Otherwise, drop the ACL completely.
SELECT COUNT(PRINCIPAL) INTO CNT FROM XDS_ACE
WHERE ACLID = ACL_ID AND
EXISTS (SELECT NULL FROM ALL_USERS WHERE USERNAME = PRINCIPAL);

IF (CNT > 0) THEN

FOR R IN (SELECT PRINCIPAL FROM XDS_ACE
WHERE ACLID = ACL_ID AND
NOT EXISTS (SELECT NULL FROM ALL_USERS
WHERE USERNAME = PRINCIPAL)) LOOP
UPDATE XDB.XDB$ACL
SET OBJECT_VALUE =
DELETEXML(OBJECT_VALUE,
'/ACL/ACE[PRINCIPAL="'||R.PRINCIPAL||'"]')
WHERE OBJECT_ID = ACL_ID;
END LOOP;

ELSE
DELETE FROM XDB.XDB$ACL WHERE OBJECT_ID = ACL_ID;
END IF;

END;
/

REM commit the changes.

COMMIT;

Once the ACL has been fixed, you need to run the first script in this section to apply the ACL to the FLOWS_030100 user. See "Granting Connect Privileges".

3.4.7 Security Considerations

Oracle highly recommends you configure and use Secure Sockets Layer (SSL) to ensure that passwords and other sensitive data are not transmitted in clear text in HTTP requests. Without the use of SSL, passwords could potentially be exposed, compromising security.

SSL is an industry standard protocol that uses RSA public key cryptography in conjunction with symmetric key cryptography to provide authentication, encryption, and data integrity.

3.4.8 About Running Oracle Application Express in Other Languages

The Oracle Application Express interface is translated into German, Spanish, French, Italian, Japanese, Korean, Brazilian Portuguese, Simplified Chinese, and Traditional Chinese. A single instance of Oracle Application Express can be installed with one or more of these translated versions. At runtime, each user's Web browser language settings determine the specific language version.

The translated version of Oracle Application Express should be loaded into a database that has a character set that supports the specific language. If you attempt to install a translated version of Oracle Application Express into a database that does not support the character encoding of the language, the installation may fail or the translated Oracle Application Express instance may appear corrupt when run. The database character set AL32UTF8 supports all the translated versions of Oracle Application Express.

You can manually install translated versions of Oracle Application Express using SQL*Plus. The installation files are encoded in AL32UTF8.

Note:
Regardless of the target database character set, to install a translated version of Oracle Application Express, you must set the character set value of the NLS_LANG environment variable to AL32UTF8 prior to starting SQL*Plus.

The following examples illustrate valid NLS_LANG settings for loading Oracle Application Express translations:

American_America.AL32UTF8
Japanese_Japan.AL32UTF8

3.4.8.1 Installing a Translated Version of Oracle Application Express

Whether you are installing for the first time or upgrading from a previous release, you must run the load_lang.sql script to run a translated version of Oracle Application Express.

The installation scripts are located in subdirectories identified by a language code in the unzipped distribution apex/builder. For example, the German version is located in apex/builder/de and the Japanese version is located in apex/builder/ja. Within each of directory, there is a language loading script identified by the language code (for example, load_de.sql or load_ja.sql).

To install a translated version of Oracle Application Express:

1. Set the NLS_LANG environment variable, making sure that the character set is AL32UTF8. For example:

- Bourne or Korn shell:

NLS_LANG=American_America.AL32UTF8
export NLS_LANG

- C shell:

setenv NLS_LANG American_America.AL32UTF8

- For Windows based systems:

set NLS_LANG=American_America.AL32UTF8

2. Start SQL*Plus and connect to the database where Oracle Application Express is installed as SYS specifying the SYSDBA role. For example:

- On Windows:

SYSTEM_DRIVE:\ sqlplus /nolog
SQL> CONNECT SYS as SYSDBA
Enter password: SYS_password

- On UNIX and Linux:

$ sqlplus /nolog
SQL> CONNECT SYS as SYSDBA
Enter password: SYS_password

3. Execute the following statement:

ALTER SESSION SET CURRENT_SCHEMA = FLOWS_030100;

4. Execute the appropriate language specific script. For example:

@load_lang.sql

Where lang is the specific language (for example, load_de.sql for German or load_ja.sql for Japanese).

3.4.9 About Managing JOB_QUEUE_PROCESSES

JOB_QUEUE_PROCESSES determine the maximum number of concurrently running jobs. In Oracle Application Express release 3.0, transactional support and SQL scripts require jobs. If JOB_QUEUE_PROCESSES is not enabled and working properly, you cannot successfully execute a script.

Topics in this section include:

- Viewing the Number of JOB_QUEUE_PROCESSES

- Changing the Number of JOB_QUEUE_PROCESSES

3.4.9.1 Viewing the Number of JOB_QUEUE_PROCESSES

There are currently three ways to view the number of JOB_QUEUE_PROCESSES:

- In the installation log file

- On the About Application Express page in Oracle Application Express

- From SQL*Plus

3.4.9.1.1 Viewing JOB_QUEUE_PROCESSES in the Installation Log File

After installing or upgrading Oracle Application Express to release 3.0, you can view the number of JOB_QUEUE_PROCESSES in the installation log files. See "Reviewing a Log of an Installation Session".

3.4.9.1.2 Viewing JOB_QUEUE_PROCESSES in Oracle Application Express

You can also view the number of JOB_QUEUE_PROCESSES on the About Application Express page.

To view the About Application Express page:

1. Log in to Oracle Application Express. See "Log In to Oracle Application Express".

2. On the Administration list, click About Application Express.
The current number JOB_QUEUE_PROCESSES displays at the bottom of the page.

3.4.9.1.3 Viewing JOB_QUEUE_PROCESSES from SQL*Plus

You can also view the number of JOB_QUEUE_PROCESSES from SQL*Plus by running the following SQL statement:

SELECT VALUE FROM v$parameter WHERE NAME = 'job_queue_processes'

3.4.9.2 Changing the Number of JOB_QUEUE_PROCESSES

You can change the number of JOB_QUEUE_PROCESSES by running a SQL statement in SQL*Plus:

To update the number of JOB_QUEUE_PROCESSES:

1. Start SQL*Plus and connect to the database where Oracle Application Express is installed as SYS specifying the SYSDBA role:

- On Windows:

SYSTEM_DRIVE:\ sqlplus /nolog
SQL> CONNECT SYS as SYSDBA
Enter password: SYS_password

- On UNIX and Linux:

$ sqlplus /nolog
SQL> CONNECT SYS as SYSDBA
Enter password: SYS_password

2. In SQL*Plus run the following SQL statement:

ALTER SYSTEM SET JOB_QUEUE_PROCESSES = <number>

For example, running the statement ALTER SYSTEM SET JOB_QUEUE_PROCESSES = 20 sets JOB_QUEUE_PROCESSES to 20.

3.4.10 About Obfuscating PlsqlDatabasePassword Parameter

The PlsqlDatabasePassword parameter specifies the password for logging in to the database. You can use the dadTool.pl utility to obfuscate passwords in the dads.conf file.

You can find the dadTool.pl utility in the following directory:

- For UNIX and Linux based systems:

ORACLE_BASE/ORACLE_HTTPSERVER_HOME/Apache/modplsql/conf

- For Windows based systems:

ORACLE_BASE\ORACLE_HTTPSERVER_HOME\Apache\modplsql\conf

3.4.10.1 Obfuscating Passwords

To obfuscate passwords, run dadTool.pl by following the instructions in the dadTool.README file.

3.4.11 Log In to Oracle Application Express

You access the Oracle Application Express home page in a Web browser. To view or develop Oracle Application Express applications, the Web browser must support JavaScript and the HTML 4.0 and CSS 1.0 standards. See "Browser Requirement".

Topics in this section include:

- About Application Express User Roles

- About Setting Up Your Local Development Environment

3.4.11.1 About Application Express User Roles

In the Oracle Application Express development environment, users log in to a shared work area called a workspace. Users are divided into four primary roles:

- Oracle Application Express administrators are superusers that manage an entire hosted instance using the Oracle Application Express Administration Services application.

- Workspace administrators are users who perform administrator tasks specific to a workspace such as managing user accounts, monitoring workspace activity, and viewing log files.

- Developers are users who create and edit applications. Developers can have their own workspace or share a workspace.

- End users have no development privileges. You define end users so that they can access applications that do not use an external authentication scheme.

3.4.11.2 About Setting Up Your Local Development Environment

How you set up Oracle Application Express depends upon your user role. If you are a developer accessing a hosted development environment, an administrator must grant you access to a workspace. If you are an Oracle Application Express administrator, you must perform the following steps:

1. Log in to Oracle Application Express Administration Services. Oracle Application Express Administration Services is a separate application for managing an entire Oracle Application Express instance. You log in using the ADMIN account and password created or reset during the installation process.

2. Specify a provisioning mode. In Oracle Application Express Administration Services, you need to determine how the process of creating (or provisioning) a workspace will work in your development environment.

3. Create a Workspace. A workspace is a virtual private database allowing multiple users to work within the same Oracle Application Express installation while keeping their objects, data and applications private. Each workspace has a unique ID and name. An Oracle Application Express administrator can create a workspace manually or have users submit requests.

4. Log in to a Workspace. Once you create a workspace in Oracle Application Express Administration Services, return to the Oracle Application Express Login page and log in to that workspace.

To learn more about setting up your environment, see Oracle Database 2 Day + Oracle Application Express Developer's Guide or "Quick Start" in Oracle Application Express Application Builder User's Guide

3.5 About the Oracle Application Express Runtime Environment

The Oracle Application Express runtime environment enables users to run a production application without supporting the ability to change or edit the application. It includes only the packages necessary to run your applications, making it a more hardened environment. It does not provide a Web interface for administration.

You administer the Oracle Application Express runtime environment using SQL*Plus or SQL Developer and the APEX_INSTANCE_ADMIN API. To learn more see, "Managing a Runtime Environment" and in Oracle Application Express Application Builder User's Guide.

Topics in this section include:

- Converting a Runtime Environment to a Full Development Environment

- Converting a Full Development Environment to a Runtime Environment

3.5.1 Converting a Runtime Environment to a Full Development Environment

To convert an Oracle Application Express runtime environment to a full development environment:

1. Change your working directory to the apex directory where you unzipped the installation software.

2. Start SQL*Plus and connect to the database where Oracle Application Express is installed as SYS specifying the SYSDBA role. For example:

- On Windows:

SYSTEM_DRIVE:\ sqlplus /nolog
SQL> CONNECT SYS as SYSDBA
Enter password: SYS_password

- On UNIX and Linux:

$ sqlplus /nolog
SQL> CONNECT SYS as SYSDBA
Enter password: SYS_password

3. Run apxdvins.sql. For example:

@apxdvins

See Also:
Oracle Database PL/SQL Language Reference for more information about SQL*Plus

3.5.2 Converting a Full Development Environment to a Runtime Environment

To convert an Oracle Application Express full development environment to a runtime environment:

1. Change your working directory to the apex directory where you unzipped the installation software.

2. Start SQL*Plus and connect to the database where Oracle Application Express is installed as SYS specifying the SYSDBA role. For example:

- On Windows:

SYSTEM_DRIVE:\ sqlplus /nolog
SQL> CONNECT SYS as SYSDBA
Enter password: SYS_password

- On UNIX and Linux:

$ sqlplus /nolog
SQL> CONNECT SYS as SYSDBA
Enter password: SYS_password

3. Run apxdevrm.sql. For example:

@apxdevrm

4. Follow the instructions in "Change the Password for the ADMIN Account".

See Also:
Oracle Database PL/SQL Language Reference for more information about SQL*Plus

4 Configuration Tasks When Installing from the Database

Oracle Application Express is installed by default with Oracle Database 11g. This chapter describes required postinstallation configuration tasks for Oracle Application Express when installed with Oracle Database 11g or later.

The instructions in this chapter apply to both new and upgrade installations. To learn more, see "Upgrading from a Previous Version of Oracle Application Express".

This chapter contains these topics:

- About PatchingOracle Application Express

- Recommended Pre-installation Tasks

- Choosing an HTTP Server

- Install from the Database and Configure the Embedded PL/SQL Gateway

- Install from the Database and Configure Oracle HTTP Server

- About the Oracle Application Express Runtime Environment

4.1 About Patching Oracle Application Express

If you are already running Oracle Application Express, then check the Oracle Application Express page on the Oracle Technology Network (OTN) at the following URL for information about patch set releases or later versions of Oracle Application Express:

http://www.oracle.com/technology/products/database/application_express/index.html

Upgrading to Oracle Database 11g will not patch Oracle Application Express. To learn more about downloading and installing Oracle Application Express from Oracle Technology Network (OTN) see "Downloading from Oracle Technology Network".

4.2 Recommended Pre-installation Tasks

Before installing Oracle Application Express, Oracle recommends that you complete the following steps:

1. Review and satisfy all Oracle Application Express installation requirements. See "Oracle Application Express Installation Requirements".

2. Shut down any existing Oracle Database instances as well as Oracle-related processes.
Shut down any existing Oracle Database instances with normal or immediate priority, except for the database where you plan to install the Oracle Application Express schemas. On Real Application Clusters (RAC) systems, shut down all instances on each node.

If Automatic Storage Management (ASM) is running, shut down all databases that use ASM except for the database where you will install Oracle Application Express, and then shut down the ASM instance.

You can use the Windows Services utility, located either in the Windows Control Panel or from the Administrative Tools menu (under Start and then Programs), to shut down Oracle Database and ASM instances. Names of Oracle databases are preceded with OracleService. The Oracle ASM service is named OracleASMService+ASM. In addition, shut down the OracleCSService service, which ASM uses. Right-click the name of the service and from the menu, choose Stop.

3. Back up the Oracle Database installation.
Oracle recommends that you create a backup of the current installation of Oracle Database installation before you install Oracle Application Express. You can use Oracle Database Recovery Manager, which is included the Oracle Database installation, to perform the backup.

See Also:
Oracle Database Backup and Recovery User's Guide

4. Start the Oracle Database instance that contains the target database.
After backing up the system, you must start the Oracle instance that contains the target Oracle database. Do not start other processes such as the listener or Oracle HTTP Server. However, if you are performing a remote installation, make sure the database listener for the remote database has started.

Note:
If you are connecting to a remote database, then start the listener.

4.3 Choosing an HTTP Server

In order to run, Oracle Application Express must have access to either the embedded PL/SQL gateway or Oracle HTTP Server and mod_plsql. To learn more, see "About Choosing an HTTP Server".

4.4 Install from the Database and Configure the Embedded PL/SQL Gateway

This section describes required postinstallation configuration tasks when running Oracle Application Express with the embedded PL/SQL gateway.

Topics in this section include:

- Install the Oracle Database and Complete Pre-installation Tasks

- Configure the Embedded PL/SQL Gateway

- Enable Network Services in Oracle Database 11g

- Security Considerations

- About Running Oracle Application Express in Other Languages

- About Managing JOB_QUEUE_PROCESSES

- Configuring the SHARED_SERVERS Parameter

- Log In to Oracle Application Express

See Also:
"About the Oracle Application Express Runtime Environment"

4.4.1 Install the Oracle Database and Complete Pre-installation Tasks

Oracle Application Express automatically installs with Oracle Database 11g or later. To learn more about install the Oracle Database, see the Oracle Database Installation Guide for your operating environment and "Recommended Pre-installation Tasks".

4.4.2 Configure the Embedded PL/SQL Gateway

Although the embedded PL/SQL gateway installs with the Oracle Database 11g, you must configure it before you can use it with Oracle Application Express. To accomplish, you run a configuration file and unlock the ANONYMOUS account.

Note:
The Oracle XML DB HTTP Server with the embedded PL/SQL gateway is not supported prior to Oracle Database 11g.

Topics in this section include:

- Running the apxconf.sql Configuration Script

- Verifying the Oracle XML DB HTTP Server Port

- Enabling Oracle XML DB HTTP Server

- Disabling Oracle XML DB HTTP Server

4.4.2.1 Running the apxconf.sql Configuration Script

In a new installation, you configure the embedded PL/SQL gateway by running the configuration script apxconf.sql. Then, you unlock the ANONYMOUS account.

Note:
If you are upgrading and have previously configured the embedded PL/SQL gateway, skip this section and go to "Enable Network Services in Oracle Database 11g".

To run the apxconf.sql configuration script:

1. Change your working directory to ORACLE_BASE\ORACLE_HOME\apex or whatever convention used to indicate the Oracle home.

2. Start SQL*Plus and connect to the database where Oracle Application Express is installed as SYS. For example:

- On Windows:

SYSTEM_DRIVE:\ sqlplus /nolog
SQL> CONNECT SYS as SYSDBA
Enter password: SYS_password

- On UNIX and Linux:

$ sqlplus /nolog
SQL> CONNECT SYS as SYSDBA
Enter password: SYS_password

3. Run apxconf.sql as shown in the following example:

@apxconf

4. When prompted, enter a password for the Application Express Admin account.
Be sure to make a note of the password you enter. You will use this password to log in to Oracle Application Express Administration Services.

5. When prompted, enter the port for the Oracle XML DB HTTP server. The default port number is 8080.

6. Enter the following statement to unlock the ANONYMOUS account:

ALTER USER ANONYMOUS ACCOUNT UNLOCK;

4.4.2.2 Verifying the Oracle XML DB HTTP Server Port

The embedded PL/SQL gateway runs in the Oracle XML DB HTTP server in the Oracle database. You can determine if the Oracle XML DB HTTP server is enabled by verifying the associated port number.

To verify the port number where the Oracle XML DB HTTP Server is running:

1. Start SQL*Plus and connect to the database where Oracle Application Express is installed as SYS specifying the SYSDBA role:

- On Windows:

SYSTEM_DRIVE:\ sqlplus /nolog
SQL> CONNECT SYS as SYSDBA
Enter password: SYS_password

- On UNIX and Linux:

$ sqlplus /nolog
SQL> CONNECT SYS as SYSDBA
Enter password: SYS_password

2. Enter the following statement to verify the port number:

SELECT DBMS_XDB.GETHTTPPORT FROM DUAL;

If the port number returns 0, the Oracle XML DB HTTP Server is disabled.

3. To enable it, follow the instructions in "Enabling Oracle XML DB HTTP Server".

4.4.2.3 Enabling Oracle XML DB HTTP Server

The embedded PL/SQL gateway runs in the Oracle XML DB HTTP server in the Oracle database.

To enable Oracle XML DB HTTP server:

1. Start SQL*Plus and connect to the database where Oracle Application Express is installed as SYS. For example:

- Windows:

DRIVE_LETTER:\> sqlplus /nolog
SQL> SQL> CONNECT SYS as SYSDBA
Enter password: SYS_password

- UNIX and Linux:

$ sqlplus /nolog
SQL> SQL> CONNECT SYS as SYSDBA
Enter password: SYS_password

2. Run the following statements:

EXEC DBMS_XDB.SETHTTPPORT(port);
COMMIT;

For example:

EXEC DBMS_XDB.SETHTTPPORT(8080);
COMMIT;

Note:
Port numbers less than 1024 are reserved for use by privileged processes on many operating systems. To enable the XML DB HTTP listener on a port less than 1024, such as 80, review the following documentation:

- "Using Protocols to Access the Repository" and "Using HTTP(S) on Nonstandard Ports" in Oracle XML DB Developer's Guide.

- "Protocol Address Configuration" and "Port Number Limitations" in Oracle Database Net Services Reference.

4.4.2.4 Disabling Oracle XML DB HTTP Server

The embedded PL/SQL gateway runs in the Oracle XML DB HTTP server in the Oracle database. To disable Oracle XML DB HTTP server:

1. Start SQL*Plus and connect to the database where Oracle Application Express is installed as SYS. For example:

- Windows:

DRIVE_LETTER:\> sqlplus /nolog
SQL> SQL> CONNECT SYS as SYSDBA
Enter password: SYS_password

- UNIX and Linux:

$ sqlplus /nolog
SQL> SQL> CONNECT SYS as SYSDBA
Enter password: SYS_password

2. Run the following statements:

EXEC DBMS_XDB.SETHTTPPORT(0);
COMMIT;

4.4.3 Enable Network Services in Oracle Database 11g

By default, the ability to interact with network services is disabled in Oracle Database 11g release 1 (11.1). Therefore, if you are running Oracle Application Express with Oracle Database 11g release 1 (11.1), you need to use the new DBMS_NETWORK_ACL_ADMIN package to grant connect privileges to any host for the FLOWS_030100 database user. Failing to grant these privileges results in issues with:

- Sending outbound mail in Oracle Application Express.
Users can call methods from the APEX_MAIL package, but issues arise when sending outbound email.

- Using Web services in Oracle Application Express.

- PDF/report printing.

- Searching for content in online Help (that is, using the Find link).

Topics in this section include:

- Granting Connect Privileges

- Troubleshooting an Invalid ACL Error

Tip:
To run the examples described in this section, the compatible initialization parameter of the database must be set to at least 11.1.0.0.0. By default an 11g database will already have the parameter set properly, but a database upgraded to 11g from a prior version may not. See "Creating and Configuring an Oracle Database" in Oracle Database Administrator's Guide for information about changing database initialization parameters.

4.4.3.1 Granting Connect Privileges

The following example demonstrates how to grant connect privileges to any host for the FLOWS_030100 database user.

DECLARE
ACL_PATH  VARCHAR2(4000);
ACL_ID    RAW(16);
BEGIN
-- Look for the ACL currently assigned to '*' and give FLOWS_030100
-- the "connect" privilege if FLOWS_030100 does not have the privilege yet.

SELECT ACL INTO ACL_PATH FROM DBA_NETWORK_ACLS
WHERE HOST = '*' AND LOWER_PORT IS NULL AND UPPER_PORT IS NULL;

-- Before checking the privilege, make sure that the ACL is valid
-- (for example, does not contain stale references to dropped users).
-- If it does, the following exception will be raised:
--
-- ORA-44416: Invalid ACL: Unresolved principal 'FLOWS_030100'
-- ORA-06512: at "XDB.DBMS_XDBZ", line ...
--
SELECT SYS_OP_R2O(extractValue(P.RES, '/Resource/XMLRef')) INTO ACL_ID
FROM XDB.XDB$ACL A, PATH_VIEW P
WHERE extractValue(P.RES, '/Resource/XMLRef') = REF(A) AND
EQUALS_PATH(P.RES, ACL_PATH) = 1;

DBMS_XDBZ.ValidateACL(ACL_ID);
IF DBMS_NETWORK_ACL_ADMIN.CHECK_PRIVILEGE(ACL_PATH, 'FLOWS_030100',
'connect') IS NULL THEN
DBMS_NETWORK_ACL_ADMIN.ADD_PRIVILEGE(ACL_PATH,
'FLOWS_030100', TRUE, 'connect');
END IF;

EXCEPTION
-- When no ACL has been assigned to '*'.
WHEN NO_DATA_FOUND THEN
DBMS_NETWORK_ACL_ADMIN.CREATE_ACL('power_users.xml',
'ACL that lets power users to connect to everywhere',
'FLOWS_030100', TRUE, 'connect');
DBMS_NETWORK_ACL_ADMIN.ASSIGN_ACL('power_users.xml','*');
END;
/
COMMIT;

The following example demonstrates how to provide less privileged access to local network resources. This example would enable indexing the Oracle Application Express Online Help and could possibly enable email and PDF printing if those servers were also on the local host.

DECLARE
ACL_PATH  VARCHAR2(4000);
ACL_ID    RAW(16);
BEGIN
-- Look for the ACL currently assigned to 'localhost' and give FLOWS_030100
-- the "connect" privilege if FLOWS_030100 does not have the privilege yet.
SELECT ACL INTO ACL_PATH FROM DBA_NETWORK_ACLS
WHERE HOST = 'localhost' AND LOWER_PORT IS NULL AND UPPER_PORT IS NULL;

-- Before checking the privilege, make sure that the ACL is valid
-- (for example, does not contain stale references to dropped users).
-- If it does, the following exception will be raised:
--
-- ORA-44416: Invalid ACL: Unresolved principal 'FLOWS_030100'
-- ORA-06512: at "XDB.DBMS_XDBZ", line ...
--

SELECT SYS_OP_R2O(extractValue(P.RES, '/Resource/XMLRef')) INTO ACL_ID
FROM XDB.XDB$ACL A, PATH_VIEW P
WHERE extractValue(P.RES, '/Resource/XMLRef') = REF(A) AND
EQUALS_PATH(P.RES, ACL_PATH) = 1;

DBMS_XDBZ.ValidateACL(ACL_ID);
IF DBMS_NETWORK_ACL_ADMIN.CHECK_PRIVILEGE(ACL_PATH, 'FLOWS_030100',
'connect') IS NULL THEN
DBMS_NETWORK_ACL_ADMIN.ADD_PRIVILEGE(ACL_PATH,
'FLOWS_030100', TRUE, 'connect');
END IF;

EXCEPTION
-- When no ACL has been assigned to 'localhost'.
WHEN NO_DATA_FOUND THEN
DBMS_NETWORK_ACL_ADMIN.CREATE_ACL('local-access-users.xml',
'ACL that lets power users to connect to everywhere',
'FLOWS_030100', TRUE, 'connect');
DBMS_NETWORK_ACL_ADMIN.ASSIGN_ACL('local-access-users.xml','localhost');
END;
/
COMMIT;

4.4.3.2 Troubleshooting an Invalid ACL Error

If you receive an ORA-44416: Invalid ACL error after running the previous script, use the following query to identify the invalid ACL:

REM Show the dangling references to dropped users in the ACL that is assigned
REM to '*'.

SELECT ACL, PRINCIPAL
FROM DBA_NETWORK_ACLS NACL, XDS_ACE ACE
WHERE HOST = '*' AND LOWER_PORT IS NULL AND UPPER_PORT IS NULL AND
NACL.ACLID = ACE.ACLID AND
NOT EXISTS (SELECT NULL FROM ALL_USERS WHERE USERNAME = PRINCIPAL);

Next, run the following code to fix the ACL:

DECLARE
ACL_ID   RAW(16);
CNT      NUMBER;
BEGIN
-- Look for the object ID of the ACL currently assigned to '*'
SELECT ACLID INTO ACL_ID FROM DBA_NETWORK_ACLS
WHERE HOST = '*' AND LOWER_PORT IS NULL AND UPPER_PORT IS NULL;

-- If just some users referenced in the ACL are invalid, remove just those
-- users in the ACL. Otherwise, drop the ACL completely.
SELECT COUNT(PRINCIPAL) INTO CNT FROM XDS_ACE
WHERE ACLID = ACL_ID AND
EXISTS (SELECT NULL FROM ALL_USERS WHERE USERNAME = PRINCIPAL);

IF (CNT > 0) THEN

FOR R IN (SELECT PRINCIPAL FROM XDS_ACE
WHERE ACLID = ACL_ID AND
NOT EXISTS (SELECT NULL FROM ALL_USERS
WHERE USERNAME = PRINCIPAL)) LOOP
UPDATE XDB.XDB$ACL
SET OBJECT_VALUE =
DELETEXML(OBJECT_VALUE,
'/ACL/ACE[PRINCIPAL="'||R.PRINCIPAL||'"]')
WHERE OBJECT_ID = ACL_ID;
END LOOP;

ELSE
DELETE FROM XDB.XDB$ACL WHERE OBJECT_ID = ACL_ID;
END IF;

END;
/

REM commit the changes.

COMMIT;

Once the ACL has been fixed, you need to run the first script in this section to apply the ACL to the FLOWS_030100 user. See "Granting Connect Privileges".

4.4.4 Security Considerations

Oracle highly recommends you configure and use a Secure Sockets Layer (SSL) to ensure that passwords and other sensitive data are not transmitted in clear text in HTTP requests. Without the use of SSL, passwords could potentially be exposed, compromising security.

SSL is an industry standard protocol that uses RSA public key cryptography in conjunction with symmetric key cryptography to provide authentication, encryption, and data integrity.

4.4.5 About Running Oracle Application Express in Other Languages

The Oracle Application Express interface is translated into German, Spanish, French, Italian, Japanese, Korean, Brazilian Portuguese, Simplified Chinese, and Traditional Chinese. A single instance of Oracle Application Express can be installed with one or more of these translated versions. At runtime, each user's Web browser language settings determine the specific language version.

The translated version of Oracle Application Express should be loaded into a database that has a character set that supports the specific language. If you attempt to install a translated version of Oracle Application Express into a database that does not support the character encoding of the language, the installation may fail or the translated Oracle Application Express instance may appear corrupt when run. The database character set AL32UTF8 supports all the translated versions of Oracle Application Express.

You can manually install translated versions of Oracle Application Express using SQL*Plus. The installation files are encoded in AL32UTF8.

Note:
Regardless of the target database character set, to install a translated version of Oracle Application Express, you must set the character set value of the NLS_LANG environment variable to AL32UTF8 prior to starting SQL*Plus.

The following examples illustrate valid NLS_LANG settings for loading Oracle Application Express translations:

American_America.AL32UTF8
Japanese_Japan.AL32UTF8

4.4.5.1 Installing a Translated Version of Oracle Application Express

Whether you are installing for the first time or upgrading from a previous release, you must run the load_lang.sql script to run a translated version of Oracle Application Express.

The installation scripts are located in subdirectories identified by a language code in the unzipped distribution apex/builder. For example, the German version is located in apex/builder/de and the Japanese version is located in apex/builder/ja. Within each of directory, there is a language loading script identified by the language code (for example, load_de.sql or load_ja.sql).

To install a translated version of Oracle Application Express:

1. Set the NLS_LANG environment variable, making sure that the character set is AL32UTF8. For example:

- Bourne or Korn shell:

NLS_LANG=American_America.AL32UTF8
export NLS_LANG

- C shell:

setenv NLS_LANG American_America.AL32UTF8

- For Windows based systems:

set NLS_LANG=American_America.AL32UTF8

2. Start SQL*Plus and connect to the database where Oracle Application Express is installed as SYS specifying the SYSDBA role. For example:

- On Windows:

SYSTEM_DRIVE:\ sqlplus /nolog
SQL> CONNECT SYS as SYSDBA
Enter password: SYS_password

- On UNIX and Linux:

$ sqlplus /nolog
SQL> CONNECT SYS as SYSDBA
Enter password: SYS_password

3. Execute the following statement:

ALTER SESSION SET CURRENT_SCHEMA = FLOWS_030100;

4. Execute the appropriate language specific script. For example:

@load_lang.sql

Where lang is the specific language (for example, load_de.sql for German or load_ja.sql for Japanese).

4.4.6 About Managing JOB_QUEUE_PROCESSES

JOB_QUEUE_PROCESSES determine the maximum number of concurrently running jobs. In Oracle Application Express release 3.0, transactional support and SQL scripts require jobs. If JOB_QUEUE_PROCESSES is not enabled and working properly, you cannot successfully execute a script.

Topics in this section include:

- Viewing the Number of JOB_QUEUE_PROCESSES

- Changing the Number of JOB_QUEUE_PROCESSES

4.4.6.1 Viewing the Number of JOB_QUEUE_PROCESSES

There are currently three ways to view the number of JOB_QUEUE_PROCESSES:

- In the installation log file

- On the About Application Express page in Oracle Application Express

- From SQL*Plus

4.4.6.1.1 Viewing JOB_QUEUE_PROCESSES in the Installation Log File

After installing or upgrading Oracle Application Express to release 3.0, you can view the number of JOB_QUEUE_PROCESSES in the installation log files. See "Reviewing a Log of an Installation Session".

4.4.6.1.2 Viewing JOB_QUEUE_PROCESSES in Oracle Application Express

You can also view the number of JOB_QUEUE_PROCESSES on the About Application Express page.

To view the About Application Express page:

1. Log in to Oracle Application Express. See "Log In to Oracle Application Express".

2. On the Administration list, click About Application Express.
The current number JOB_QUEUE_PROCESSES displays at the bottom of the page.

4.4.6.1.3 Viewing JOB_QUEUE_PROCESSES from SQL*Plus

You can also view the number of JOB_QUEUE_PROCESSES from SQL*Plus by running the following SQL statement:

SELECT VALUE FROM v$parameter WHERE NAME = 'job_queue_processes'

4.4.6.2 Changing the Number of JOB_QUEUE_PROCESSES

You can change the number of JOB_QUEUE_PROCESSES by running a SQL statement in SQL*Plus:

To update the number of JOB_QUEUE_PROCESSES:

1. Start SQL*Plus and connect to the database where Oracle Application Express is installed as SYS specifying the SYSDBA role:

- On Windows:

SYSTEM_DRIVE:\ sqlplus /nolog
SQL> CONNECT SYS as SYSDBA
Enter password: SYS_password

- On UNIX and Linux:

$ sqlplus /nolog
SQL> CONNECT SYS as SYSDBA
Enter password: SYS_password

2. In SQL*Plus run the following SQL statement:

ALTER SYSTEM SET JOB_QUEUE_PROCESSES = <number>

For example, running the statement ALTER SYSTEM SET JOB_QUEUE_PROCESSES = 20 sets JOB_QUEUE_PROCESSES to 20.

4.4.7 Configuring the SHARED_SERVERS Parameter

The embedded PL/SQL gateway uses the shared server architecture of the Oracle Database. To achieve acceptable performance when using the embedded PL/SQL gateway, ensure the SHARED_SERVERS database initialization parameter is set to a reasonable value (that is, not 0 or 1). For a small group of concurrent users, Oracle recommends a value of 5 for SHARED_SERVERS.

Consider the following example:

1. Start SQL*Plus and connect to the database where Oracle Application Express is installed as SYS specifying the SYSDBA role. For example:

- On Windows:

SYSTEM_DRIVE:\ sqlplus /nolog
SQL> CONNECT SYS as SYSDBA
Enter password: SYS_password

- On UNIX and Linux:

$ sqlplus /nolog
SQL> CONNECT SYS as SYSDBA
Enter password: SYS_password

2. Run the following statement:

ALTER SYSTEM SET SHARED_SERVERS = 5 SCOPE=BOTH;

4.4.8 Log In to Oracle Application Express

You access the Oracle Application Express home page in a Web browser. To view or develop Oracle Application Express applications, the Web browser must support JavaScript and the HTML 4.0 and CSS 1.0 standards. See "Browser Requirement".

Topics in this section include:

- About Application Express User Roles

- About Setting Up Your Local Environment

4.4.8.1 About Application Express User Roles

In the Oracle Application Express development environment, users log in to a shared work area called a workspace. Users are divided into four primary roles:

- Oracle Application Express administrators are superusers that manage an entire hosted instance using the Oracle Application Express Administration Services application.

- Workspace administrators are users who perform administrator tasks specific to a workspace such as managing user accounts, monitoring workspace activity, and viewing log files.

- Developers are users who create and edit applications. Developers can have their own workspace or share a workspace.

- End users have no development privileges. You define end users so that they can access applications that do not use an external authentication scheme.

4.4.8.2 About Setting Up Your Local Environment

How you set up Oracle Application Express depends upon your user role. If you are a developer accessing a hosted development environment, an administrator must grant you access to a workspace. If you are an Oracle Application Express administrator, you must perform the following steps:

1. Log in to Oracle Application Express Administration Services. Oracle Application Express Administration Services is a separate application for managing an entire Oracle Application Express instance. You log in using the ADMIN account and password created or reset during the installation process.

2. Specify a provisioning mode. In Oracle Application Express Administration Services, you need to determine how the process of creating (or provisioning) a workspace will work in your development environment.

3. Create a Workspace. A workspace is a virtual private database allowing multiple users to work within the same Oracle Application Express installation while keeping their objects, data and applications private. Each workspace has a unique ID and name. An Oracle Application Express administrator can create a workspace manually or have users submit requests.

4. Log in to a Workspace. Once you create a workspace in Oracle Application Express Administration Services, return to the Oracle Application Express Login page and log in to that workspace.

To learn more about setting up your environment, see Oracle Database 2 Day + Oracle Application Express Developer's Guide or "Quick Start" in Oracle Application Express Application Builder User's Guide

4.5 Install from the Database and Configure Oracle HTTP Server

This section describes how to configure Oracle HTTP Server with mod_plsql distributed with Oracle Database 11g or Oracle Application Server 10g.

Topics in this section include:

- Install the Oracle Database and Complete Pre-installation Tasks

- Configure Oracle HTTP Server Distributed with Oracle Database 11g or Oracle Application Server 10g

- Enable Network Services in Oracle Database 11g

- Security Considerations

- About Running Oracle Application Express in Other Languages

- About Managing JOB_QUEUE_PROCESSES

- About Obfuscating PlsqlDatabasePassword Parameter

- Log In to Oracle Application Express

Note that these instructions do not apply if you are running Oracle HTTP Server release 9.0.3. To learn more, see "Configuring Oracle HTTP Server Distributed with Oracle9i Release 2".

Note:
Within the context of this section, the Oracle home directory (ORACLE_HTTPSERVER_HOME) is the location where Oracle HTTP Server is installed.

4.5.1 Install the Oracle Database and Complete Pre-installation Tasks

Oracle Application Express automatically installs with Oracle Database 11g or later. To learn more about install the Oracle Database, see the Oracle Database Installation Guide for your operating environment and "Recommended Pre-installation Tasks".

4.5.2 Configure Oracle HTTP Server Distributed with Oracle Database 11g or Oracle Application Server 10g

Perform the following post-installation steps if:

- You are using a version of Oracle Application Express that installs with Oracle Database 11g or later.

- You re not upgrading from a previous release. This is a new installation of Oracle Application Express.

- You are running Oracle HTTP Server distributed with Oracle Database 11g or Oracle Application Server 10g.

- Oracle HTTP Server is installed in an Oracle home.

Topics in this section include:

- Change the Password for the ADMIN Account

- Unlock the APEX_PUBLIC_USER Database User

- Change the Password for the APEX_PUBLIC_USER Database User

- Edit the dads.conf File

- Copy the Images Directory

- Stop and Restart Oracle HTTP Server

Note that these instructions do not apply if you are running Oracle HTTP Server release 9.0.3. To learn more, see "Configuring Oracle HTTP Server Distributed with Oracle9i Release 2".

Note:
Within the context of this section, the Oracle home directory (ORACLE_HTTPSERVER_HOME) is the location where Oracle HTTP Server is installed.

4.5.2.1 Change the Password for the ADMIN Account

First, change the password for the Oracle Application Express ADMIN account.

Tip:
If you are upgrading from a prior release of Oracle Application Express, this step is unnecessary.

To change the password for the ADMIN account:

1. Change your working directory to ORACLE_BASE\ORACLE_HOME\apex or whatever convention used to indicate the Oracle home.

2. Start SQL*Plus and connect to the database where Oracle Application Express is installed as SYS. For example:

- On Windows:

SYSTEM_DRIVE:\ sqlplus /nolog
SQL> CONNECT SYS as SYSDBA
Enter password: SYS_password

- On UNIX and Linux:

$ sqlplus /nolog
SQL> CONNECT SYS as SYSDBA
Enter password: SYS_password

3. Run apxchpwd.sql. For example:

@apxchpwd.sql

When prompted enter a password for the ADMIN account.

4. Enter the following command followed by the new password.

@apxchpwd.sql password

For example to change the password to apex, you would enter:

@apxchpwd.sql apex

4.5.2.2 Unlock the APEX_PUBLIC_USER Database User

When configuring Oracle HTTP Server for Oracle Application Express in a new installation, the database user APEX_PUBLIC_USER must be an unlocked account. To unlock the account for database user APEX_PUBLIC_USER, execute the following steps:

1. Start SQL*Plus and connect to the database where Oracle Application Express is installed as SYS. For example:

- On Windows:

SYSTEM_DRIVE:\ sqlplus /nolog
SQL> CONNECT SYS as SYSDBA
Enter password: SYS_password

- On UNIX and Linux:

$ sqlplus /nolog
SQL> CONNECT SYS as SYSDBA
Enter password: SYS_password

2. Run the following statement:

ALTER USER APEX_PUBLIC_USER ACCOUNT UNLOCK

4.5.2.3 Change the Password for the APEX_PUBLIC_USER Database User

In order to specify the password in the DAD file, you have to change the password for the database user APEX_PUBLIC_USER. Please use the following steps to change the password for the APEX_PUBLIC_USER database user:

1. Start SQL*Plus and connect to the database where Oracle Application Express is installed as SYS. For example:

- On Windows:

SYSTEM_DRIVE:\ sqlplus /nolog
SQL> CONNECT SYS as SYSDBA
Enter password: SYS_password

- On UNIX and Linux:

$ sqlplus /nolog
SQL> CONNECT SYS as SYSDBA
Enter password: SYS_password

2. Run the following statement:

SQL> PASSWORD APEX_PUBLIC_USER
Changing password for APEX_PUBLIC_USER
New password: password
Retype new password: password

4.5.2.4 Edit the dads.conf File

If this is a new installation of Oracle Application Express, you need to edit the dads.conf file. The dads.conf file contains the information about the DAD to access Oracle Application Express.

To edit the dads.conf file:

1. Use a text editor and open the dads.conf:

- Oracle Application Server 10g:

ORACLE_BASE\ORACLE_HTTPSERVER_HOME\Apache\modplsql\conf\dads.conf

- Oracle HTTP Server distributed with Oracle Database 11g:

ORACLE_BASE\ORACLE_HTTPSERVER_HOME\ohs\modplsql\conf\dads.conf

2. Copy the following into the dads.conf file. Replace ORACLE_HTTPSERVER_HOME, host, port, service_name, and apex_public_user_password with values appropriate for your environment. Note that apex_public_user_password is the password you defined in "Change the Password for the APEX_PUBLIC_USER Database User".
Note that the path listed is only an example. The path in the dads.conf file should reference the file system path described in "Copy the Images Directory".

Alias /i/ "ORACLE_BASE\ORACLE_HTTPSERVER_HOME\images/"
AddType text/xml       xbl
AddType text/x-component       htc

<Location /pls/apex>
Order deny,allow
PlsqlDocumentPath docs
AllowOverride None
PlsqlDocumentProcedure      wwv_flow_file_mgr.process_download
PlsqlDatabaseConnectString  host:port:service_name ServiceNameFormat
PlsqlNLSLanguage            AMERICAN_AMERICA.AL32UTF8
PlsqlAuthenticationMode     Basic
SetHandler                  pls_handler
PlsqlDocumentTablename      wwv_flow_file_objects$
PlsqlDatabaseUsername       APEX_PUBLIC_USER
PlsqlDefaultPage            apex
PlsqlDatabasePassword       apex_public_user_password
Allow from all
</Location>

3. Locate the line containing PlsqlNLSLanguage.
The PlsqlNLSLanguage setting determines the language setting of the DAD. The character set portion of the PlsqlNLSLanguage value must be set to AL32UTF8, regardless of whether or not the database character set is AL32UTF8. For example:

...
PlsqlNLSLanguage            AMERICAN_AMERICA.AL32UTF8
...

4. Save and exit the dads.conf file.

Edit the httpd.conf File

Next, you need to edit the httpd.conf file to reference the dads.conf configuration file.

To edit the httpd.conf file:

1. Use a text editor and open the httpd.conf file.

ORACLE_BASE\ORACLE_HOME\Apache\Apache\conf\httpd.conf

2. Add an entry to reference the dads.conf configuration file.

include "ORACLE_BASE\ORACLE_HOME\Apache\modplsql\conf\dads.conf"

3. Save and exit the httpd.conf file.

4.5.2.5 Copy the Images Directory

Whether you are loading a new installation or upgrading from a previous release, you must copy the images directory from the top level of the ORACLE_BASE\ORACLE_HOME\apex directory to the location on the file system containing the Oracle home for Oracle HTTP Server.

Note:
This section is relevant only if you plan to run Oracle Application Express with Oracle HTTP Server with mod_plsql.

Topics in this section include:

- Copying the Images Directory After an Upgrade

- Copying the Images Directory in a New Installation

4.5.2.5.1 Copying the Images Directory After an Upgrade

During an upgrade, you must overwrite your existing images directory. Before you begin the upgrade, to ensure that you can revert to the previous version, Oracle recommends that you create a copy of your existing images directory for Oracle Application Express, indicating the release number of the images (for example, images_2_0).

To locate the images directory on the file system, review the following files for the text alias /i/:

- Oracle9i HTTP Server Release 2—see the httpd.conf file.

- Oracle HTTP Server distributed with Oracle Database 11g—see the dads.conf file.

- Oracle Application Server 10g—see the marvel.conf file.

When you locate the images directory path, Oracle recommends that you copy the existing images directory to a backup location. Doing this allows you to revert to the previous release, if that becomes necessary.

After you copy the existing images directory, use the following command syntax to copy the apex\images directory from the 11g Oracle database home to the existing images directory path, overwriting the existing images:

- Oracle Application Server 10g:

DRIVE_LETTER:\> xcopy /E /I ORACLE_HOME\apex\images ORACLE_HTTPSERVER_HOME\Apache\images

- Oracle HTTP Server distributed with Oracle Database 11g:

DRIVE_LETTER:\> xcopy /E /I ORACLE_HOME\apex\images ORACLE_HTTPSERVER_HOME\ohs\images

In the preceding syntax example:

- ORACLE_HOME is the Oracle Database 11g Oracle home

- ORACLE_HTTPSERVER_HOME is the existing Oracle Application Server or Oracle HTTP Server Oracle home

4.5.2.5.2 Copying the Images Directory in a New Installation

After installation, copy the directory apex/images.

You can copy the images directory using Windows Explorer, or running a command from a command prompt similar to the following:

DRIVE_LETTER:\> xcopy /E /I ORACLE_HOME\apex\images ORACLE_HTTPSERVER_HOME\ohs\images

In the preceding syntax example:

- ORACLE_HOME is the Oracle Database 11g Oracle home

- ORACLE_HTTPSERVER_HOME is the existing Oracle Application Server or Oracle HTTP Server Oracle home

4.5.2.6 Stop and Restart Oracle HTTP Server

To stop and restart the Oracle HTTP Server, enter commands using the following syntax, where ORACLE_BASE is the path to the Oracle base directory:

ORACLE_BASE\ORACLE_HTTPSERVER_HOME\opmn\bin\opmnctl stopproc ias-component=HTTP_Server
ORACLE_BASE\ORACLE_HTTPSERVER_HOME\opmn\bin\opmnctl startproc ias-component=HTTP_Server

4.5.3 Enable Network Services in Oracle Database 11g

By default, the ability to interact with network services is disabled in Oracle Database 11g release 1 (11.1). Therefore, if you are running Oracle Application Express with Oracle Database 11g release 1 (11.1), you need to use the new DBMS_NETWORK_ACL_ADMIN package to grant connect privileges to any host for the FLOWS_030100 database user. Failing to grant these privileges results in issues with:

- Sending outbound mail in Oracle Application Express.
Users can call methods from the APEX_MAIL package, but issues arise when sending outbound email.

- Using Web services in Oracle Application Express.

- PDF/report printing.

- Searching for content in online Help (that is, using the Find link).

Topics in this section include:

- Granting Connect Privileges

- Troubleshooting an Invalid ACL Error

Tip:
To run the examples described in this section, the compatible initialization parameter of the database must be set to at least 11.1.0.0.0. By default an 11g database will already have the parameter set properly, but a database upgraded to 11g from a prior version may not. See "Creating and Configuring an Oracle Database" in Oracle Database Administrator's Guide for information about changing database initialization parameters.

4.5.3.1 Granting Connect Privileges

The following example demonstrates how to grant connect privileges to any host for the FLOWS_030100 database user.

DECLARE
ACL_PATH  VARCHAR2(4000);
ACL_ID    RAW(16);
BEGIN
-- Look for the ACL currently assigned to '*' and give FLOWS_030100
-- the "connect" privilege if FLOWS_030100 does not have the privilege yet.

SELECT ACL INTO ACL_PATH FROM DBA_NETWORK_ACLS
WHERE HOST = '*' AND LOWER_PORT IS NULL AND UPPER_PORT IS NULL;

-- Before checking the privilege, make sure that the ACL is valid
-- (for example, does not contain stale references to dropped users).
-- If it does, the following exception will be raised:
--
-- ORA-44416: Invalid ACL: Unresolved principal 'FLOWS_030100'
-- ORA-06512: at "XDB.DBMS_XDBZ", line ...
--
SELECT SYS_OP_R2O(extractValue(P.RES, '/Resource/XMLRef')) INTO ACL_ID
FROM XDB.XDB$ACL A, PATH_VIEW P
WHERE extractValue(P.RES, '/Resource/XMLRef') = REF(A) AND
EQUALS_PATH(P.RES, ACL_PATH) = 1;

DBMS_XDBZ.ValidateACL(ACL_ID);
IF DBMS_NETWORK_ACL_ADMIN.CHECK_PRIVILEGE(ACL_PATH, 'FLOWS_030100',
'connect') IS NULL THEN
DBMS_NETWORK_ACL_ADMIN.ADD_PRIVILEGE(ACL_PATH,
'FLOWS_030100', TRUE, 'connect');
END IF;

EXCEPTION
-- When no ACL has been assigned to '*'.
WHEN NO_DATA_FOUND THEN
DBMS_NETWORK_ACL_ADMIN.CREATE_ACL('power_users.xml',
'ACL that lets power users to connect to everywhere',
'FLOWS_030100', TRUE, 'connect');
DBMS_NETWORK_ACL_ADMIN.ASSIGN_ACL('power_users.xml','*');
END;
/
COMMIT;

The following example demonstrates how to provide less privileged access to local network resources. This example would enable indexing the Oracle Application Express Online Help and could possibly enable email and PDF printing if those servers were also on the local host.

DECLARE
ACL_PATH  VARCHAR2(4000);
ACL_ID    RAW(16);
BEGIN
-- Look for the ACL currently assigned to 'localhost' and give FLOWS_030100
-- the "connect" privilege if FLOWS_030100 does not have the privilege yet.
SELECT ACL INTO ACL_PATH FROM DBA_NETWORK_ACLS
WHERE HOST = 'localhost' AND LOWER_PORT IS NULL AND UPPER_PORT IS NULL;

-- Before checking the privilege, make sure that the ACL is valid
-- (for example, does not contain stale references to dropped users).
-- If it does, the following exception will be raised:
--
-- ORA-44416: Invalid ACL: Unresolved principal 'FLOWS_030100'
-- ORA-06512: at "XDB.DBMS_XDBZ", line ...
--

SELECT SYS_OP_R2O(extractValue(P.RES, '/Resource/XMLRef')) INTO ACL_ID
FROM XDB.XDB$ACL A, PATH_VIEW P
WHERE extractValue(P.RES, '/Resource/XMLRef') = REF(A) AND
EQUALS_PATH(P.RES, ACL_PATH) = 1;

DBMS_XDBZ.ValidateACL(ACL_ID);
IF DBMS_NETWORK_ACL_ADMIN.CHECK_PRIVILEGE(ACL_PATH, 'FLOWS_030100',
'connect') IS NULL THEN
DBMS_NETWORK_ACL_ADMIN.ADD_PRIVILEGE(ACL_PATH,
'FLOWS_030100', TRUE, 'connect');
END IF;

EXCEPTION
-- When no ACL has been assigned to 'localhost'.
WHEN NO_DATA_FOUND THEN
DBMS_NETWORK_ACL_ADMIN.CREATE_ACL('local-access-users.xml',
'ACL that lets power users to connect to everywhere',
'FLOWS_030100', TRUE, 'connect');
DBMS_NETWORK_ACL_ADMIN.ASSIGN_ACL('local-access-users.xml','localhost');
END;
/
COMMIT;

4.5.3.2 Troubleshooting an Invalid ACL Error

If you receive an ORA-44416: Invalid ACL error after running the previous script, use the following query to identify the invalid ACL:

REM Show the dangling references to dropped users in the ACL that is assigned
REM to '*'.

SELECT ACL, PRINCIPAL
FROM DBA_NETWORK_ACLS NACL, XDS_ACE ACE
WHERE HOST = '*' AND LOWER_PORT IS NULL AND UPPER_PORT IS NULL AND
NACL.ACLID = ACE.ACLID AND
NOT EXISTS (SELECT NULL FROM ALL_USERS WHERE USERNAME = PRINCIPAL);

Next, run the following code to fix the ACL:

DECLARE
ACL_ID   RAW(16);
CNT      NUMBER;
BEGIN
-- Look for the object ID of the ACL currently assigned to '*'
SELECT ACLID INTO ACL_ID FROM DBA_NETWORK_ACLS
WHERE HOST = '*' AND LOWER_PORT IS NULL AND UPPER_PORT IS NULL;

-- If just some users referenced in the ACL are invalid, remove just those
-- users in the ACL. Otherwise, drop the ACL completely.
SELECT COUNT(PRINCIPAL) INTO CNT FROM XDS_ACE
WHERE ACLID = ACL_ID AND
EXISTS (SELECT NULL FROM ALL_USERS WHERE USERNAME = PRINCIPAL);

IF (CNT > 0) THEN

FOR R IN (SELECT PRINCIPAL FROM XDS_ACE
WHERE ACLID = ACL_ID AND
NOT EXISTS (SELECT NULL FROM ALL_USERS
WHERE USERNAME = PRINCIPAL)) LOOP
UPDATE XDB.XDB$ACL
SET OBJECT_VALUE =
DELETEXML(OBJECT_VALUE,
'/ACL/ACE[PRINCIPAL="'||R.PRINCIPAL||'"]')
WHERE OBJECT_ID = ACL_ID;
END LOOP;

ELSE
DELETE FROM XDB.XDB$ACL WHERE OBJECT_ID = ACL_ID;
END IF;

END;
/

REM commit the changes.

COMMIT;

Once the ACL has been fixed, you need to run the first script in this section to apply the ACL to the FLOWS_030100 user. See "Granting Connect Privileges".

4.5.4 Security Considerations

Oracle highly recommends you configure and use Secure Sockets Layer (SSL) to ensure that passwords and other sensitive data are not transmitted in clear text in HTTP requests. Without the use of SSL, passwords could potentially be exposed, compromising security.

SSL is an industry standard protocol that uses RSA public key cryptography in conjunction with symmetric key cryptography to provide authentication, encryption, and data integrity.

4.5.5 About Running Oracle Application Express in Other Languages

The Oracle Application Express interface is translated into German, Spanish, French, Italian, Japanese, Korean, Brazilian Portuguese, Simplified Chinese, and Traditional Chinese. A single instance of Oracle Application Express can be installed with one or more of these translated versions. At runtime, each user's Web browser language settings determine the specific language version.

The translated version of Oracle Application Express should be loaded into a database that has a character set that supports the specific language. If you attempt to install a translated version of Oracle Application Express into a database that does not support the character encoding of the language, the installation may fail or the translated Oracle Application Express instance may appear corrupt when run. The database character set AL32UTF8 supports all the translated versions of Oracle Application Express.

You can manually install translated versions of Oracle Application Express using SQL*Plus. The installation files are encoded in AL32UTF8.

Note:
Regardless of the target database character set, to install a translated version of Oracle Application Express, you must set the character set value of the NLS_LANG environment variable to AL32UTF8 prior to starting SQL*Plus.

The following examples illustrate valid NLS_LANG settings for loading Oracle Application Express translations:

American_America.AL32UTF8
Japanese_Japan.AL32UTF8

4.5.5.1 Installing a Translated Version of Oracle Application Express

Whether you are installing for the first time or upgrading from a previous release, you must run the load_lang.sql script to run a translated version of Oracle Application Express.

The installation scripts are located in subdirectories identified by a language code in the unzipped distribution apex/builder. For example, the German version is located in apex/builder/de and the Japanese version is located in apex/builder/ja. Within each of directory, there is a language loading script identified by the language code (for example, load_de.sql or load_ja.sql).

To install a translated version of Oracle Application Express:

1. Set the NLS_LANG environment variable, making sure that the character set is AL32UTF8. For example:

- Bourne or Korn shell:

NLS_LANG=American_America.AL32UTF8
export NLS_LANG

- C shell:

setenv NLS_LANG American_America.AL32UTF8

- For Windows based systems:

set NLS_LANG=American_America.AL32UTF8

2. Start SQL*Plus and connect to the database where Oracle Application Express is installed as SYS specifying the SYSDBA role. For example:

- On Windows:

SYSTEM_DRIVE:\ sqlplus /nolog
SQL> CONNECT SYS as SYSDBA
Enter password: SYS_password

- On UNIX and Linux:

$ sqlplus /nolog
SQL> CONNECT SYS as SYSDBA
Enter password: SYS_password

3. Execute the following statement:

ALTER SESSION SET CURRENT_SCHEMA = FLOWS_030100;

4. Execute the appropriate language specific script. For example:

@load_lang.sql

Where lang is the specific language (for example, load_de.sql for German or load_ja.sql for Japanese).

4.5.6 About Managing JOB_QUEUE_PROCESSES

JOB_QUEUE_PROCESSES determine the maximum number of concurrently running jobs. In Oracle Application Express release 3.0, transactional support and SQL scripts require jobs. If JOB_QUEUE_PROCESSES is not enabled and working properly, you cannot successfully execute a script.

Topics in this section include:

- Viewing the Number of JOB_QUEUE_PROCESSES

- Changing the Number of JOB_QUEUE_PROCESSES

4.5.6.1 Viewing the Number of JOB_QUEUE_PROCESSES

There are currently three ways to view the number of JOB_QUEUE_PROCESSES:

- In the installation log file

- On the About Application Express page in Oracle Application Express

- From SQL*Plus

4.5.6.1.1 Viewing JOB_QUEUE_PROCESSES in the Installation Log File

After installing or upgrading Oracle Application Express to release 3.0, you can view the number of JOB_QUEUE_PROCESSES in the installation log files. See "Reviewing a Log of an Installation Session".

4.5.6.1.2 Viewing JOB_QUEUE_PROCESSES in Oracle Application Express

You can also view the number of JOB_QUEUE_PROCESSES on the About Application Express page.

To view the About Application Express page:

1. Log in to Oracle Application Express. See "Log In to Oracle Application Express".

2. On the Administration list, click About Application Express.
The current number JOB_QUEUE_PROCESSES displays at the bottom of the page.

4.5.6.1.3 Viewing JOB_QUEUE_PROCESSES from SQL*Plus

You can also view the number of JOB_QUEUE_PROCESSES from SQL*Plus by running the following SQL statement:

SELECT VALUE FROM v$parameter WHERE NAME = 'job_queue_processes'

4.5.6.2 Changing the Number of JOB_QUEUE_PROCESSES

You can change the number of JOB_QUEUE_PROCESSES by running a SQL statement in SQL*Plus:

To update the number of JOB_QUEUE_PROCESSES:

1. Start SQL*Plus and connect to the database where Oracle Application Express is installed as SYS specifying the SYSDBA role:

- On Windows:

SYSTEM_DRIVE:\ sqlplus /nolog
SQL> CONNECT SYS as SYSDBA
Enter password: SYS_password

- On UNIX and Linux:

$ sqlplus /nolog
SQL> CONNECT SYS as SYSDBA
Enter password: SYS_password

2. In SQL*Plus run the following SQL statement:

ALTER SYSTEM SET JOB_QUEUE_PROCESSES = <number>

For example, running the statement ALTER SYSTEM SET JOB_QUEUE_PROCESSES = 20 sets JOB_QUEUE_PROCESSES to 20.

4.5.7 About Obfuscating PlsqlDatabasePassword Parameter

The PlsqlDatabasePassword parameter specifies the password for logging in to the database. You can use the dadTool.pl utility to obfuscate passwords in the dads.conf file.

You can find the dadTool.pl utility in the following directory:

- For UNIX and Linux based systems:

ORACLE_BASE/ORACLE_HTTPSERVER_HOME/Apache/modplsql/conf

- For Windows based systems:

ORACLE_BASE\ORACLE_HTTPSERVER_HOME\Apache\modplsql\conf

4.5.7.1 Obfuscating Passwords

To obfuscate passwords, run dadTool.pl by following the instructions in the dadTool.README file.

4.5.8 Log In to Oracle Application Express

You access the Oracle Application Express home page in a Web browser. To view or develop Oracle Application Express applications, the Web browser must support JavaScript and the HTML 4.0 and CSS 1.0 standards. See "Browser Requirement".

Topics in this section include:

- About Application Express User Roles

- About Setting Up Your Local Environment

4.5.8.1 About Application Express User Roles

In the Oracle Application Express development environment, users log in to a shared work area called a workspace. Users are divided into four primary roles:

- Oracle Application Express administrators are superusers that manage an entire hosted instance using the Oracle Application Express Administration Services application.

- Workspace administrators are users who perform administrator tasks specific to a workspace such as managing user accounts, monitoring workspace activity, and viewing log files.

- Developers are users who create and edit applications. Developers can have their own workspace or share a workspace.

- End users have no development privileges. You define end users so that they can access applications that do not use an external authentication scheme.

4.5.8.2 About Setting Up Your Local Environment

How you set up Oracle Application Express depends upon your user role. If you are a developer accessing a hosted development environment, an administrator must grant you access to a workspace. If you are an Oracle Application Express administrator, you must perform the following steps:

1. Log in to Oracle Application Express Administration Services. Oracle Application Express Administration Services is a separate application for managing an entire Oracle Application Express instance. You log in using the ADMIN account and password created or reset during the installation process.

2. Specify a provisioning mode. In Oracle Application Express Administration Services, you need to determine how the process of creating (or provisioning) a workspace will work in your development environment.

3. Create a Workspace. A workspace is a virtual private database allowing multiple users to work within the same Oracle Application Express installation while keeping their objects, data and applications private. Each workspace has a unique ID and name. An Oracle Application Express administrator can create a workspace manually or have users submit requests.

4. Log in to a Workspace. Once you create a workspace in Oracle Application Express Administration Services, return to the Oracle Application Express Login page and log in to that workspace.

To learn more about setting up your environment, see Oracle Database 2 Day + Oracle Application Express Developer's Guide or "Quick Start" in Oracle Application Express Application Builder User's Guide

4.6 About the Oracle Application Express Runtime Environment

The Oracle Application Express runtime environment enables you to run production applications. It includes only the packages necessary to run your applications, making it a more hardened environment. It does not provide a Web interface for administration.

You administer the Oracle Application Express runtime environment using SQL*Plus or SQL Developer and the APEX_INSTANCE_ADMIN API. To learn more see, "Managing a Runtime Environment" and in Oracle Application Express Application Builder User's Guide.

Topics in this section include:

- Convert a Runtime Environment to a Full Development Environment

- Convert a Full Development Environment to a Runtime Environment

4.6.1 Convert a Runtime Environment to a Full Development Environment

To convert an Oracle Application Express runtime environment to a full development environment:

1. Change your working directory to the apex directory where you unzipped the installation software.

2. Start SQL*Plus and connect to the database where Oracle Application Express is installed as SYS specifying the SYSDBA role. For example:

- On Windows:

SYSTEM_DRIVE:\ sqlplus /nolog
SQL> CONNECT SYS as SYSDBA
Enter password: SYS_password

- On UNIX and Linux:

$ sqlplus /nolog
SQL> CONNECT SYS as SYSDBA
Enter password: SYS_password

3. Run apxdvins.sql. For example:

@apxdvins

See Also:
Oracle Database PL/SQL Language Reference for more information about SQL*Plus

4.6.2 Convert a Full Development Environment to a Runtime Environment

To convert an Oracle Application Express full development environment to a runtime environment:

1. Change your working directory to the apex directory where you unzipped the installation software.

2. Start SQL*Plus and connect to the database where Oracle Application Express is installed as SYS specifying the SYSDBA role. For example:

- On Windows:

SYSTEM_DRIVE:\ sqlplus /nolog
SQL> CONNECT SYS as SYSDBA
Enter password: SYS_password

- On UNIX and Linux:

$ sqlplus /nolog
SQL> CONNECT SYS as SYSDBA
Enter password: SYS_password

3. Run apxdevrm.sql. For example:

@apxdevrm

4. Follow the instructions in "Change the Password for the ADMIN Account".

See Also:
Oracle Database PL/SQL Language Reference for more information about SQL*Plus

A Oracle Application Express Troubleshooting

This appendix contains information on troubleshooting.

This chapter contains these topics:

- Reviewing a Log of an Installation Session

- Verifying the Validity of an Oracle Application Express Installation

- Cleaning Up After a Failed Installation

- Images Displaying Incorrectly in Oracle Application Express

- Online Help Not Working

A.1 Reviewing a Log of an Installation Session

The apexins.sql script creates a log file in the apex directory using the naming convention installYYYY-MM-DD_HH24-MI-SS.log. In a successful installation, the log file contains the following text:

Thank you for installing Oracle Application Express.
Oracle Application Express is installed in the FLOWS_030100 schema.

If the log file contains a few errors, it does not mean that your installation failed. Note that acceptable errors are noted as such in the log file.

A.2 Verifying the Validity of an Oracle Application Express Installation

You can verify the validity of an Oracle Application Express installation by running the following query:

SELECT STATUS FROM DBA_REGISTRY
WHERE COMP_ID = 'APEX';

If the result is VALID, you can assume the installation was successful.

A.3 Cleaning Up After a Failed Installation

In a successful installation the following banner displays at the end of the installation:

Thank you for installing Oracle Application Express.
Oracle Application Express is installed in the FLOWS_030100 schema.

To reinstall, you need to either drop the Oracle Application Express database schemas, or run a script to completely remove Application Express from the database, depending upon the installation type.

Topics in this section include:

- Reverting to a Previous Release After a Failed Upgrade Installation

- Removing Oracle Application Express from the Database

A.3.1 Reverting to a Previous Release After a Failed Upgrade Installation

In the case of a failed upgrade installation, you may want to revert Oracle Application Express to a previous release and then remove the schemas associated with the current release.

A.3.1.1 Verifying If You Have a Previous Version of Oracle Application Express

To verify whether you have a previous version of Application Express:

1. Start SQL*Plus and connect to the database where Oracle Application Express is installed as SYS specifying the SYSDBA role. For example:

- On Windows:

SYSTEM_DRIVE:\ sqlplus /nolog
SQL> CONNECT SYS as SYSDBA
Enter password: SYS_password

- On UNIX and Linux:

$ sqlplus /nolog
SQL> CONNECT SYS as SYSDBA
Enter password: SYS_password

2. 2.Execute the following command in SQL*Plus:

SELECT username FROM dba_users WHERE username LIKE 'FLOWS_%';

If the query above returns any rows, the database contains a previous version of Oracle Application Express.

A.3.1.2 Reverting to Previous Release

To revert to a previous Oracle Application Express release:

1. If you altered your images directory, you need to point the text alias /i/ back to images directory for the release you wish to revert to. See "Copying the Images Directory After an Upgrade" or "Copying the Images Directory After an Upgrade".

2. Start SQL*Plus and connect to the database where Oracle Application Express is installed as SYS specifying the SYSDBA role:

- On Windows:

SYSTEM_DRIVE:\ sqlplus /nolog
SQL> SQL> CONNECT SYS as SYSDBA
Enter password: SYS_password

- On UNIX and Linux:

$ sqlplus /nolog
SQL> SQL> CONNECT SYS as SYSDBA
Enter password: SYS_password

3. Execute the following command in SQL*Plus:

1. To revert to Oracle Application Express release 1.5, execute the following:

ALTER SESSION SET CURRENT_SCHEMA = FLOWS_010500;
exec flows_010500.wwv_flow_upgrade.switch_schemas
('FLOWS_030100','FLOWS_010500');

2. To revert to Oracle Application Express release 1.6, execute the following:

ALTER SESSION SET CURRENT_SCHEMA = FLOWS_010600;
exec flows_010600.wwv_flow_upgrade.switch_schemas
('FLOWS_030100','FLOWS_010600');

3. To revert to Oracle Application Express release 2.0, execute the following:

ALTER SESSION SET CURRENT_SCHEMA = FLOWS_020000;
exec flows_020000.wwv_flow_upgrade.switch_schemas
('FLOWS_030100','FLOWS_020000');

4. To revert to Oracle Application Express release 2.2, execute the following:

ALTER SESSION SET CURRENT_SCHEMA = FLOWS_020200;
exec flows_020200.wwv_flow_upgrade.switch_schemas
('FLOWS_030100','FLOWS_020200');

5. To revert to Oracle Application Express release 3.0, execute the following:

ALTER SESSION SET CURRENT_SCHEMA = FLOWS_030000;
exec flows_030000.wwv_flow_upgrade.switch_schemas
('FLOWS_030100','FLOWS_030000');

4. See the next section, "Removing the Oracle Application Express Release 3.1 Schema".

A.3.1.3 Removing the Oracle Application Express Release 3.1 Schema

After you have reverted back to the prior release you can remove the Oracle Application Express 3.1 schema.

To remove the release 3.1 schema:

1. Start SQL*Plus and connect to the database where Oracle Application Express is installed as SYS specifying the SYSDBA role:

- On Windows:

SYSTEM_DRIVE:\ sqlplus /nolog
SQL> SQL> CONNECT SYS as SYSDBA
Enter password: SYS_password

- On UNIX and Linux:

$ sqlplus /nolog
SQL> SQL> CONNECT SYS as SYSDBA
Enter password: SYS_password

2. Execute the following command:

DROP USER FLOWS_030100 CASCADE;

Once you have removed the Oracle Application Express 3.1 schema, you can now attempt the upgrade again.

A.3.2 Removing Oracle Application Express from the Database

This section describes how to remove the Oracle Application Express schema, synonyms, and users from the database without deleting the database. If you are going to delete the database, then you do not need to complete these steps.

Note:
Do not follow these steps if you have upgraded your database from a prior release, and still want to use the prior release of Oracle Application Express. For information about reverting to a prior release, see "Reverting to Previous Release". If you are not sure whether you have completed a new installation or an upgrade installation, follow the steps in "Cleaning Up After a Failed Installation" to verify if a previous version of Application Express exists in the database

To remove Oracle Application Express from the database:

1. Change your working directory to the apex directory where you unzipped the Oracle Application Express software.

2. Start SQL*Plus and connect to the database where Oracle Application Express is installed as SYS specifying the SYSDBA role:

- On Windows:

SYSTEM_DRIVE:\ sqlplus /nolog
SQL> SQL> CONNECT SYS as SYSDBA
Enter password: SYS_password

- On UNIX and Linux:

$ sqlplus /nolog
SQL> SQL> CONNECT SYS as SYSDBA
Enter password: SYS_password

3. Execute the following command:

SQL> @apxremov.sql

A.4 Images Displaying Incorrectly in Oracle Application Express

If images in Oracle Application Express do not display correctly, you may have more than one definition of the /i/ alias. To address this issue:

- If possible, rename the first instance of /i/ to a different alias name.

- Alternatively, copy the images from the ORACLE_BASE\ORACLE_HOME\apex\images directory to the directory defined by the first /i/ alias.

A.5 Online Help Not Working

This section describes issues with Oracle Application Express online Help.

Topics in this section include:

- Online Help Not Working When Using a Virtual Host

- Problems Searching Online Help

See Also:
"Enable Network Services in Oracle Database 11g" for your installation scenario.

A.5.1 Online Help Not Working When Using a Virtual Host

If users are accessing Oracle Application Express through a Virtual Host, online Help will not work. Consider the following example:

- The hostname of the Oracle HTTP Server where the Oracle Application Express database access descriptor (DAD) resides is internal.server.com and the port is 7777.

- Users access Oracle Application Express through a Virtual Host. In their Web browsers, users see external.server.com and port 80.

In this example, Oracle Application Express online Help will not work if the users cannot access internal.server.com. To resolve this issue, add the following lines to the Oracle Application Express database access descriptor (DAD) to override the CGI environment variables SERVER_NAME and SERVER_PORT:

PlsqlCGIEnvironmentList SERVER_NAME=external.server.com
PlsqlCGIEnvironmentList SERVER_PORT=80

See Also:
Oracle HTTP Server mod_plsql User's Guide for information on overriding the CGI environment variables and "Oracle Text Requirement"

A.5.2 Problems Searching Online Help

The underlying index that enables search capability in Oracle Application Express online Help is created upon first use. Note that this index must be created over a non-SSL link. If your connection is an SSL link, https displays in the URL. To index online help, access Oracle Application Express over a non-SSL link. Once the online Help index is created, you can revert to normal https access.

B Configuring Oracle HTTP Server Distributed with Oracle9i Release 2

In Oracle HTTP Server distributed with Oracle9i Release 2 (9.2), the wdbsvr.app file contains information about the DAD to access Oracle Application Express. A DAD is a set of values that specify how the Oracle HTTP Server component modplsql connects to the database server to fulfill an HTTP request.

Topics in this appendix include:

- Recommended Pre-installation Tasks

- Downloading from OTN and Configuring Oracle HTTP Server

- Install the Database and Configure Oracle HTTP Server

B.1 Recommended Pre-installation Tasks

Before installing Oracle Application Express, Oracle recommends that you complete the following steps:

1. Review and satisfy all Oracle Application Express installation requirements. See "Oracle Application Express Installation Requirements".

2. Shut down any existing Oracle Database instances as well as Oracle-related processes.
Shut down any existing Oracle Database instances with normal or immediate priority, except for the database where you plan to install the Oracle Application Express schemas. On Real Application Clusters (RAC) systems, shut down all instances on each node.

If Automatic Storage Management (ASM) is running, shut down all databases that use ASM except for the database where you will install Oracle Application Express, and then shut down the ASM instance.

You can use the Windows Services utility, located either in the Windows Control Panel or from the Administrative Tools menu (under Start and then Programs), to shut down Oracle Database and ASM instances. Names of Oracle databases are preceded with OracleService. The Oracle ASM service is named OracleASMService+ASM. In addition, shut down the OracleCSService service, which ASM uses. Right-click the name of the service and from the menu, choose Stop.

3. Back up the Oracle Database installation.
Oracle recommends that you create a backup of the current installation of Oracle Database installation before you install Oracle Application Express. You can use Oracle Database Recovery Manager, which is included the Oracle Database installation, to perform the backup.

See Also:
Oracle Database Backup and Recovery User's Guide

4. Start the Oracle Database instance that contains the target database.
After backing up the system, you must start the Oracle instance that contains the target Oracle database. Do not start other processes such as the listener or Oracle HTTP Server. However, if you are performing a remote installation, make sure the database listener for the remote database has started.

Note:
If you are connecting to a remote database, then start the listener.

B.2 Downloading from OTN and Configuring Oracle HTTP Server

This section describes how to install Oracle Application Express by downloading a ZIP file from OTN and then configuring Oracle HTTP Server distributed with Oracle9i Release 2.

Topics in this section include:

- Install the Oracle Database and Complete Pre-installation Tasks

- Download and Install the Software

- Change the Password for the ADMIN Account

- Restart Processes

- Configure Oracle HTTP Server

- About Enabling Network Services in Oracle Database 11g

- Security Considerations

- About Running Oracle Application Express in Other Languages

- About Managing JOB_QUEUE_PROCESSES

- About Obfuscating PlsqlDatabasePassword Parameter

- Log In to Oracle Application Express

See Also:
"About the Oracle Application Express Runtime Environment" and "Configuring Oracle HTTP Server Distributed with Oracle9i Release 2"

B.2.1 Install the Oracle Database and Complete Pre-installation Tasks

Oracle Application Express requires an Oracle database that is release 9.2.0.3 or later. To learn more, see the Oracle Database Installation Guide for your operating environment and "Recommended Pre-installation Tasks".

B.2.2 Download and Install the Software

To install Oracle Application Express:

1. Download the file apex_3.1.zip from the Oracle Application Express download page. See:

http://www.oracle.com/technology/products/database/application_express/download.html

Note that the actual file name may differ if a more recent release has shipped since this document was published.

2. Unzip apex_3.1.zip as follows, preserving directory names:

- UNIX and Linux: Unzip apex_3.1.zip

- Windows: Double click the file apex_3.1.zip in Windows Explorer

3. Change your working directory to apex.

4. Start SQL*Plus and connect to the database where Oracle Application Express is installed as SYS specifying the SYSDBA role. For example:

- On Windows:

SYSTEM_DRIVE:\ sqlplus /nolog
SQL> CONNECT SYS as SYSDBA
Enter password: SYS_password

- On UNIX and Linux:

$ sqlplus /nolog
SQL> CONNECT SYS as SYSDBA
Enter password: SYS_password

5. Select the appropriate installation option.
Full development environment provides complete access to the Application Builder environment to develop applications. A Runtime environment enables users to run applications that cannot be modified. To learn more, see "About the Oracle Application Express Runtime Environment".

Available installation options include:

- Full development environment. Run apexins.sql passing the following four arguments in the order shown:

@apexins tablespace_apex tablespace_files tablespace_temp images

Where:

- tablespace_apex is the name of the tablespace for the Oracle Application Express application user.

- tablespace_files is the name of the tablespace for the Oracle Application Express files user.

- tablespace_temp is the name of the temporary tablespace.

- images is the virtual directory for Oracle Application Express images. To support future Oracle Application Express upgrades, define the virtual image directory as /i/.

Example:

@apexins SYSAUX SYSAUX TEMP /i/

- Runtime environment. Run apxrtins.sql passing the following arguments in the order shown:

@apxrtins tablespace_apex tablespace_files tablespace_temp images

Where:

- tablespace_apex is the name of the tablespace for the Oracle Application Express application user.

- tablespace_files is the name of the tablespace for the Oracle Application Express files user.

- tablespace_temp is the name of the temporary tablespace.

- images is the virtual directory for Oracle Application Express images. To support future Oracle Application Express upgrades, define the virtual image directory as /i/.

Example:

@apxrtins SYSAUX SYSAUX TEMP /i/

See Also:
Oracle Database PL/SQL Language Reference for more information about SQL*Plus

When Oracle Application Express installs it creates three new database accounts:

- FLOWS_030100 - The account that owns the Oracle Application Express schema and metadata.

- FLOWS_FILES - The account that owns the Oracle Application Express uploaded files.

- APEX_PUBLIC_USER - The minimally privileged account used for Oracle Application Express configuration with Oracle HTTP Server and mod_plsql.

If you are upgrading from a previous release, FLOWS_FILES, already exists and APEX_PUBLIC_USER is created if it does not already exist.

Tip:
Oracle Application Express must be installed from a writable directory on the file system. See "Reviewing a Log of an Installation Session".

B.2.3 Change the Password for the ADMIN Account

In a new installation of Oracle Application Express, or if you are converting a runtime environment to a development environment, you must change the password of the internal ADMIN account. In an upgrade scenario, the password will be preserved and carried over from the prior release.

To change the password for the ADMIN account:

1. Change your working directory to the apex directory where you unzipped the installation software.

2. Start SQL*Plus and connect to the database where Oracle Application Express is installed as SYS specifying the SYSDBA role. For example:

- On Windows:

SYSTEM_DRIVE:\ sqlplus /nolog
SQL> CONNECT SYS as SYSDBA
Enter password: SYS_password

- On UNIX and Linux:

$ sqlplus /nolog
SQL> CONNECT SYS as SYSDBA
Enter password: SYS_password

3. Run apxchpwd.sql. For example:

@apxchpwd

When prompted enter a password for the ADMIN account.

See Also:
Oracle Database PL/SQL Language Reference for more information about SQL*Plus

B.2.4 Restart Processes

After you install Oracle Application Express, you need to restart the processes that you stopped before you began the installation, such as listener and other processes. In addition, restart Oracle HTTP Server.

B.2.5 Configure Oracle HTTP Server

This section describes how to configure Oracle HTTP Server with mod_plsql distributed with Oracle9i Release 2.

Topics in this section include:

- Unlock the APEX_PUBLIC_USER Account

- Change the Password for the APEX_PUBLIC_USER Account

- Copy the Images Directory

- Modifying the wdbsvr.app File

- Modify the Oracle9i httpd.conf

B.2.5.1 Unlock the APEX_PUBLIC_USER Account

The APEX_PUBLIC_USER account is locked at the end of a new installation of Oracle Application Express. You need to unlock this account prior to configuring the database access descriptor (DAD) in a new installation.

To unlock the APEX_PUBLIC_USER account:

1. Start SQL*Plus and connect to the database where Oracle Application Express is installed as SYS specifying the SYSDBA role. For example:

- On Windows:

SYSTEM_DRIVE:\ sqlplus /nolog
SQL> CONNECT SYS as SYSDBA
Enter password: SYS_password

- On UNIX and Linux:

$ sqlplus /nolog
SQL> CONNECT SYS as SYSDBA
Enter password: SYS_password

2. Run the following statement:

ALTER USER APEX_PUBLIC_USER ACCOUNT UNLOCK

B.2.5.2 Change the Password for the APEX_PUBLIC_USER Account

The APEX_PUBLIC_USER account is created with a random password in a new installation of Oracle Application Express. You will need to change the password for this account prior to configuring the database access descriptor (DAD) in a new installation.

To change the password for the APEX_PUBLIC_USER account:

1. Start SQL*Plus and connect to the database where Oracle Application Express is installed as SYS specifying the SYSDBA role. For example:

- On Windows:

SYSTEM_DRIVE:\ sqlplus /nolog
SQL> CONNECT SYS as SYSDBA
Enter password: SYS_password

- On UNIX and Linux:

$ sqlplus /nolog
SQL> CONNECT SYS as SYSDBA
Enter password: SYS_password

2. Run the following statement:

ALTER USER APEX_PUBLIC_USER IDENTIFIED BY new_password

Where new_password is the new password you are setting for APEX_PUBLIC_USER. You will use this password when creating the DAD in the sections that follow.

B.2.5.3 Copy the Images Directory

Whether you are loading a new installation or upgrading from a previous release, you must copy the images directory from the top level of the apex\images directory to the location on the file system containing the Oracle home for Oracle HTTP Server.

Topics in this section include:

- Copying the Images Directory After an Upgrade

- Copying the Images Directory in a New Installation

B.2.5.3.1 Copying the Images Directory After an Upgrade

During an upgrade, you must overwrite your existing images directory. Before you begin the upgrade, to ensure that you can revert to the previous version, Oracle recommends that you create a copy of your existing images directory for Oracle Application Express, indicating the release number of the images (for example, images_3_0).

To locate the images directory on the file system, review the the httpd.conf file for the text alias /i/.

When you locate the images directory path, copy the existing images directory to a backup location. Doing so enables you to revert to the previous release, if that becomes necessary.

After you copy the existing images directory, use the following command syntax to copy the apex\images directory from the Oracle Database home to the existing images directory path, overwriting the existing images:

- On Windows:

xcopy /E /I APEX_HOME\apex\images ORACLE_HTTPSERVER_HOME\Apache\images

- On UNIX and Linux:

cp -rf APEX_HOME/apex/images ORACLE_HTTPSERVER_HOME/Apache

In the preceding syntax examples:

- ORACLE_HOME is the Oracle Database Oracle home

- ORACLE_HTTPSERVER_HOME is the existing Oracle HTTP Server Oracle home

B.2.5.3.2 Copying the Images Directory in a New Installation

After installation, copy the directory apex/images.

- On Windows:

xcopy /E /I ORACLE_HOME\apex\images ORACLE_HTTPSERVER_HOME\Apache\images

- On UNIX and Linux:

cp -rf $ORACLE_HOME/apex/images ORACLE_HTTPSERVER_HOME/Apache

In the preceding syntax examples:

- ORACLE_HOME is the Oracle Database Oracle home

- ORACLE_HTTPSERVER_HOME is the existing Oracle HTTP Server Oracle home

B.2.5.4 Modifying the wdbsvr.app File

To create the DAD, you modify the wdbsvr.app file and add an entry for Oracle Application Express.

To modify the wdbsvr.app file:

1. Use a text editor and open the wdbsvr.app file:

- On Windows, see:

ORACLE_HTTPSERVER_HOME\Apache\modplsql\cfg\wdbsvr.app

- On UNIX and Linux, see:

ORACLE_HTTPSERVER_HOME/Apache/modplsql/cfg/wdbsvr.app

2. Add an entry for Oracle Application Express using the following syntax. Only change the settings indicated in italics.

[DAD_apex]
connect_string = localhost:1521:orcl
password = apex
username = apex_public_user
default_page = apex
document_table = wwv_flow_file_objects$
document_path = docs
document_proc = wwv_flow_file_mgr.process_download
reuse = Yes
enablesso = No
stateful = STATELESS_RESET
nls_lang = American_America.AL32UTF8

Where:

- connect_string refers to the host ID, port number, and Oracle9i database where Oracle Application Express was installed. Use the format host:port:sid.
If the Oracle9i version of Oracle HTTP Server you want to use is installed in the same Oracle home as the database you specified for use with Oracle Application Express, leave this parameter blank.

- password is the password you changed for the APEX_PUBLIC_USER. See "Change the Password for the APEX_PUBLIC_USER Account".

- nls_lang determines the language setting of the DAD. The character set portion of the nls_lang value must always be set to AL32UTF8, regardless of whether or not the database character set is AL32UTF8.
If either the territory portion or the language portion of the NLS settings contains a space, you must wrap the value in double quotes as shown in the following example:

nls_lang = "ENGLISH_UNITED KINGDOM.AL32UTF8"

You can find information about your database's NLS settings by querying the view NLS_DATABASE_PARAMETERS as shown in the following example:

SELECT parameter,value
FROM nls_database_parameters
WHERE PARAMETER IN ('NLS_CHARACTERSET','NLS_LANGUAGE','NLS_TERRITORY');

3. Leave the remaining settings, including the user name setting, as they appear in the previous example.

4. Save and exit the wdbsvr.app file.

B.2.5.5 Modify the Oracle9i httpd.conf

You need to modify the httpd.conf file to include an alias that points to the file system path where you copied the images directory. You may also need to modify the httpd.conf file to add two new MIME types to support SQL Workshop.

See Also:
"Copy the Images Directory"

To modify httpd.conf file:

1. Use a text editor and open the httpd.conf file:

- On Windows:

ORACLE_HTTPSERVER_HOME\Apache\Apache\conf\httpd.conf

- On UNIX and Linux:

ORACLE_HTTPSERVER_HOME/Apache/Apache/conf/httpd.conf

2. Add an alias entry that points to the file system path where you copied the images directory.

- Windows example:

Alias /i/ "C:\oracle\ora92\Apache\Apache\images/"

- UNIX and Linux example:

Alias /i/ "/home/oracle/OraHome1/Apache/Apache/images/"

Note that the previous examples assume you specified the image directory alias as /i/ when you ran the apexins.sql script.

Note you must include the forward slash (/) at the end of the path.

3. Next, add the following two lines to support SQL Workshop if they do not currently exist:

AddType text/xml             xbl
AddType text/x-component     htc

If you are upgrading from Oracle HTML DB 2.0 or later, these MIME types should already exist.

4. Save and exit the httpd.conf file.

5. Stop and restart Oracle HTTP Server.

- On Windows, Stop and restart Oracle HTTP Server:

- Stop Oracle HTTP Server - From the Start menu, select Programs, Oracle - OraHome, Oracle HTTP Server, and Stop HTTP Server.

- Restart Oracle HTTP Server - From the Start menu, select Programs, Oracle - OraHome, Oracle HTTP Server, and Start HTTP Server.

- On UNIX and Linux, execute the following commands:

ORACLE_HTTPSERVER_HOME/Apache/Apache/bin/apachectl stop
ORACLE_HTTPSERVER_HOME/Apache/Apache/bin/apachectl start

Note that if the Oracle HTTP Server is listening on a port less than 1024, then these commands must be executed as a privileged user (such as root).

See Also:
Oracle HTTP Server Administrator's Guide

B.2.6 About Enabling Network Services in Oracle Database 11g

By default, the ability to interact with network services is disabled in Oracle Database 11g release 1 (11.1). Therefore, if you are running Oracle Application Express with Oracle Database 11g release 1 (11.1), you need to use the new DBMS_NETWORK_ACL_ADMIN package to grant connect privileges to any host for the FLOWS_030100 database user. Failing to grant these privileges results in issues with:

- Sending outbound mail in Oracle Application Express.
Users can call methods from the APEX_MAIL package, but issues arise when sending outbound email.

- Using Web services in Oracle Application Express.

- PDF/report printing.

- Searching for content in online Help (that is, using the Find link).

Topics in this section include:

- Granting Connect Privileges

- Troubleshooting an Invalid ACL Error

Tip:
To run the examples described in this section, the compatible initialization parameter of the database must be set to at least 11.1.0.0.0. By default an 11g database will already have the parameter set properly, but a database upgraded to 11g from a prior version may not. See "Creating and Configuring an Oracle Database" in Oracle Database Administrator's Guide for information about changing database initialization parameters.

B.2.6.1 Granting Connect Privileges

The following example demonstrates how to grant connect privileges to any host for the FLOWS_030100 database user.

DECLARE
ACL_PATH  VARCHAR2(4000);
ACL_ID    RAW(16);
BEGIN
-- Look for the ACL currently assigned to '*' and give FLOWS_030100
-- the "connect" privilege if FLOWS_030100 does not have the privilege yet.

SELECT ACL INTO ACL_PATH FROM DBA_NETWORK_ACLS
WHERE HOST = '*' AND LOWER_PORT IS NULL AND UPPER_PORT IS NULL;

-- Before checking the privilege, make sure that the ACL is valid
-- (for example, does not contain stale references to dropped users).
-- If it does, the following exception will be raised:
--
-- ORA-44416: Invalid ACL: Unresolved principal 'FLOWS_030100'
-- ORA-06512: at "XDB.DBMS_XDBZ", line ...
--
SELECT SYS_OP_R2O(extractValue(P.RES, '/Resource/XMLRef')) INTO ACL_ID
FROM XDB.XDB$ACL A, PATH_VIEW P
WHERE extractValue(P.RES, '/Resource/XMLRef') = REF(A) AND
EQUALS_PATH(P.RES, ACL_PATH) = 1;

DBMS_XDBZ.ValidateACL(ACL_ID);
IF DBMS_NETWORK_ACL_ADMIN.CHECK_PRIVILEGE(ACL_PATH, 'FLOWS_030100',
'connect') IS NULL THEN
DBMS_NETWORK_ACL_ADMIN.ADD_PRIVILEGE(ACL_PATH,
'FLOWS_030100', TRUE, 'connect');
END IF;

EXCEPTION
-- When no ACL has been assigned to '*'.
WHEN NO_DATA_FOUND THEN
DBMS_NETWORK_ACL_ADMIN.CREATE_ACL('power_users.xml',
'ACL that lets power users to connect to everywhere',
'FLOWS_030100', TRUE, 'connect');
DBMS_NETWORK_ACL_ADMIN.ASSIGN_ACL('power_users.xml','*');
END;
/
COMMIT;

The following example demonstrates how to provide less privileged access to local network resources. This example would enable indexing the Oracle Application Express Online Help and could possibly enable email and PDF printing if those servers were also on the local host.

DECLARE
ACL_PATH  VARCHAR2(4000);
ACL_ID    RAW(16);
BEGIN
-- Look for the ACL currently assigned to 'localhost' and give FLOWS_030100
-- the "connect" privilege if FLOWS_030100 does not have the privilege yet.
SELECT ACL INTO ACL_PATH FROM DBA_NETWORK_ACLS
WHERE HOST = 'localhost' AND LOWER_PORT IS NULL AND UPPER_PORT IS NULL;

-- Before checking the privilege, make sure that the ACL is valid
-- (for example, does not contain stale references to dropped users).
-- If it does, the following exception will be raised:
--
-- ORA-44416: Invalid ACL: Unresolved principal 'FLOWS_030100'
-- ORA-06512: at "XDB.DBMS_XDBZ", line ...
--

SELECT SYS_OP_R2O(extractValue(P.RES, '/Resource/XMLRef')) INTO ACL_ID
FROM XDB.XDB$ACL A, PATH_VIEW P
WHERE extractValue(P.RES, '/Resource/XMLRef') = REF(A) AND
EQUALS_PATH(P.RES, ACL_PATH) = 1;

DBMS_XDBZ.ValidateACL(ACL_ID);
IF DBMS_NETWORK_ACL_ADMIN.CHECK_PRIVILEGE(ACL_PATH, 'FLOWS_030100',
'connect') IS NULL THEN
DBMS_NETWORK_ACL_ADMIN.ADD_PRIVILEGE(ACL_PATH,
'FLOWS_030100', TRUE, 'connect');
END IF;

EXCEPTION
-- When no ACL has been assigned to 'localhost'.
WHEN NO_DATA_FOUND THEN
DBMS_NETWORK_ACL_ADMIN.CREATE_ACL('local-access-users.xml',
'ACL that lets power users to connect to everywhere',
'FLOWS_030100', TRUE, 'connect');
DBMS_NETWORK_ACL_ADMIN.ASSIGN_ACL('local-access-users.xml','localhost');
END;
/
COMMIT;

B.2.6.2 Troubleshooting an Invalid ACL Error

If you receive an ORA-44416: Invalid ACL error after running the previous script, use the following query to identify the invalid ACL:

REM Show the dangling references to dropped users in the ACL that is assigned
REM to '*'.

SELECT ACL, PRINCIPAL
FROM DBA_NETWORK_ACLS NACL, XDS_ACE ACE
WHERE HOST = '*' AND LOWER_PORT IS NULL AND UPPER_PORT IS NULL AND
NACL.ACLID = ACE.ACLID AND
NOT EXISTS (SELECT NULL FROM ALL_USERS WHERE USERNAME = PRINCIPAL);

Next, run the following code to fix the ACL:

DECLARE
ACL_ID   RAW(16);
CNT      NUMBER;
BEGIN
-- Look for the object ID of the ACL currently assigned to '*'
SELECT ACLID INTO ACL_ID FROM DBA_NETWORK_ACLS
WHERE HOST = '*' AND LOWER_PORT IS NULL AND UPPER_PORT IS NULL;

-- If just some users referenced in the ACL are invalid, remove just those
-- users in the ACL. Otherwise, drop the ACL completely.
SELECT COUNT(PRINCIPAL) INTO CNT FROM XDS_ACE
WHERE ACLID = ACL_ID AND
EXISTS (SELECT NULL FROM ALL_USERS WHERE USERNAME = PRINCIPAL);

IF (CNT > 0) THEN

FOR R IN (SELECT PRINCIPAL FROM XDS_ACE
WHERE ACLID = ACL_ID AND
NOT EXISTS (SELECT NULL FROM ALL_USERS
WHERE USERNAME = PRINCIPAL)) LOOP
UPDATE XDB.XDB$ACL
SET OBJECT_VALUE =
DELETEXML(OBJECT_VALUE,
'/ACL/ACE[PRINCIPAL="'||R.PRINCIPAL||'"]')
WHERE OBJECT_ID = ACL_ID;
END LOOP;

ELSE
DELETE FROM XDB.XDB$ACL WHERE OBJECT_ID = ACL_ID;
END IF;

END;
/

REM commit the changes.

COMMIT;

Once the ACL has been fixed, you need to run the first script in this section to apply the ACL to the FLOWS_030100 user. See "Granting Connect Privileges".

B.2.7 Security Considerations

Oracle highly recommends you configure and use a Secure Sockets Layer (SSL) to ensure that passwords and other sensitive data are not transmitted in clear text in HTTP requests. Without the use of SSL, passwords could potentially be exposed, compromising security.

SSL is an industry standard protocol that uses RSA public key cryptography in conjunction with symmetric key cryptography to provide authentication, encryption, and data integrity.

B.2.8 About Running Oracle Application Express in Other Languages

The Oracle Application Express interface is translated into German, Spanish, French, Italian, Japanese, Korean, Brazilian Portuguese, Simplified Chinese, and Traditional Chinese. A single instance of Oracle Application Express can be installed with one or more of these translated versions. At runtime, each user's Web browser language settings determine the specific language version.

The translated version of Oracle Application Express should be loaded into a database that has a character set that supports the specific language. If you attempt to install a translated version of Oracle Application Express into a database that does not support the character encoding of the language, the installation may fail or the translated Oracle Application Express instance may appear corrupt when run. The database character set AL32UTF8 supports all the translated versions of Oracle Application Express.

You can manually install translated versions of Oracle Application Express using SQL*Plus. The installation files are encoded in AL32UTF8.

Note:
Regardless of the target database character set, to install a translated version of Oracle Application Express, you must set the character set value of the NLS_LANG environment variable to AL32UTF8 prior to starting SQL*Plus.

The following examples illustrate valid NLS_LANG settings for loading Oracle Application Express translations:

American_America.AL32UTF8
Japanese_Japan.AL32UTF8

B.2.8.1 Installing a Translated Version of Oracle Application Express

Whether you are installing for the first time or upgrading from a previous release, you must run the load_lang.sql script to run a translated version of Oracle Application Express.

The installation scripts are located in subdirectories identified by a language code in the unzipped distribution apex/builder. For example, the German version is located in apex/builder/de and the Japanese version is located in apex/builder/ja. Within each of directory, there is a language loading script identified by the language code (for example, load_de.sql or load_ja.sql).

To install a translated version of Oracle Application Express:

1. Set the NLS_LANG environment variable, making sure that the character set is AL32UTF8. For example:

- Bourne or Korn shell:

NLS_LANG=American_America.AL32UTF8
export NLS_LANG

- C shell:

setenv NLS_LANG American_America.AL32UTF8

- For Windows based systems:

set NLS_LANG=American_America.AL32UTF8

2. Start SQL*Plus and connect to the database where Oracle Application Express is installed as SYS specifying the SYSDBA role. For example:

- On Windows:

SYSTEM_DRIVE:\ sqlplus /nolog
SQL> CONNECT SYS as SYSDBA
Enter password: SYS_password

- On UNIX and Linux:

$ sqlplus /nolog
SQL> CONNECT SYS as SYSDBA
Enter password: SYS_password

3. Execute the following statement:

ALTER SESSION SET CURRENT_SCHEMA = FLOWS_030100;

4. Execute the appropriate language specific script. For example:

@load_lang.sql

Where lang is the specific language (for example, load_de.sql for German or load_ja.sql for Japanese).

B.2.9 About Managing JOB_QUEUE_PROCESSES

JOB_QUEUE_PROCESSES determine the maximum number of concurrently running jobs. In Oracle Application Express release 3.0, transactional support and SQL scripts require jobs. If JOB_QUEUE_PROCESSES is not enabled and working properly, you cannot successfully execute a script.

Topics in this section include:

- Viewing the Number of JOB_QUEUE_PROCESSES

- Changing the Number of JOB_QUEUE_PROCESSES

B.2.9.1 Viewing the Number of JOB_QUEUE_PROCESSES

There are currently three ways to view the number of JOB_QUEUE_PROCESSES:

- In the installation log file

- On the About Application Express page in Oracle Application Express

- From SQL*Plus

B.2.9.1.1 Viewing JOB_QUEUE_PROCESSES in the Installation Log File

After installing or upgrading Oracle Application Express to release 3.0, you can view the number of JOB_QUEUE_PROCESSES in the installation log files. See "Reviewing a Log of an Installation Session".

B.2.9.1.2 Viewing JOB_QUEUE_PROCESSES in Oracle Application Express

You can also view the number of JOB_QUEUE_PROCESSES on the About Application Express page.

To view the About Application Express page:

1. Log in to Oracle Application Express. See "Log In to Oracle Application Express".

2. On the Administration list, click About Application Express.
The current number JOB_QUEUE_PROCESSES displays at the bottom of the page.

B.2.9.1.3 Viewing JOB_QUEUE_PROCESSES from SQL*Plus

You can also view the number of JOB_QUEUE_PROCESSES from SQL*Plus by running the following SQL statement:

SELECT VALUE FROM v$parameter WHERE NAME = 'job_queue_processes'

B.2.9.2 Changing the Number of JOB_QUEUE_PROCESSES

You can change the number of JOB_QUEUE_PROCESSES by running a SQL statement in SQL*Plus:

To update the number of JOB_QUEUE_PROCESSES:

1. Start SQL*Plus and connect to the database where Oracle Application Express is installed as SYS specifying the SYSDBA role:

- On Windows:

SYSTEM_DRIVE:\ sqlplus /nolog
SQL> CONNECT SYS as SYSDBA
Enter password: SYS_password

- On UNIX and Linux:

$ sqlplus /nolog
SQL> CONNECT SYS as SYSDBA
Enter password: SYS_password

2. In SQL*Plus run the following SQL statement:

ALTER SYSTEM SET JOB_QUEUE_PROCESSES = <number>

For example, running the statement ALTER SYSTEM SET JOB_QUEUE_PROCESSES = 20 sets JOB_QUEUE_PROCESSES to 20.

B.2.10 About Obfuscating PlsqlDatabasePassword Parameter

The PlsqlDatabasePassword parameter specifies the password for logging in to the database. You can use the dadTool.pl utility to obfuscate passwords in the dads.conf file.

You can find the dadTool.pl utility in the following directory:

- For UNIX and Linux based systems:

ORACLE_BASE/ORACLE_HTTPSERVER_HOME/Apache/modplsql/conf

- For Windows based systems:

ORACLE_BASE\ORACLE_HTTPSERVER_HOME\Apache\modplsql\conf

B.2.10.1 Obfuscating Passwords

To obfuscate passwords, run dadTool.pl by following the instructions in the dadTool.README file.

B.2.11 Log In to Oracle Application Express

You access the Oracle Application Express home page in a Web browser. To view or develop Oracle Application Express applications, the Web browser must support JavaScript and the HTML 4.0 and CSS 1.0 standards. See "Browser Requirement".

Topics in this section include:

- About Application Express User Roles

- About Setting Up Your Local Environment

B.2.11.1 About Application Express User Roles

In the Oracle Application Express development environment, users log in to a shared work area called a workspace. Users are divided into four primary roles:

- Oracle Application Express administrators are superusers that manage an entire hosted instance using the Oracle Application Express Administration Services application.

- Workspace administrators are users who perform administrator tasks specific to a workspace such as managing user accounts, monitoring workspace activity, and viewing log files.

- Developers are users who create and edit applications. Developers can have their own workspace or share a workspace.

- End users have no development privileges. You define end users so that they can access applications that do not use an external authentication scheme.

B.2.11.2 About Setting Up Your Local Environment

How you set up Oracle Application Express depends upon your user role. If you are a developer accessing a hosted development environment, an administrator must grant you access to a workspace. If you are an Oracle Application Express administrator, you must perform the following steps:

1. Log in to Oracle Application Express Administration Services. Oracle Application Express Administration Services is a separate application for managing an entire Oracle Application Express instance. You log in using the ADMIN account and password created or reset during the installation process.

2. Specify a provisioning mode. In Oracle Application Express Administration Services, you need to determine how the process of creating (or provisioning) a workspace will work in your development environment.

3. Create a Workspace. A workspace is a virtual private database allowing multiple users to work within the same Oracle Application Express installation while keeping their objects, data and applications private. Each workspace has a unique ID and name. An Oracle Application Express administrator can create a workspace manually or have users submit requests.

4. Log in to a Workspace. Once you create a workspace in Oracle Application Express Administration Services, return to the Oracle Application Express Login page and log in to that workspace.

To learn more about setting up your environment, see Oracle Database 2 Day + Oracle Application Express Developer's Guide or "Quick Start" in Oracle Application Express Application Builder User's Guide

B.3 Install the Database and Configure Oracle HTTP Server

This section describes how to configure Oracle HTTP Server with mod_plsql in a new installation.

Topics in this section include:

- Install the Oracle Database and Complete Pre-installation Tasks

- Configure Oracle HTTP Server Distributed with Oracle Database Release 9.0.3

- About Enabling Network Services in Oracle Database 11g

- Security Considerations

- About Running Oracle Application Express in Other Languages

- About Managing JOB_QUEUE_PROCESSES

- About Obfuscating PlsqlDatabasePassword Parameter

- Log In to Oracle Application Express

Note that instructions do not apply if you are running Oracle HTTP Server distributed with Oracle9i Release 2. To learn more, see "Configuring Oracle HTTP Server Distributed with Oracle9i Release 2".

Note:
Within the context of this section, the Oracle home directory (ORACLE_HTTPSERVER_HOME) is the location where Oracle HTTP Server is installed.

B.3.1 Install the Oracle Database and Complete Pre-installation Tasks

Oracle Application Express requires an Oracle database that is release 9.2.0.3 or later. To learn more, see the Oracle Database Installation Guide for your operating environment and "Recommended Pre-installation Tasks".

B.3.2 Configure Oracle HTTP Server Distributed with Oracle Database Release 9.0.3

Perform the following post-installation steps if:

- This is a new installation of Oracle Application Express (that is, you are not upgrading from a previous release)

- You are running Oracle HTTP Server distributed with Oracle Database Release 9.0.3.

- Oracle HTTP Server is installed in an Oracle home.

Topics in this section include:

- Change the Password for the ADMIN Account

- Unlock the APEX_PUBLIC_USER Database User

- Change the Password for the APEX_PUBLIC_USER Database User

- Modifying the wdbsvr.app File

- Modify the Oracle9i httpd.conf

- Stop and Restart Oracle HTTP Server

- Copy the Images Directory

Note:
Within the context of this section, the Oracle home directory (ORACLE_HTTPSERVER_HOME) is the location where Oracle HTTP Server is installed.

B.3.2.1 Change the Password for the ADMIN Account

First, change the password for the Oracle Application Express ADMIN account.

To change the password for the ADMIN account:

1. Change your working directory to ORACLE_BASE\ORACLE_HOME\apex or whatever convention used to indicate the Oracle home.

2. Start SQL*Plus and connect to the database where Oracle Application Express is installed as SYS. For example:

- On Windows:

SYSTEM_DRIVE:\ sqlplus /nolog
SQL> CONNECT SYS as SYSDBA
Enter password: SYS_password

- On UNIX and Linux:

$ sqlplus /nolog
SQL> CONNECT SYS as SYSDBA
Enter password: SYS_password

3. Run apxxepwd.sql. For example:

@apxxepwd.sql

When prompted enter a password for the ADMIN account.

4. Enter the following command followed by the new password.

@apxxepwd.sql password

For example to change the password to apex, you would enter:

@apxxepwd.sql apex

B.3.2.2 Unlock the APEX_PUBLIC_USER Database User

When configuring Oracle HTTP Server for Oracle Application Express in a new installation, the database user APEX_PUBLIC_USER must be an unlocked account. To unlock the account for database user APEX_PUBLIC_USER, execute the following steps:

1. Start SQL*Plus and connect to the database where Oracle Application Express is installed as SYS. For example:

- On Windows:

SYSTEM_DRIVE:\ sqlplus /nolog
SQL> CONNECT SYS as SYSDBA
Enter password: SYS_password

- On UNIX and Linux:

$ sqlplus /nolog
SQL> CONNECT SYS as SYSDBA
Enter password: SYS_password

2. Run the following statement:

ALTER USER APEX_PUBLIC_USER ACCOUNT UNLOCK

B.3.2.3 Change the Password for the APEX_PUBLIC_USER Database User

In order to specify the password in the DAD file, you have to change the password for the database user APEX_PUBLIC_USER. Please use the following steps to change the password for the APEX_PUBLIC_USER database user:

1. Start SQL*Plus and connect to the database where Oracle Application Express is installed as SYS. For example:

- On Windows:

SYSTEM_DRIVE:\ sqlplus /nolog
SQL> CONNECT SYS as SYSDBA
Enter password: SYS_password

- On UNIX and Linux:

$ sqlplus /nolog
SQL> CONNECT SYS as SYSDBA
Enter password: SYS_password

2. Run the following statement:

SQL> PASSWORD APEX_PUBLIC_USER
Changing password for APEX_PUBLIC_USER
New password: password
Retype new password: password

B.3.2.4 Modifying the wdbsvr.app File

To create the DAD, you modify the wdbsvr.app file and add an entry for Oracle Application Express.

To modify the wdbsvr.app file:

1. Use a text editor and open the wdbsvr.app file:

- On Windows, see:

ORACLE_HTTPSERVER_HOME\Apache\modplsql\cfg\wdbsvr.app

- On UNIX and Linux, see:

ORACLE_HTTPSERVER_HOME/Apache/modplsql/cfg/wdbsvr.app

2. Add an entry for Oracle Application Express using the following syntax. Only change the settings indicated in italics.

[DAD_apex]
connect_string = localhost:1521:orcl
password = apex
username = apex_public_user
default_page = apex
document_table = wwv_flow_file_objects$
document_path = docs
document_proc = wwv_flow_file_mgr.process_download
reuse = Yes
enablesso = No
stateful = STATELESS_RESET
nls_lang = American_America.AL32UTF8

Where:

- connect_string refers to the host ID, port number, and Oracle9i database where Oracle Application Express was installed. Use the format host:port:sid.
If the Oracle9i version of Oracle HTTP Server you want to use is installed in the same Oracle home as the database you specified for use with Oracle Application Express, leave this parameter blank.

- password is the password you changed for the APEX_PUBLIC_USER. See "Change the Password for the APEX_PUBLIC_USER Database User".

- nls_lang determines the language setting of the DAD. The character set portion of the nls_lang value must always be set to AL32UTF8, regardless of whether or not the database character set is AL32UTF8.
If either the territory portion or the language portion of the NLS settings contains a space, you must wrap the value in double quotes as shown in the following example:

nls_lang = "ENGLISH_UNITED KINGDOM.AL32UTF8"

You can find information about your database's NLS settings by querying the view NLS_DATABASE_PARAMETERS as shown in the following example:

SELECT parameter,value
FROM nls_database_parameters
WHERE PARAMETER IN ('NLS_CHARACTERSET','NLS_LANGUAGE','NLS_TERRITORY');

3. Leave the remaining settings, including the user name setting, as they appear in the previous example.

4. Save and exit the wdbsvr.app file.

B.3.2.5 Modify the Oracle9i httpd.conf

You need to modify the httpd.conf file to include an alias that points to the file system path where you copied the images directory. You may also need to modify the httpd.conf file to add two new MIME types to support SQL Workshop.

See Also:
"Copy the Images Directory"

To modify httpd.conf file:

1. Use a text editor and open the httpd.conf file:

- On Windows:

ORACLE_HTTPSERVER_HOME\Apache\Apache\conf\httpd.conf

- On UNIX and Linux:

ORACLE_HTTPSERVER_HOME/Apache/Apache/conf/httpd.conf

2. Add an alias entry that points to the file system path where you copied the images directory.

- Windows example:

Alias /i/ "C:\oracle\ora92\Apache\Apache\images/"

- UNIX and Linux example:

Alias /i/ "/home/oracle/OraHome1/Apache/Apache/images/"

Note that the previous examples assume you specified the image directory alias as /i/ when you ran the apexins.sql script.

Note you must include the forward slash (/) at the end of the path.

3. Next, add the following two lines to support SQL Workshop if they do not currently exist:

AddType text/xml             xbl
AddType text/x-component     htc

If you are upgrading from Oracle HTML DB 2.0 or later, these MIME types should already exist.

4. Save and exit the httpd.conf file.

See Also:
Oracle HTTP Server Administrator's Guide

B.3.2.6 Stop and Restart Oracle HTTP Server

To stop and restart Oracle HTTP Server:

- On Windows, Stop and restart Oracle HTTP Server:

- Stop Oracle HTTP Server - From the Start menu, select Programs, Oracle - OraHome, Oracle HTTP Server, and Stop HTTP Server.

- Restart Oracle HTTP Server - From the Start menu, select Programs, Oracle - OraHome, Oracle HTTP Server, and Start HTTP Server.

- On UNIX and Linux, execute the following commands:

ORACLE_HTTPSERVER_HOME/Apache/Apache/bin/apachectl stop
ORACLE_HTTPSERVER_HOME/Apache/Apache/bin/apachectl start

Note that if the Oracle HTTP Server is listening on a port less than 1024, then these commands must be executed as a privileged user (such as root).

See Also:
Oracle HTTP Server Administrator's Guide

B.3.2.7 Copy the Images Directory

Whether you are loading a new installation or upgrading from a previous release, you must copy the images directory from the top level of the ORACLE_BASE\ORACLE_HOME\apex directory to the location on the file system containing the Oracle home for Oracle HTTP Server.

Note:
This section is relevant only if your plan to run Oracle Application Express with Oracle HTTP Server with mod_plsql.

Topics in this section include:

- Copying the Images Directory After an Upgrade

- Copying the Images Directory in a New Installation

B.3.2.7.1 Copying the Images Directory After an Upgrade

During an upgrade, you must overwrite your existing images directory. Before you begin the upgrade, to ensure that you can revert to the previous version, Oracle recommends that you create a copy of your existing images directory for Oracle Application Express, indicating the release number of the images (for example, images_2_0).

To locate the images directory on the file system, review the httpd.conf file for the text alias /i/:

When you locate the images directory path, Oracle recommends that you copy the existing images directory to a backup location. Doing this allows you to revert to the previous release, if that becomes necessary.

After you copy the existing images directory, use the following command syntax to copy the apex\images directory from the Oracle database home to the existing images directory path, overwriting the existing images:

DRIVE_LETTER:\> xcopy /E /I ORACLE_HOME\apex\images ORACLE_HTTPSERVER_HOME\Apache\images

In the preceding syntax example:

- ORACLE_HOME is the Oracle Database Oracle home

- ORACLE_HTTPSERVER_HOME is the existing Oracle HTTP Server Oracle home

B.3.2.7.2 Copying the Images Directory in a New Installation

After installation, copy the directory apex/images.

You can copy the images directory using Windows Explorer, or running a command from a command prompt similar to the following:

DRIVE_LETTER:\> xcopy /E /I ORACLE_HOME\apex\images ORACLE_HTTPSERVER_HOME\Apache\images

In the preceding syntax example:

- ORACLE_HOME is the Oracle Database Oracle home

- ORACLE_HTTPSERVER_HOME is the existing Oracle HTTP Server Oracle home

B.3.3 About Enabling Network Services in Oracle Database 11g

By default, the ability to interact with network services is disabled in Oracle Database 11g release 1 (11.1). Therefore, if you are running Oracle Application Express with Oracle Database 11g release 1 (11.1), you need to use the new DBMS_NETWORK_ACL_ADMIN package to grant connect privileges to any host for the FLOWS_030100 database user. Failing to grant these privileges results in issues with:

- Sending outbound mail in Oracle Application Express.
Users can call methods from the APEX_MAIL package, but issues arise when sending outbound email.

- Using Web services in Oracle Application Express.

- PDF/report printing.

- Searching for content in online Help (that is, using the Find link).

Topics in this section include:

- Granting Connect Privileges

- Troubleshooting an Invalid ACL Error

Tip:
To run the examples described in this section, the compatible initialization parameter of the database must be set to at least 11.1.0.0.0. By default an 11g database will already have the parameter set properly, but a database upgraded to 11g from a prior version may not. See "Creating and Configuring an Oracle Database" in Oracle Database Administrator's Guide for information about changing database initialization parameters.

B.3.3.1 Granting Connect Privileges

The following example demonstrates how to grant connect privileges to any host for the FLOWS_030100 database user.

DECLARE
ACL_PATH  VARCHAR2(4000);
ACL_ID    RAW(16);
BEGIN
-- Look for the ACL currently assigned to '*' and give FLOWS_030100
-- the "connect" privilege if FLOWS_030100 does not have the privilege yet.

SELECT ACL INTO ACL_PATH FROM DBA_NETWORK_ACLS
WHERE HOST = '*' AND LOWER_PORT IS NULL AND UPPER_PORT IS NULL;

-- Before checking the privilege, make sure that the ACL is valid
-- (for example, does not contain stale references to dropped users).
-- If it does, the following exception will be raised:
--
-- ORA-44416: Invalid ACL: Unresolved principal 'FLOWS_030100'
-- ORA-06512: at "XDB.DBMS_XDBZ", line ...
--
SELECT SYS_OP_R2O(extractValue(P.RES, '/Resource/XMLRef')) INTO ACL_ID
FROM XDB.XDB$ACL A, PATH_VIEW P
WHERE extractValue(P.RES, '/Resource/XMLRef') = REF(A) AND
EQUALS_PATH(P.RES, ACL_PATH) = 1;

DBMS_XDBZ.ValidateACL(ACL_ID);
IF DBMS_NETWORK_ACL_ADMIN.CHECK_PRIVILEGE(ACL_PATH, 'FLOWS_030100',
'connect') IS NULL THEN
DBMS_NETWORK_ACL_ADMIN.ADD_PRIVILEGE(ACL_PATH,
'FLOWS_030100', TRUE, 'connect');
END IF;

EXCEPTION
-- When no ACL has been assigned to '*'.
WHEN NO_DATA_FOUND THEN
DBMS_NETWORK_ACL_ADMIN.CREATE_ACL('power_users.xml',
'ACL that lets power users to connect to everywhere',
'FLOWS_030100', TRUE, 'connect');
DBMS_NETWORK_ACL_ADMIN.ASSIGN_ACL('power_users.xml','*');
END;
/
COMMIT;

The following example demonstrates how to provide less privileged access to local network resources. This example would enable indexing the Oracle Application Express Online Help and could possibly enable email and PDF printing if those servers were also on the local host.

DECLARE
ACL_PATH  VARCHAR2(4000);
ACL_ID    RAW(16);
BEGIN
-- Look for the ACL currently assigned to 'localhost' and give FLOWS_030100
-- the "connect" privilege if FLOWS_030100 does not have the privilege yet.
SELECT ACL INTO ACL_PATH FROM DBA_NETWORK_ACLS
WHERE HOST = 'localhost' AND LOWER_PORT IS NULL AND UPPER_PORT IS NULL;

-- Before checking the privilege, make sure that the ACL is valid
-- (for example, does not contain stale references to dropped users).
-- If it does, the following exception will be raised:
--
-- ORA-44416: Invalid ACL: Unresolved principal 'FLOWS_030100'
-- ORA-06512: at "XDB.DBMS_XDBZ", line ...
--

SELECT SYS_OP_R2O(extractValue(P.RES, '/Resource/XMLRef')) INTO ACL_ID
FROM XDB.XDB$ACL A, PATH_VIEW P
WHERE extractValue(P.RES, '/Resource/XMLRef') = REF(A) AND
EQUALS_PATH(P.RES, ACL_PATH) = 1;

DBMS_XDBZ.ValidateACL(ACL_ID);
IF DBMS_NETWORK_ACL_ADMIN.CHECK_PRIVILEGE(ACL_PATH, 'FLOWS_030100',
'connect') IS NULL THEN
DBMS_NETWORK_ACL_ADMIN.ADD_PRIVILEGE(ACL_PATH,
'FLOWS_030100', TRUE, 'connect');
END IF;

EXCEPTION
-- When no ACL has been assigned to 'localhost'.
WHEN NO_DATA_FOUND THEN
DBMS_NETWORK_ACL_ADMIN.CREATE_ACL('local-access-users.xml',
'ACL that lets power users to connect to everywhere',
'FLOWS_030100', TRUE, 'connect');
DBMS_NETWORK_ACL_ADMIN.ASSIGN_ACL('local-access-users.xml','localhost');
END;
/
COMMIT;

B.3.3.2 Troubleshooting an Invalid ACL Error

If you receive an ORA-44416: Invalid ACL error after running the previous script, use the following query to identify the invalid ACL:

REM Show the dangling references to dropped users in the ACL that is assigned
REM to '*'.

SELECT ACL, PRINCIPAL
FROM DBA_NETWORK_ACLS NACL, XDS_ACE ACE
WHERE HOST = '*' AND LOWER_PORT IS NULL AND UPPER_PORT IS NULL AND
NACL.ACLID = ACE.ACLID AND
NOT EXISTS (SELECT NULL FROM ALL_USERS WHERE USERNAME = PRINCIPAL);

Next, run the following code to fix the ACL:

DECLARE
ACL_ID   RAW(16);
CNT      NUMBER;
BEGIN
-- Look for the object ID of the ACL currently assigned to '*'
SELECT ACLID INTO ACL_ID FROM DBA_NETWORK_ACLS
WHERE HOST = '*' AND LOWER_PORT IS NULL AND UPPER_PORT IS NULL;

-- If just some users referenced in the ACL are invalid, remove just those
-- users in the ACL. Otherwise, drop the ACL completely.
SELECT COUNT(PRINCIPAL) INTO CNT FROM XDS_ACE
WHERE ACLID = ACL_ID AND
EXISTS (SELECT NULL FROM ALL_USERS WHERE USERNAME = PRINCIPAL);

IF (CNT > 0) THEN

FOR R IN (SELECT PRINCIPAL FROM XDS_ACE
WHERE ACLID = ACL_ID AND
NOT EXISTS (SELECT NULL FROM ALL_USERS
WHERE USERNAME = PRINCIPAL)) LOOP
UPDATE XDB.XDB$ACL
SET OBJECT_VALUE =
DELETEXML(OBJECT_VALUE,
'/ACL/ACE[PRINCIPAL="'||R.PRINCIPAL||'"]')
WHERE OBJECT_ID = ACL_ID;
END LOOP;

ELSE
DELETE FROM XDB.XDB$ACL WHERE OBJECT_ID = ACL_ID;
END IF;

END;
/

REM commit the changes.

COMMIT;

Once the ACL has been fixed, you need to run the first script in this section to apply the ACL to the FLOWS_030100 user. See "Granting Connect Privileges".

B.3.4 Security Considerations

Oracle highly recommends you configure and use a Secure Sockets Layer (SSL) to ensure that passwords and other sensitive data are not transmitted in clear text in HTTP requests. Without the use of SSL, passwords could potentially be exposed, compromising security.

SSL is an industry standard protocol that uses RSA public key cryptography in conjunction with symmetric key cryptography to provide authentication, encryption, and data integrity.

B.3.5 About Running Oracle Application Express in Other Languages

The Oracle Application Express interface is translated into German, Spanish, French, Italian, Japanese, Korean, Brazilian Portuguese, Simplified Chinese, and Traditional Chinese. A single instance of Oracle Application Express can be installed with one or more of these translated versions. At runtime, each user's Web browser language settings determine the specific language version.

The translated version of Oracle Application Express should be loaded into a database that has a character set that supports the specific language. If you attempt to install a translated version of Oracle Application Express into a database that does not support the character encoding of the language, the installation may fail or the translated Oracle Application Express instance may appear corrupt when run. The database character set AL32UTF8 supports all the translated versions of Oracle Application Express.

You can manually install translated versions of Oracle Application Express using SQL*Plus. The installation files are encoded in AL32UTF8.

Note:
Regardless of the target database character set, to install a translated version of Oracle Application Express, you must set the character set value of the NLS_LANG environment variable to AL32UTF8 prior to starting SQL*Plus.

The following examples illustrate valid NLS_LANG settings for loading Oracle Application Express translations:

American_America.AL32UTF8
Japanese_Japan.AL32UTF8

B.3.5.1 Installing a Translated Version of Oracle Application Express

Whether you are installing for the first time or upgrading from a previous release, you must run the load_lang.sql script to run a translated version of Oracle Application Express.

The installation scripts are located in subdirectories identified by a language code in the unzipped distribution apex/builder. For example, the German version is located in apex/builder/de and the Japanese version is located in apex/builder/ja. Within each of directory, there is a language loading script identified by the language code (for example, load_de.sql or load_ja.sql).

To install a translated version of Oracle Application Express:

1. Set the NLS_LANG environment variable, making sure that the character set is AL32UTF8. For example:

- Bourne or Korn shell:

NLS_LANG=American_America.AL32UTF8
export NLS_LANG

- C shell:

setenv NLS_LANG American_America.AL32UTF8

- For Windows based systems:

set NLS_LANG=American_America.AL32UTF8

2. Start SQL*Plus and connect to the database where Oracle Application Express is installed as SYS specifying the SYSDBA role. For example:

- On Windows:

SYSTEM_DRIVE:\ sqlplus /nolog
SQL> CONNECT SYS as SYSDBA
Enter password: SYS_password

- On UNIX and Linux:

$ sqlplus /nolog
SQL> CONNECT SYS as SYSDBA
Enter password: SYS_password

3. Execute the following statement:

ALTER SESSION SET CURRENT_SCHEMA = FLOWS_030100;

4. Execute the appropriate language specific script. For example:

@load_lang.sql

Where lang is the specific language (for example, load_de.sql for German or load_ja.sql for Japanese).

B.3.6 About Managing JOB_QUEUE_PROCESSES

JOB_QUEUE_PROCESSES determine the maximum number of concurrently running jobs. In Oracle Application Express release 3.0, transactional support and SQL scripts require jobs. If JOB_QUEUE_PROCESSES is not enabled and working properly, you cannot successfully execute a script.

Topics in this section include:

- Viewing the Number of JOB_QUEUE_PROCESSES

- Changing the Number of JOB_QUEUE_PROCESSES

B.3.6.1 Viewing the Number of JOB_QUEUE_PROCESSES

There are currently three ways to view the number of JOB_QUEUE_PROCESSES:

- In the installation log file

- On the About Application Express page in Oracle Application Express

- From SQL*Plus

B.3.6.1.1 Viewing JOB_QUEUE_PROCESSES in the Installation Log File

After installing or upgrading Oracle Application Express to release 3.0, you can view the number of JOB_QUEUE_PROCESSES in the installation log files. See "Reviewing a Log of an Installation Session".

B.3.6.1.2 Viewing JOB_QUEUE_PROCESSES in Oracle Application Express

You can also view the number of JOB_QUEUE_PROCESSES on the About Application Express page.

To view the About Application Express page:

1. Log in to Oracle Application Express. See "Log In to Oracle Application Express".

2. On the Administration list, click About Application Express.
The current number JOB_QUEUE_PROCESSES displays at the bottom of the page.

B.3.6.1.3 Viewing JOB_QUEUE_PROCESSES from SQL*Plus

You can also view the number of JOB_QUEUE_PROCESSES from SQL*Plus by running the following SQL statement:

SELECT VALUE FROM v$parameter WHERE NAME = 'job_queue_processes'

B.3.6.2 Changing the Number of JOB_QUEUE_PROCESSES

You can change the number of JOB_QUEUE_PROCESSES by running a SQL statement in SQL*Plus:

To update the number of JOB_QUEUE_PROCESSES:

1. Start SQL*Plus and connect to the database where Oracle Application Express is installed as SYS specifying the SYSDBA role:

- On Windows:

SYSTEM_DRIVE:\ sqlplus /nolog
SQL> CONNECT SYS as SYSDBA
Enter password: SYS_password

- On UNIX and Linux:

$ sqlplus /nolog
SQL> CONNECT SYS as SYSDBA
Enter password: SYS_password

2. In SQL*Plus run the following SQL statement:

ALTER SYSTEM SET JOB_QUEUE_PROCESSES = <number>

For example, running the statement ALTER SYSTEM SET JOB_QUEUE_PROCESSES = 20 sets JOB_QUEUE_PROCESSES to 20.

B.3.7 About Obfuscating PlsqlDatabasePassword Parameter

The PlsqlDatabasePassword parameter specifies the password for logging in to the database. You can use the dadTool.pl utility to obfuscate passwords in the dads.conf file.

You can find the dadTool.pl utility in the following directory:

- For UNIX and Linux based systems:

ORACLE_BASE/ORACLE_HTTPSERVER_HOME/Apache/modplsql/conf

- For Windows based systems:

ORACLE_BASE\ORACLE_HTTPSERVER_HOME\Apache\modplsql\conf

B.3.7.1 Obfuscating Passwords

To obfuscate passwords, run dadTool.pl by following the instructions in the dadTool.README file.

B.3.8 Log In to Oracle Application Express

You access the Oracle Application Express home page in a Web browser. To view or develop Oracle Application Express applications, the Web browser must support JavaScript and the HTML 4.0 and CSS 1.0 standards. See "Browser Requirement".

Topics in this section include:

- About Application Express User Roles

- About Setting Up Your Local Environment

B.3.8.1 About Application Express User Roles

In the Oracle Application Express development environment, users log in to a shared work area called a workspace. Users are divided into four primary roles:

- Oracle Application Express administrators are superusers that manage an entire hosted instance using the Oracle Application Express Administration Services application.

- Workspace administrators are users who perform administrator tasks specific to a workspace such as managing user accounts, monitoring workspace activity, and viewing log files.

- Developers are users who create and edit applications. Developers can have their own workspace or share a workspace.

- End users have no development privileges. You define end users so that they can access applications that do not use an external authentication scheme.

B.3.8.2 About Setting Up Your Local Environment

How you set up Oracle Application Express depends upon your user role. If you are a developer accessing a hosted development environment, an administrator must grant you access to a workspace. If you are an Oracle Application Express administrator, you must perform the following steps:

1. Log in to Oracle Application Express Administration Services. Oracle Application Express Administration Services is a separate application for managing an entire Oracle Application Express instance. You log in using the ADMIN account and password created or reset during the installation process.

2. Specify a provisioning mode. In Oracle Application Express Administration Services, you need to determine how the process of creating (or provisioning) a workspace will work in your development environment.

3. Create a Workspace. A workspace is a virtual private database allowing multiple users to work within the same Oracle Application Express installation while keeping their objects, data and applications private. Each workspace has a unique ID and name. An Oracle Application Express administrator can create a workspace manually or have users submit requests.

4. Log in to a Workspace. Once you create a workspace in Oracle Application Express Administration Services, return to the Oracle Application Express Login page and log in to that workspace.

To learn more about setting up your environment, see Oracle Database 2 Day + Oracle Application Express Developer's Guide or "Quick Start" in Oracle Application Express Application Builder User's Guide

C Third-Party License

This appendix contains the third party license for Apache.

C.1 Apache License

Apache License
Version 2.0, January 2004
http://www.apache.org/licenses/

TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
1. Definitions.

"License" shall mean the terms and conditions for use, reproduction,
and distribution as defined by Sections 1 through 9 of this document.

"Licensor" shall mean the copyright owner or entity authorized by
the copyright owner that is granting the License.

"Legal Entity" shall mean the union of the acting entity and all
other entities that control, are controlled by, or are under common
control with that entity. For the purposes of this definition,
"control" means (i) the power, direct or indirect, to cause the
direction or management of such entity, whether by contract or
otherwise, or (ii) ownership of fifty percent (50%) or more of the
outstanding shares, or (iii) beneficial ownership of such entity.

"You" (or "Your") shall mean an individual or Legal Entity
exercising permissions granted by this License.

"Source" form shall mean the preferred form for making modifications,
including but not limited to software source code, documentation
source, and configuration files.

"Object" form shall mean any form resulting from mechanical
transformation or translation of a Source form, including but
not limited to compiled object code, generated documentation,
and conversions to other media types.

"Work" shall mean the work of authorship, whether in Source or
Object form, made available under the License, as indicated by a
copyright notice that is included in or attached to the work
(an example is provided in the Appendix below).

"Derivative Works" shall mean any work, whether in Source or Object
form, that is based on (or derived from) the Work and for which the
editorial revisions, annotations, elaborations, or other modifications
represent, as a whole, an original work of authorship. For the purposes
of this License, Derivative Works shall not include works that remain
separable from, or merely link (or bind by name) to the interfaces of,
the Work and Derivative Works thereof.

"Contribution" shall mean any work of authorship, including
the original version of the Work and any modifications or additions
to that Work or Derivative Works thereof, that is intentionally
submitted to Licensor for inclusion in the Work by the copyright owner
or by an individual or Legal Entity authorized to submit on behalf of
the copyright owner. For the purposes of this definition, "submitted"
means any form of electronic, verbal, or written communication sent
to the Licensor or its representatives, including but not limited to
communication on electronic mailing lists, source code control systems,
and issue tracking systems that are managed by, or on behalf of, the
Licensor for the purpose of discussing and improving the Work, but
excluding communication that is conspicuously marked or otherwise
designated in writing by the copyright owner as "Not a Contribution."

"Contributor" shall mean Licensor and any individual or Legal Entity
on behalf of whom a Contribution has been received by Licensor and
subsequently incorporated within the Work.

2. Grant of Copyright License. Subject to the terms and conditions of
this License, each Contributor hereby grants to You a perpetual,
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
copyright license to reproduce, prepare Derivative Works of,
publicly display, publicly perform, sublicense, and distribute the
Work and such Derivative Works in Source or Object form.

3. Grant of Patent License. Subject to the terms and conditions of
this License, each Contributor hereby grants to You a perpetual,
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
(except as stated in this section) patent license to make, have made,
use, offer to sell, sell, import, and otherwise transfer the Work,
where such license applies only to those patent claims licensable
by such Contributor that are necessarily infringed by their
Contribution(s) alone or by combination of their Contribution(s)
with the Work to which such Contribution(s) was submitted. If You
institute patent litigation against any entity (including a
cross-claim or counterclaim in a lawsuit) alleging that the Work
or a Contribution incorporated within the Work constitutes direct
or contributory patent infringement, then any patent licenses
granted to You under this License for that Work shall terminate
as of the date such litigation is filed.

4. Redistribution. You may reproduce and distribute copies of the
Work or Derivative Works thereof in any medium, with or without
modifications, and in Source or Object form, provided that You
meet the following conditions:

(a) You must give any other recipients of the Work or
Derivative Works a copy of this License; and

(b) You must cause any modified files to carry prominent notices
stating that You changed the files; and

(c) You must retain, in the Source form of any Derivative Works
that You distribute, all copyright, patent, trademark, and
attribution notices from the Source form of the Work,
excluding those notices that do not pertain to any part of
the Derivative Works; and

(d) If the Work includes a "NOTICE" text file as part of its
distribution, then any Derivative Works that You distribute must
include a readable copy of the attribution notices contained
within such NOTICE file, excluding those notices that do not
pertain to any part of the Derivative Works, in at least one
of the following places: within a NOTICE text file distributed
as part of the Derivative Works; within the Source form or
documentation, if provided along with the Derivative Works; or,
within a display generated by the Derivative Works, if and
wherever such third-party notices normally appear. The contents
of the NOTICE file are for informational purposes only and
do not modify the License. You may add Your own attribution
notices within Derivative Works that You distribute, alongside
or as an addendum to the NOTICE text from the Work, provided
that such additional attribution notices cannot be construed
as modifying the License.

You may add Your own copyright statement to Your modifications and
may provide additional or different license terms and conditions
for use, reproduction, or distribution of Your modifications, or
for any such Derivative Works as a whole, provided Your use,
reproduction, and distribution of the Work otherwise complies with
the conditions stated in this License.

5. Submission of Contributions. Unless You explicitly state otherwise,
any Contribution intentionally submitted for inclusion in the Work
by You to the Licensor shall be under the terms and conditions of
this License, without any additional terms or conditions.
Notwithstanding the above, nothing herein shall supersede or modify
the terms of any separate license agreement you may have executed
with Licensor regarding such Contributions.

6. Trademarks. This License does not grant permission to use the trade
names, trademarks, service marks, or product names of the Licensor,
except as required for reasonable and customary use in describing the
origin of the Work and reproducing the content of the NOTICE file.

7. Disclaimer of Warranty. Unless required by applicable law or
agreed to in writing, Licensor provides the Work (and each
Contributor provides its Contributions) on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
implied, including, without limitation, any warranties or conditions
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
PARTICULAR PURPOSE. You are solely responsible for determining the
appropriateness of using or redistributing the Work and assume any
risks associated with Your exercise of permissions under this License.

8. Limitation of Liability. In no event and under no legal theory,
whether in tort (including negligence), contract, or otherwise,
unless required by applicable law (such as deliberate and grossly
negligent acts) or agreed to in writing, shall any Contributor be
liable to You for damages, including any direct, indirect, special,
incidental, or consequential damages of any character arising as a
result of this License or out of the use or inability to use the
Work (including but not limited to damages for loss of goodwill,
work stoppage, computer failure or malfunction, or any and all
other commercial damages or losses), even if such Contributor
has been advised of the possibility of such damages.

9. Accepting Warranty or Additional Liability. While redistributing
the Work or Derivative Works thereof, You may choose to offer,
and charge a fee for, acceptance of support, warranty, indemnity,
or other liability obligations and/or rights consistent with this
License. However, in accepting such obligations, You may act only
on Your own behalf and on Your sole responsibility, not on behalf
of any other Contributor, and only if You agree to indemnify,
defend, and hold each Contributor harmless for any liability
incurred by, or claims asserted against, such Contributor by reason
of your accepting any such warranty or additional liability.

END OF TERMS AND CONDITIONS

Index
A  B  C  D  E  F  G  H  I  J  L  N  O  P  R  S  T  U  W  X

A

ADMIN account

changing password, 3.3.3, 3.4.3, B.2.3

apex_epg_config.sql, 3.3.5.1 apexins.sql, 3.3.2, 3.4.2, B.2.2 Application Express

browser requirement, 2.2

database requirement, 2.1

disk space requirements, 2.4

getting started, 3.3.11, 3.4.11, 4.4.8, 4.5.8, B.2.11, B.3.8

HTTP server requirement, 2.3

installing, B.2.2

logging in to, 3.3.11, 3.4.11, 4.4.8, 4.5.8, B.3.8

Oracle Text requirement, 2.6

patching, 4.1

PL/SQL Web Toolkit requirement, 2.7

pre-installation tasks, 3.1, 4.2, B.1

setting up, 3.3.11.2, 3.4.11.2, 4.4.8.2, 4.5.8.2, B.2.11.2, B.3.8.2

user roles, 3.3.11.1, 3.4.11.1, 4.4.8.1, 4.5.8.1, B.2.11.1, B.3.8.1

XML DB requirement, 2.5

Application Express Administration Services, 3.3.11.2, 3.4.11.2, 4.4.8.2, 4.5.8.2, B.2.11.2, B.3.8.2 Application Express administrator, 3.3.11.1, 3.4.11.1, 4.4.8.1, 4.5.8.1, B.2.11.1, B.3.8.1 Application Express user roles

Application Express administrator, 3.3.11.1, 3.4.11.1, 4.4.8.1, 4.5.8.1, B.2.11.1, B.3.8.1

developer, 3.3.11.1, 3.4.11.1, 4.4.8.1, 4.5.8.1, B.2.11.1, B.3.8.1

end user, 3.3.11.1, 3.4.11.1, 4.4.8.1, 4.5.8.1, B.2.11.1, B.3.8.1

workspace administrator, 3.3.11.1, 3.4.11.1, 4.4.8.1, 4.5.8.1, B.2.11.1, B.3.8.1

apxchpwd.sql, 3.3.3, 3.4.3, B.2.3 apxconf.sql, 4.4.2.1 apxdevrm.sql, 3.5.2, 4.6.2 apxdvins.sql, 3.5.1, 4.6.1 apxldimg.sql, 3.3.5.2 apxrtins.sql, 3.3.2, 3.4.2, B.2.2 Automatic Storage Management (ASM)

shutting down, 3.1, 4.2, B.1

B

browser

requirement, 2.2

C

configuring

Oracle Application Server 11g, 3.4.5.4

Oracle Application Server 11g (new), 4.5.2

Oracle HTTP Server, 3.4.5, B.2.5

Oracle HTTP Server 11g, 3.4.5.4

Oracle HTTP Server 11g (new), 4.5.2

D

DAD, 3.4.5.1, A.5.1, B.2.5.1

dadTool.pl utility, 3.4.10, 4.5.7, B.2.10, B.3.7

database installation

backing up Oracle database, 4.2

configuring embedded PL/SQL gateway, 4.4.2

copying images (new installation), 4.5.2.5.2

copying images (when upgrading), 4.5.2.5.1

downloading from and configuring embedded PL/SQL gateway, 4, 4.4

installing in other languages, 4.5.5

installing other languages, 4.4.5

logging in to Application Express, 4.4.8, 4.5.8

managing JOB_QUEUE_PROCESSES, 4.4.6, 4.5.6

obfuscating passwords, 4.5.7

pre-installation tasks, 4.4.1

running apxconf.sql, 4.4.2.1

SHARED_SERVERS parameter, 4.4.7

stopping processes, 4.2

database requirement

Application Express, 2.1

developer, 3.3.11.1, 3.4.11.1, 4.4.8.1, 4.5.8.1, B.2.11.1, B.3.8.1 development environment

changing to runtime, 3.5.2, 4.6.2

disk space

requirements, 2.4

documentation

on administration and tuning, Preface

on error messages, Preface

related, Preface

E

embedded PL/SQL gateway

about, 1.4.2

location of images, 1.4.2.1

SHARED_SERVERS parameter, 3.3.10, 4.4.7

end user, 3.3.11.1, 3.4.11.1, 4.4.8.1, 4.5.8.1, B.2.11.1, B.3.8.1

F

full development environment

installing, 3.3.2, 3.4.2, B.2.2

G

getting started

Application Express, 3.3.11, 3.4.11, 4.4.8, 4.5.8, B.2.11, B.3.8

H

HTTP Server

choosing, 1.4, 3.2, 4.3

pre-installation tasks, 4.2, B.1

HTTP server

requirement, 2.3

httpd.conf

modifications if running Oracle9i, B.2.5.5, B.3.2.5

I

images

copying, 3.4.5.3, B.2.5.3

copying in new installation, 3.4.5.3.2, 4.5.2.5.2, B.2.5.3.2, B.3.2.7.2

copying when upgrading, 3.4.5.3.1, 4.5.2.5.1, B.2.5.3.1, B.3.2.7.1

installation

changing ADMIN account password, B.2.3

downloading from OTN and configuring embedded PL/SQL gateway, 1.5.1

downloading from OTN and configuring Oracle HTTP server, 1.5.2

installing from database and configuring embedded PL/SQL gateway, 1.5.3

installing from database and configuring Oracle HTTP server, 1.5.4

overview, 1.1

planning, 1.1

process, 1.5

requirements, 1.1, 2

scenarios, 1.5

steps, B.2.2

verifying validity, A.2

installation option

full development environment, 3.3.2, 3.4.2, B.2.2

runtime environment, 3.3.2, 3.4.2, B.2.2

installing

failures, A.3

other languages, 3.3.8, 3.4.8, 4.4.5, 4.5.5, B.2.8, B.3.5

installing software, B.2.2

J

JOB_QUEUE_PROCESSES, 3.3.9, 3.4.9, 4.4.6, 4.5.6, B.2.9, B.3.6

changing number of, 3.3.9.2, 3.4.9.2, 4.4.6.2, 4.5.6.2, B.2.9.2, B.3.6.2

viewing number of, 3.3.9.1, 3.4.9.1, 4.4.6.1, 4.5.6.1, B.2.9.1, B.3.6.1

L

listener

stopping, 4.2, B.1

log file, A.1

N

new installation

adding entry for Application Express, B.2.5.4, B.3.2.4

adding new MIME types, B.2.5.5, B.3.2.5

configuring Oracle Application Server 10g, 3.4.5.4, 3.4.5.4, 4.5.2, 4.5.2, B.3.2, B.3.2

copying images, 3.4.5.3.2, 4.5.2.5.2, B.2.5.3.2, B.3.2.7.2

modifications to support SQL Workshop, B.2.5.5, B.3.2.5

modifying dads.conf, 3.4.5.4

modifying httpd.conf, B.2.5.5, B.3.2.5

modifying marvel.conf, 4.5.2, B.3.2

modifying wdbsvr.app, B.2.5.4, B.3.2.4

O

obfuscate

password, 3.4.10, 4.5.7, B.2.10

online help

not working, A.5

not working if using a virtual host, A.5.1

problems with Help index, A.5.2

Oracle Application Server 10g

editing dads.conf, 3.4.5.4.1

Oracle HTTP Server

about, 1.4.1, 1.4.3

configuring, 3.4.5, B.2.5

copying images directory, 3.4.5.3, B.2.5.3

location of images, 1.4.1.1

pre-installation tasks, 4.2, B.1

with Oracle Real Application Clusters (RAC), 1.4.3

Oracle HTTP Server 11g

configuring, 3.4.5.4, 4.5.2

editing dads.conf, 3.4.5.4.1

Oracle HTTP Server 9.0.3

modifying wdbsvr.app, B.2.5.4, B.3.2.4

Oracle Technology Network (OTN)

downloading from, 3

Oracle Text

default language scripts, 2.6

requirement, 2.6

Oracle XML DB HTTP server

about, 1.4.2

disabling, 3.3.5.5

enabling, 3.3.5.4

updating images directory, 3.3.5.2

verifying HTTP server port, 3.3.5.3, 4.4.2.2

ORACLE_HTTPSERVER_HOME, 3 OTN

installing in other languages, 3.3.8

security considerations, 3.3.7

OTN installation

apex_epg_config.sql, 3.3.5.1

changing ADMIN account password, 3.3.3, 3.4.3

configuring embedded PL/SQL gateway, 3.3.5

configuring Oracle Application Server 11g, 3.4.5.4

configuring Oracle HTTP Server, 3.4.5

copying images (new installation), 3.4.5.3.2

copying images (when upgrading), 3.4.5.3.1

copying images directory, 3.4.5.3

download and install software, 3.3.2, 3.4.2

downloading from and configuring embedded PL/SQL gateway, 3.3

downloading from and configuring Oracle HTTP server, 3.4

enable network services, 3.3.6

installing in other languages, 3.4.8

logging in to Application Express, 3.4.11

managing JOB_QUEUE_PROCESSES, 3.3.9, 3.4.9

pre-installation tasks, 3.3.1, 3.4.1

restart processes, 3.3.4, 3.4.4

updating images directory, 3.3.5.2

verifying HTTP server port, 3.3.5.3

overview, 1.1

P

password

changing for ADMIN account, 3.3.3, 3.4.3, B.2.3

obfuscating, 3.4.10, 4.5.7, B.2.10

PL/SQL Web Toolkit

requirement, 2.7

post-installation tasks

configuring Oracle Application Server 11g, 4.5.2

configuring Oracle HTTP Server, B.2.5

copying images (new installation), B.2.5.3.2, B.3.2.7.2

copying images (when upgrading), B.2.5.3.1, B.3.2.7.1

copying images directory, B.2.5.3

installing in other languages, B.2.8, B.3.5

installing other languages, 3.3.8, 3.4.8, B.2.8, B.3.5

logging in to Application Express, 3.3.11, B.2.11, B.3.8

managing JOB_QUEUE_PROCESSES, B.2.9, B.3.6

obfuscating passwords, 3.4.10, B.2.10

pre-installation tasks

backing up Oracle database, B.1

shutting down database, 4.2, B.1

stopping processes, B.1

when downloading from OTN, 3.1

R

Real Application Clusters (RAC)

selecting an HTTP Server, 1.4.3

shutting down instances, 3.1, 4.2, B.1

related documentation, Preface requirements, 2

browser, 2.2

database, 2.1

disk space, 2.4

HTTP server, 2.3

JVM, 2.1.1

Oracle Text, 2.6

Oracle XML DB, 2.5

PL/SQL Web Toolkit, 2.7

shared_pool_size, 2.1.2

running

apex_epg_config.sql, 3.3.5.1

apexins.sql, 3.3.2, 3.4.2, B.2.2

apxchpwd.sql, 3.3.3, 3.4.3, B.2.3

apxdevrm.sql, 3.5.2, 4.6.2

apxdvins.sql, 3.5.1, 4.6.1

apxldimg.sql, 3.3.5.2

apxrtins.sql, 3.3.2, 3.4.2, B.2.2

runtime environment

about, 1.3

changing to development environment, 3.5.1, 4.6.1

installing, 3.3.2, 3.4.2, B.2.2

S

shared_pool_size

changing, 2.1.2

SHARED_SERVERS parameter, 3.3.10

T

translated version

installing, 3.3.8, 3.4.8, 4.4.5, 4.5.5, B.2.8, B.3.5

troubleshooting, A

cleaning up after failed installation, A.3

images, A.4

online help issues, A.5

reviewing log file, A.1

U

upgrading

about, 1.2

copying images, 3.4.5.3.1, 4.5.2.5.1, B.2.5.3.1, B.3.2.7.1

obfuscating password, 3.4.10.1, 4.5.7.1, B.2.10.1, B.3.7.1

user roles

Application Express administrator, 3.3.11.1, 3.4.11.1, 4.4.8.1, 4.5.8.1, B.2.11.1, B.3.8.1

developer, 3.3.11.1, 3.4.11.1, 4.4.8.1, 4.5.8.1, B.2.11.1, B.3.8.1

end user, 3.3.11.1, 3.4.11.1, 4.4.8.1, 4.5.8.1, B.2.11.1, B.3.8.1

workspace administrator, 3.3.11.1, 3.4.11.1, 4.4.8.1, 4.5.8.1, B.2.11.1, B.3.8.1

W

wdbsvr.app

modifications if running Oracle HTTP Server 9.0.3, B.2.5.4, B.3.2.4

Web browser

requirements, 2.2

workspace administrator, 3.3.11.1, 3.4.11.1, 4.4.8.1, 4.5.8.1, B.2.11.1, B.3.8.1

X

XML DB

requirement, 2.5

Oracle Legal Notices

Copyright Notice

Copyright © 1994-2014, Oracle and/or its affiliates. All rights reserved.

Trademark Notice

Oracle and Java are registered trademarks of Oracle and/or its affiliates. Other names may be trademarks of their respective owners.

Intel and Intel Xeon are trademarks or registered trademarks of Intel Corporation. All SPARC trademarks are used under license and are trademarks or registered trademarks of SPARC International, Inc. AMD, Opteron, the AMD logo, and the AMD Opteron logo are trademarks or registered trademarks of Advanced Micro Devices. UNIX is a registered trademark of The Open Group.

License Restrictions Warranty/Consequential Damages Disclaimer

This software and related documentation are provided under a license agreement containing restrictions on use and disclosure and are protected by intellectual property laws. Except as expressly permitted in your license agreement or allowed by law, you may not use, copy, reproduce, translate, broadcast, modify, license, transmit, distribute, exhibit, perform, publish, or display any part, in any form, or by any means. Reverse engineering, disassembly, or decompilation of this software, unless required by law for interoperability, is prohibited.

Warranty Disclaimer

The information contained herein is subject to change without notice and is not warranted to be error-free. If you find any errors, please report them to us in writing.

Restricted Rights Notice

If this is software or related documentation that is delivered to the U.S. Government or anyone licensing it on behalf of the U.S. Government, the following notice is applicable:

U.S. GOVERNMENT END USERS: Oracle programs, including any operating system, integrated software, any programs installed on the hardware, and/or documentation, delivered to U.S. Government end users are "commercial computer software" pursuant to the applicable Federal Acquisition Regulation and agency-specific supplemental regulations. As such, use, duplication, disclosure, modification, and adaptation of the programs, including any operating system, integrated software, any programs installed on the hardware, and/or documentation, shall be subject to license terms and license restrictions applicable to the programs. No other rights are granted to the U.S. Government.

Hazardous Applications Notice

This software or hardware is developed for general use in a variety of information management applications. It is not developed or intended for use in any inherently dangerous applications, including applications that may create a risk of personal injury. If you use this software or hardware in dangerous applications, then you shall be responsible to take all appropriate fail-safe, backup, redundancy, and other measures to ensure its safe use. Oracle Corporation and its affiliates disclaim any liability for any damages caused by use of this software or hardware in dangerous applications.

Third-Party Content, Products, and Services Disclaimer

This software or hardware and documentation may provide access to or information on content, products, and services from third parties. Oracle Corporation and its affiliates are not responsible for and expressly disclaim all warranties of any kind with respect to third-party content, products, and services. Oracle Corporation and its affiliates will not be responsible for any loss, costs, or damages incurred due to your access to or use of third-party content, products, or services.

Alpha and Beta Draft Documentation Notice

If this document is in preproduction status:

This documentation is in preproduction status and is intended for demonstration and preliminary use only. It may not be specific to the hardware on which you are using the software. Oracle Corporation and its affiliates are not responsible for and expressly disclaim all warranties of any kind with respect to this documentation and will not be responsible for any loss, costs, or damages incurred due to the use of this documentation.