Note:
mod_plsql
is deprecated as of Oracle HTTP Server 12c (12.1.3). For more information, please see My Oracle Support Note 1576588.1. Oracle recommends using Oracle REST Data Services instead.In order to run, Oracle Application Express must have access to a Web listener. To use Oracle HTTP Server with mod_plsql
with Oracle Application Express, you must first install Oracle Application Express and then configure Oracle HTTP Server with mod_plsql
distributed with Oracle Database 11g or Oracle Application Server 10g and Oracle Database 12c. These instructions apply to both new and upgrade installations.
Performing Pre-installation Tasks for Oracle Application Express
Installing Translated Versions of Oracle Application Express
Creating a Workspace and Adding Oracle Application Express Users
Performing Post Installation Tasks for Upgrade Installations
Converting Between Runtime and Full Development Environments
See Also:
"Web Listener Requirements" and "AboutOracle REST Data Services Configuring Oracle HTTP Server with mod_plsql with Oracle Application Express" in Oracle Application Express Application Builder User's GuideOracle Application Express release 5.0 requires an Oracle Database Release 11.1.0.7 or later, including Enterprise Edition and Express Edition (Oracle Database XE).
If you are already running Oracle Application Express, then check the Oracle Application Express page on the Oracle Technology Network (OTN) for information about patch set releases or later releases of Oracle Application Express:
http://www.oracle.com/technetwork/developer-tools/apex/downloads/index.html
Before installing Oracle Application Express, Oracle recommends that you complete the following steps:
Review and satisfy all Oracle Application Express installation requirements. See "Oracle Application Express Installation Requirements."
If you are actively using Oracle Application Express and upgrading the current installation then shut down with normal or immediate priority the Oracle Database instances where you plan to install Oracle Application Express. On Oracle Real Application Clusters (Oracle RAC) systems, shut down all instances on each node.
An alternative to shutting down the database is to prevent all users from accessing Oracle Application Express when upgrading your installation from a previous release of Oracle Application Express. Oracle only recommends this option in high availability production environments where planned outages are not available. For all other scenarios, the database should be shut down.
To disable user access to Oracle Application Express when the existing installation uses the Oracle HTTP Server with mod_plsql, you should either shut down the Web server or disable the Application Express Database Access Descriptor of the Web server.
Once you have prevented access from Oracle Application Express users, you should log in to SQL*Plus as SYS
, connecting to the database where Oracle Application Express is installed, and query V$SESSION
to ensure there are no long running sessions which would interfere with the upgrade process.
Back up the Oracle Database installation.
Oracle recommends that you create a backup of the current Oracle Database installation before you install Oracle Application Express. You can use Oracle Database Recovery Manager, which is included in the Oracle Database installation, to perform the backup.
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 a Web listener. However, if you are performing a remote installation, make sure the Web listener for the remote database has started.
How you install Oracle Application Express depends upon how you access the installation script and the type of database you into which you are installing.
How you access the Oracle Application Express installation script depends upon whether you download the Oracle Application Express distribution from Oracle Technology Network (OTN), or install the version that ships with Oracle Database 12c Release 2 (12.2).
To download the script from the Oracle Application Express download page:
For installations where the development will be in English only, download the file apex_5.0_en.zip
from the Oracle Application Express download page. If the development will include languages other than English, download apex_5.0.zip
from the Oracle Application Express download page. See:
http://www.oracle.com/technetwork/developer-tools/apex/downloads/index.html
Note that the actual file name may differ if a more recent release has shipped since this document was published.
Unzip downloaded zip file:
If English only, unzip apex_5.0_en.zip
as follows, preserving directory names:
UNIX and Linux: $ unzip apex_5.0_en.zip
Windows: Double click the file apex_5.0_en.zip
in Windows Explorer
If multiple languages, unzip apex_5.0.zip
as follows, preserving directory names:
UNIX and Linux: $ unzip
apex_5.0.zip
Windows: Double click the file apex_5.0.zip
in Windows Explorer
Note:
You should keep the directory tree where you unzip the files short and not under directories that contain spaces. For example, within Windows unzip to C:\TEMP.Change your working directory to apex
.
Run the installation script. Go to the appropriate section:
To run the Oracle Application Express installation script:
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
Disable any existing password complexity rules for the default profile. See "Configuring Password Protection" in Oracle Database Security Guide.
Select an 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.
Full development environment.
Run apexins.sql
passing the following four arguments in the order shown:
@apexins.sql 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 or tablespace group.
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.sql SYSAUX SYSAUX TEMP /i/
Note:
If you receive the following error, exit SQL*Plus and change your working directory to where you unzipped the installation file, for exampleC:\TEMP
in Windows, before starting SQL*Plus:
SP2-0310: unable to open file "apexins.sql
"
Runtime environment. Run apxrtins.sql
passing the following arguments in the order shown:
@apxrtins.sql 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 or tablespace group.
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.sql SYSAUX SYSAUX TEMP /i/
See Also:
Oracle Database PL/SQL Language Reference for more information about SQL*PlusWhen Oracle Application Express installs, it creates three new database accounts:
APEX_050000
- 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 is used for Oracle Application Express configuration with Oracle REST Data Services or Oracle HTTP Server and mod_plsql
.
If you are upgrading from a previous release, then FLOWS_FILES
already exists and APEX_PUBLIC_USER
is created if it does not already exist.
See Also:
Oracle Application Express must be installed from a writable directory on the file system. See "Reviewing a Log of an Installation Session."Follow this procedure to install Oracle Application Express in a multitenant container database (CDB).
To install Oracle Application Express in a CDB:
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
Disable any existing password complexity rules for the default profile. See "Configuring Password Protection" in Oracle Database Security Guide.
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.sql 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 or tablespace group.
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.sql SYSAUX SYSAUX TEMP /i/
Note:
If you receive the following error, exit SQL*Plus and change your working directory to where you unzipped the installation file, for exampleC:\TEMP
in Windows, before starting SQL*Plus:
SP2-0310: unable to open file "apexins.sql
"
Runtime environment. Run apxrtins.sql
passing the following arguments in the order shown:
@apxrtins.sql 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 or tablespace group.
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.sql SYSAUX SYSAUX TEMP /i/
See Also:
Oracle Database PL/SQL Language Reference for more information about SQL*PlusWhen Oracle Application Express installs, it creates three new database accounts:
APEX_050000
- 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 is used for Oracle Application Express configuration with Oracle REST Data Services or Oracle HTTP Server and mod_plsql
.
See Also:
Oracle Application Express must be installed from a writable directory on the file system. See "Reviewing a Log of an Installation Session."This section describes how to create or update your Instance Administrator account.
Tip:
Skip this section if you are upgrading from a previous release of Oracle Application Express. In an upgrade scenario, the Instance Administrator account and password is preserved and carried over from the prior release.Instance administrators are superusers that are responsible for managing an entire Oracle Application Express instance, including managing workspace provisioning, configuring features and instance settings, and managing security. To perform these tasks, an Instance administrator signs in to the Oracle Application Express Administration Services application.
See Also:
"Oracle Application Express Administration Services" in Oracle Application Express Administration GuideRunning the apxchpwd.sql
script enables your to create or update your Instance Administrator account. You must run the apxchpwd.sql
script in the following scenarios:
New Oracle Application Express installations - Run apxchpwd.sql
to create an Instance Administrator account and password.
Converting of a runtime environment to a development environment - Run apxchpwd.sql
to change the Instance Administrator account password.
Changing Your Instance Administrator Password -Run apxchpwd.sql
to change the password for an existing Instance Administrator account.
Unlocking Your Instance Administrator Account - Run apxchpwd.sql
to unlock an existing Instance Administrator account.
Tip:
You do not need to runapxchpwd.sql
when upgrading from a previous release of Oracle Application Express. In an upgrade scenario, the Instance Administrator account password is preserved and carried over from the prior release.To create or update your Instance Administrator account:
Change your working directory to the apex
directory where you unzipped the installation software.
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
Run apxchpwd.sql
. For example:
@apxchpwd.sql
Follow the on-screen instructions. You will be prompted provide a username, password, and email address. If the account username does not exist, it will be created for you.
See Also:
Oracle Database PL/SQL Language Reference for more information about SQL*PlusAfter you install Oracle Application Express, you must restart the processes that you stopped before you began the installation. In addition, restart Oracle HTTP Server.
It is important to correctly configure the APEX_PUBLIC_USER
account to enable proper operation of Oracle Application Express.
The APEX_PUBLIC_USER
account is created with a random password in a new installation of Oracle Application Express. You must change the password for this account before 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:
Start SQL*Plus and connect to the database where Oracle Application Express is installed as SYS
specifying the SYSDBA
role. If you are configuring an Oracle Database 12c CDB, make sure you are connected to the root container, CDB$ROOT
when completing this step.
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
Run the following statement:
ALTER USER APEX_PUBLIC_USER ACCOUNT UNLOCK
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:
Start SQL*Plus and connect to the database where Oracle Application Express is installed as SYS
specifying the SYSDBA
role. If you are configuring an Oracle Database 12c CDB, make sure you are connected to the root container, CDB$ROOT
when completing this step.
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
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.
In the default profile in Oracle Database 11g, the parameter PASSWORD_LIFE_TIME
is set to 180. If you are using Oracle Database 11g with Oracle Application Express, this causes the password for APEX_PUBLIC_USER
to expire in 180 days. As a result, your Oracle Application Express instance will become unusable until you change the password.
To prevent this behavior, create another profile in which the PASSWORD_LIFE_TIME
parameter is set to unlimited and alter the APEX_PUBLIC_USER
account and assign it to the new profile.
See Also:
Oracle Database Security Guide for information on creating profiles and assigning them to database users.This section describes how to configure Oracle HTTP Server with mod_plsql
.
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, for example C:\TEMP
, to the location on the file system containing the Oracle home for Oracle HTTP Server.
During an upgrade, you 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_1
).
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
or dads.conf
files.
Oracle HTTP Server distributed with Oracle Database 11g or 12c —see the marvel.conf
or dads.conf
files.
When you locate the images directory path, rename the existing images directory to a backup location. Doing so enables you to revert to the previous release, if that becomes necessary.
Use the following command syntax to copy the apex\images
directory from the Oracle Database home to a path in the Oracle HTTP Server home:
Oracle HTTP Server distributed with Oracle Database 12c:
Windows:
xcopy /E /I APEX_HOME\apex\images ORACLE_HTTPSERVER_HOME\user_projects\domains\base_domain\images
UNIX and Linux:
cp -rf $APEX_HOME/apex/images ORACLE_HTTPSERVER_HOME/user_projects/domains/base_domain
In the preceding syntax examples:
APEX_HOME
is the location of where the installation Zip file was unzipped
ORACLE_HTTPSERVER_HOME
is the existing Oracle Application Server or Oracle HTTP Server Oracle home
The dads.conf
file contains the information about the Database Access Descriptor (DAD) to access Oracle Application Express.
Note:
Within the context of this document,ORACLE_HTTPSERVER_HOME
is the location where Oracle HTTP Server is installed.To edit the dads.conf
file:
Use a text editor and open the dads.conf.
Oracle Application Server 10g:
Windows:
ORACLE_HTTPSERVER_HOME\Apache\modplsql\conf\dads.conf
UNIX and Linux:
ORACLE_HTTPSERVER_HOME/Apache/modplsql/conf/dads.conf
Oracle HTTP Server distributed with Oracle Database 11g:
Windows:
ORACLE_INSTANCE\config\OHS/ohs<1>\mod_plsql
UNIX and Linux:
ORACLE_INSTANCE/config/OHS/ohs<1>/mod_plsql
Windows:
ORACLE_HTTPSERVER_HOME\user_projects\domains\base_domain\config\fmwconfig\components\OHS\instances\ohs1\mod_plsql\dads.conf
UNIX and Linux:
ORACLE_HTTPSERVER_HOME/user_projects/domains/base_domain/config/fmwconfig/components/OHS/instances/ohs1/mod_plsql/dads.conf
Note:
In the examples above, ohs1 refers to the name of the Oracle HTTP Server instance. When running the Oracle HTTP Server Configuration Wizard, the default name is ohs1. It may have been changed to a name other than ohs1.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 "About Copying the Images Directory."
Alias /i/ "ORACLE_HTTPSERVER_HOME/user_projects/domains/base_domain/images/" <Location /pls/apex> Order deny,allow AllowOverride None 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 PlsqlPathAlias r PlsqlPathAliasProcedure wwv_flow.resolve_friendly_url Allow from all </Location>
Note:
PlsqlPathAlias
and PlsqlPathAliasProcedure
are required new parameters that must be added to an existing DAD. This is important when upgrading to Application Express release 5.0.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 the database character set is AL32UTF8
. For example:
... PlsqlNLSLanguage AMERICAN_AMERICA.AL32UTF8 ...
Save and exit the dads.conf
file.
Oracle Application Express enables application developers to include static files with their applications. Static files can be associated with a workspace, an application, a plug-in, or an application theme. When using the Oracle HTTP Server as your web listener, static files are served using Path Aliasing functionality of the mod_plsql
plug-in.
See Also:
"Editing the dads.conf File" for the required configuration parametersThis section describes how to stop and restart Oracle HTTP Server.
Note:
Within the context of this document,ORACLE_HTTPSERVER_HOME
is the location where Oracle HTTP Server is installed.To stop and restart Oracle HTTP Server:
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
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
Note:
If you are using Oracle HTTP Server that is included with Oracle Fusion Middleware 11.1.1, you may need to replace the ias-component name above if the name given to the component was something other than HTTP_Server when it was installed. The default name is ohs1.To stop and restart the Oracle HTTP Server distributed with Oracle Database 12c, enter commands using the following syntax, where DOMAIN_HOME
is the path to the Oracle HTTP Server domain:
Windows:
Execute the following:
%DOMAIN_HOME%\bin\stopComponent.cmd componentName %DOMAIN_HOME%\bin\startComponent.cmd componentName
UNIX and Linux
Execute the following:
$DOMAIN_HOME/bin/stopComponent.sh componentName $DOMAIN_HOME/bin/startComponent.sh componentName
In a default installation, componentName
is ohs1
but may have been changed when running the Oracle HTTP Server Configuration Wizard.
See Also:
"Creating an OHS Instance" in Administering Oracle HTTP ServerIf you were previously using the Embedded PL/SQL Gateway and now want to use Oracle HTTP server and mod_plsql, you need to disable the Oracle XML DB Protocol Server.
To disable Oracle XML DB Protocol Server:
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
Run the following command:
EXEC DBMS_XDB.SETHTTPPORT(0);
When Oracle Application Express is running behind a reverse proxy or load balancer, it is important to communicate the original HTTP hostname and protocol as seen by user's browser to the Application Express engine. The engine will use this information to generate valid URL in HTML responses and HTTP redirects that user's browser can successfully follow. For Oracle HTTP server and mod_plsql, use PlsqlCGIEnvironmentList
directive in the dads.conf configuration file. For example:
PlsqlCGIEnvironmentList REQUEST_PROTOCOL=https PlsqlCGIEnvironmentList HTTP_HOST=www.example.com:443
See Also:
"Editing the dads.conf File"By default, the ability to interact with network services is disabled in Oracle Database 11g Release 1 or 2 or later. Therefore, if you are running Oracle Application Express with Oracle Database 11g Release 1 or 2 or later, you must use the new DBMS_NETWORK_ACL_ADMIN
package to grant connect privileges to any host for the APEX_050000
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.
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 a 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.The following example demonstrates how to grant connect privileges to any host for the APEX_050000
database user. This example assumes you connected to the database where Oracle Application Express is installed as SYS
specifying the SYSDBA
role.
DECLARE ACL_PATH VARCHAR2(4000); BEGIN -- Look for the ACL currently assigned to '*' and give APEX_050000 -- the "connect" privilege if APEX_050000 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; IF DBMS_NETWORK_ACL_ADMIN.CHECK_PRIVILEGE(ACL_PATH, 'APEX_050000', 'connect') IS NULL THEN DBMS_NETWORK_ACL_ADMIN.ADD_PRIVILEGE(ACL_PATH, 'APEX_050000', 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', 'APEX_050000', 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 enables access to servers on the local host only, such as email and report servers.
DECLARE ACL_PATH VARCHAR2(4000); BEGIN -- Look for the ACL currently assigned to 'localhost' and give APEX_050000 -- the "connect" privilege if APEX_050000 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; IF DBMS_NETWORK_ACL_ADMIN.CHECK_PRIVILEGE(ACL_PATH, 'APEX_050000', 'connect') IS NULL THEN DBMS_NETWORK_ACL_ADMIN.ADD_PRIVILEGE(ACL_PATH, 'APEX_050000', 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 users to connect to localhost', 'APEX_050000', TRUE, 'connect'); DBMS_NETWORK_ACL_ADMIN.ASSIGN_ACL('local-access-users.xml','localhost'); END; / COMMIT;
Procedures CREATE_ACL
, ASSIGN_ACL
, ADD_PRIVILEGE
and CHECK_PRIVILEGE
in DBMS_NETWORK_ACL_ADMIN
are deprecated in Oracle Database 12c. Oracle recommends using APPEND_HOST_ACE
instead. The following example demonstrates how to grant connect privileges to any host for the APEX_050000
database user. This example assumes you connected to the database where Oracle Application Express is installed as SYS
specifying the SYSDBA
role.
BEGIN DBMS_NETWORK_ACL_ADMIN.APPEND_HOST_ACE( host => '*', ace => xs$ace_type(privilege_list => xs$name_list('connect'), principal_name => 'apex_050000', principal_type => xs_acl.ptype_db)); END; /
The following example demonstrates how to provide less privileged access to local network resources. This example enables access to servers on the local host only, such as email and report servers.
BEGIN DBMS_NETWORK_ACL_ADMIN.APPEND_HOST_ACE( host => 'localhost', ace => xs$ace_type(privilege_list => xs$name_list('connect'), principal_name => 'apex_050000', principal_type => xs_acl.ptype_db)); END; /
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 must run the first script in this section to apply the ACL to the APEX_050000
user. See "Granting Connect Privileges Prior to Oracle Database 12c."
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.
See Also:
"Configuring HTTP Protocol Attributes" in Oracle Application Express Administration GuideThis section explains how to specify the number of concurrently running jobs.
JOB_QUEUE_PROCESSES
determine the maximum number of concurrently running jobs. In Oracle Application Express transactional support and SQL scripts require jobs. If JOB_QUEUE_PROCESSES
is not enabled and working properly, you cannot successfully execute a script.
This section describes three ways to view the number of JOB_QUEUE_PROCESSES
:
After installing or upgrading Oracle Application Express, you can view the number of JOB_QUEUE_PROCESSES
in the installation log files. See "Reviewing a Log of an Installation Session."
You can view the number of JOB_QUEUE_PROCESSES
on the About Application Express page.
To view the About Application Express page:
Sign in to Oracle Application Express. See "Signing In to Your Workspace."
Locate the Help menu at the top of the page.
From the Help menu, select About.
The About Application Express page appears. The current number JOB_QUEUE_PROCESSES
displays at the bottom of the page.
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
:
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
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.
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. Developers can choose to run the Application Express development environment in any of the installed languages by simply selecting the language from the Application Builder log in screen or home page.
In order to install other languages you must use the apex_5.0.zip
file which contains the extra files referenced below. If you previously downloaded apex_5.0_en.zip
, then you do not need to re-install Oracle Application Express. Simply download apex_5.0.zip
and unzip the file into the same directory where you unzipped apex_5.0_en.zip
.
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 theNLS_LANG
environment variable to AL32UTF8
before starting SQL*Plus.The following examples illustrate valid NLS_LANG
settings for loading Oracle Application Express translations:
American_America.AL32UTF8 Japanese_Japan.AL32UTF8
This section describes installing translated versions of Oracle Application Express.
About Installing Translated Versions of Oracle Application Express
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 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:
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
Navigate to the directory under apex/builder
based on the language you need to install. For example for German, navigate to apex/builder/de
. 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
Execute the following statement:
ALTER SESSION SET CURRENT_SCHEMA = APEX_050000;
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).
Before you can develop or install applications, you must create a workspace, add Oracle Application Express users and sign in to your workspace.
You access the Oracle Application Express home page by logging in to a workspace using a JavaScript enabled web browser. To learn more, see "Browser Requirements."
A workspace enables 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 instance administrator can create a workspace manually within Oracle Application Express Administration Services or have users submit requests. Oracle Application Express Administration Services is a separate application for managing an entire Oracle Application Express instance.
See Also:
"Creating Workspaces" and "Managing Workspace and Change Requests" in Oracle Application Express Administration GuideTo manually create a workspace and user accounts, you sign in to a separate application for managing an entire Oracle Application Express instance called Oracle Application Express Administration Services. You sign in to Oracle Application Express Administration Services using the ADMIN
account and password created or reset during the installation process.
To access Oracle Application Express Administration Services:
In a Web browser, navigate to the Oracle Application Express Administration Services application.
Because your setup uses Oracle HTTP Server with mod_plsql
go to:
http://hostname:port/pls/apex/apex_admin
Where:
hostname
is the name of the system where Oracle HTTP Server is installed.
port
is the port number assigned to HTTP on the Oracle HTTP Server. In a default installation, this number is 7777.
pls
is the indicator to use the mod_plsql cartridge.
apex
is the database access descriptor (DAD) defined in the mod_plsql
configuration file.
On the Sign In page:
Username - Enter admin
.
Password - Enter the Oracle Application Express administrator account password you specified in "Creating or Updating Your Instance Administration Account."
Click Sign In to Administration.
Note that, depending on your setup, you might be required to change your password when you log in for the first time.
See Also:
"Oracle Application Express Administration Services" in Oracle Application Express Administration Guide.To manually create a workspace you sign in to a separate application called Oracle Application Express Administration Services. You sign in to Oracle Application Express Administration Services using the ADMIN
account and password created or reset during the installation process.
To create an Oracle Application Express workspace manually:
Access Oracle Application Express Administration Services. See "Accessing Oracle Application Express Administration Services."
Oracle Application Express Administration Services appears. Next, create a workspace.
Click Manage Workspaces.
Under Workspace Actions, click Create Workspace.
The Create Workspace Wizard appears.
For Identify Workspace, enter the following:
Workspace Name - Enter a unique workspace name.
Workspace ID - Leave Workspace ID blank to have the new Workspace ID automatically generated. A Workspace ID must be a positive integer greater than 100000.
Workspace Description - Enter a workspace description.
Click Next.
For Identify Schema, specify whether you are re-using an existing schema or creating a new one.
If you are using an existing schema:
For Re-use existing schema, select Yes.
Select a schema from the list.
Click Next.
If you are creating a new schema:
For Re-use existing schema, select No.
Enter a schema name and password.
Specify a space quota.
Click Next.
For Identify Administrator, enter the Workspace administrator information and click Next.
Confirm your selections and click Create Workspace.
See Also:
"Oracle Application Express Administration Services" in Oracle Application Express Administration Guide.To create an Oracle Application Express user account:
Access Oracle Application Express Administration Services. See "Accessing Oracle Application Express Administration Services."
Oracle Application Express Administration Services appears.
Click the Manage Workspaces icon.
Click Manage Developers and Users.
Click Create User.
Under User Attributes, enter the appropriate information. Fields marked with an asterisk are required.
Tip:
To learn more about a specific attribute, click the item label. When Help is available, the item label changes to red when you pass your cursor over it and the cursor changes to an arrow and question mark.Under Account Privileges:
Workspace - Select a workspace from the list.
Default Schemas - Specify the default schema used for data browsing, application creation, and SQL script execution.
When using workspaces that have more than one schema available, this schema is the default. This setting does not control security, only the user's preference.
User is an administrator - Specify if this user should have workspace administrator privileges.
Administrators are given access to all components. Additionally, they can manage user accounts, groups, and development services. Components may not be available if they are switched off by Instance Administrators.
User is a developer - Specify if this user should have developer privileges.
Developers must have access to either Application Builder, SQL Workshop, or both. These components may not be available if they are switched off by the Instance Administrator.
Application Builder Access - Determines whether a developer has access to the Application Builder.
SQL Workshop Access - Determines whether a developer has access to the SQL Workshop.
Team Development Access - Determines whether a developer has access to the Team Development.
Set Account Availability - Select Locked to prevent the account from being used. Select Unlocked to allow the account to be used.
If the user has exceeded the maximum log in failures allowed, specified in Workspace Preferences, then their account will be locked automatically.
Under Password:
Password - Enter a case sensitive password.
Confirm Password - Enter the password again.
Require Change of Password On First Use - Select No to allow the user to use the same password until it expires. Select Yes to require the user to change the password immediately when logging in the first time.
Click Create User or Create and Create Another.
Use your credentials (that is, your workspace name, user name and password) to sign in to the workspace.
To sign in to your workspace:
In a Web browser, navigate to the Oracle Application Express Sign In page.
Because your setup uses Oracle HTTP Server (Apache) and mod_plsql
, go to:
http://hostname:port/pls/apex
Where:
hostname
is the name of the system where Oracle HTTP Server is installed.
port
is the port number assigned to HTTP on the Oracle HTTP Server. In a default installation, this number is 7777. You can find information about your Oracle HTTP Server installation's port number from either of the following files:
ORACLE_BASE\ORACLE_HOME\install\portlist.ini ORACLE_BASE\ORACLE_HTTPSERVER_HOME\Apache\Apache\conf\httpd.conf
Be aware that if you change a port number, it is not updated in the portlist.ini file. You can only rely on this file immediately after installation.
pls
is the indicator to use the mod_plsql cartridge.
apex
is the database access descriptor (DAD) defined in the mod_plsql configuration file.
The Sign In page appears.
On the Sign In page, enter:
Workspace - Enter the name of your workspace.
Username - Enter your user name.
Password - Enter your case-sensitive password.
Click Sign In.
Note that, depending on your setup, you might be required to change your password when you log in for the first time.
See Also:
See "Creating Workspaces" and "Managing Workspace and Change Requests" in Oracle Application Express Administration GuideOnce you have verified that your upgrade installation was successful and all upgraded applications function properly, you should remove schemas from prior Oracle Application Express installations.
The database users associated with schemas from prior installations are privileged users and should be removed when they are no longer necessary. Removing schemas from a prior installation is a two step process. First you verify if a prior installation exists and then you remove the schemas.
To verify if a prior installation exists:
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
Run the following query:
SELECT username FROM dba_users WHERE ( username LIKE 'FLOWS\_______' ESCAPE '\' OR username LIKE 'APEX\_______' ESCAPE '\' ) AND USERNAME NOT IN ( SELECT SCHEMA FROM dba_registry WHERE comp_id = 'APEX' );
If the results contain entries in the form FLOWS_
XXXXXX
or APEX_
XXXXXX
where XXXXXX
represents six numbers, those entries are candidates for removal.
To remove schemas from prior installations:
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
Execute a statement similar to the following example:
DROP USER APEX_040200 CASCADE;
After following the instructions in "About Removing Prior Oracle Application Express Installations," you may need to fix an invalid ACL if you are running Oracle Database 11g or later and you enabled network services for the prior Oracle Application Express schema.
To fix an invalid ACL:
Change your working directory to the apex
directory where you unzipped the installation software.
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
Execute a statement similar to the following:
EXEC DBMS_NETWORK_ACL_ADMIN.DELETE_PRIVILEGE('power_users.xml', 'FLOWS_030000');
Performance of web applications heavily depends on their size and how often a browser has to request static content like images, CSS and JavaScript files. To improve performance, most web servers support on-the-fly HTTP response compression and provide settings that enable you to configure how long browsers may cache a file before requesting it again. The HTTP response compression is usually implemented using gzip encoding (for example, mod_deflate
in Oracle HTTP Server), while browser file caching is enabled by issuing Cache-Control HTTP response header (for example, using mod_headers
in Oracle HTTP Server).
See your web server documentation to learn how to enable response compression and browser file caching. For optimal performance of the Oracle Application Express development environment and Oracle Application Express applications, Oracle recommends enabling gzip compression of files in the virtual images directory (for example, /i/
) and responses from the database access descriptor (for example, /pls/apex
), as well as allowing browsers to cache files from the virtual images directory for at least 12 hours.
This section describes how to convert between runtime and full development environments.
Converting a Runtime Environment to a Full Development Environment in a non-CDB or Locally in a PDB
Converting a Full Development Environment to a Runtime Environment in a non-CDB or Locally in a PDB
Converting a Runtime Environment to a Full Development Environment in a CDB
Converting a Full Development Environment to a Runtime Environment in a CDB
An 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 an Oracle Application Express runtime environment using SQL*Plus or SQL Developer and the APEX_INSTANCE_ADMIN
API.
See Also:
"About the Oracle Application Express Runtime Environment" and "Installing Exported Applications into a Runtime Environment" in Oracle Application Express Administration GuideTo convert an Oracle Application Express runtime environment to a full development environment in a non-CDB or locally in a PDB:
Change your working directory to the apex
directory where you unzipped the installation software.
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
Run apxdvins.sql
. For example:
@apxdvins.sql
Follow the instructions in "Creating or Updating Your Instance Administration Account."
See Also:
Oracle Database PL/SQL Language Reference for more information about SQL*PlusTip:
Before converting a full development environment to a runtime environment, export all Websheet applications. When you convert a development environment to runtime, existing Websheet data grids and reports will be deleted from all workspaces. Converting the environment back to a full development environment will not restore these Websheet data grids or reports.To convert an Oracle Application Express full development environment to a runtime environment in a non-CDB or locally in a PDB:
Change your working directory to the apex
directory where you unzipped the installation software.
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
Run apxdevrm.sql
. For example:
@apxdevrm.sql
See Also:
Oracle Database PL/SQL Language Reference for more information about SQL*PlusTo convert an Oracle Application Express runtime environment to a full development environment in a CDB:
Change your working directory to the apex
directory where you unzipped the installation software.
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
Run apxdvins_con.sql
. For example:
@apxdvins_con.sql
Follow the instructions in "Creating or Updating Your Instance Administration Account."
See Also:
Oracle Database PL/SQL Language Reference for more information about SQL*PlusTip:
Before converting a full development environment to a runtime environment, export all Websheet applications. When you convert a development environment to runtime, existing Websheet data grids and reports will be deleted from all workspaces. Converting the environment back to a full development environment will not restore these Websheet data grids or reports.To convert an Oracle Application Express full development environment to a runtime environment in a CDB:
Change your working directory to the apex
directory where you unzipped the installation software.
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
Run apxdevrm_con.sql
. For example:
@apxdevrm_con.sql
See Also:
Oracle Database PL/SQL Language Reference for more information about SQL*Plus