This section contains information on troubleshooting.
Verifying the Validity of an Oracle Application Express Installation
About Images Displaying Incorrectly in Oracle Application Express
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 APEX_050000 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.
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.
Check the My Oracle Support website for required patch updates for your installation.
To download required patches:
Use a web browser to view the My Oracle Support website:
Sign in to My Oracle Support.
Note:
If you are not a My Oracle Support registered user, click Register here and follow the registration instructions.On the main My Oracle Support page, click the Patches & Updates tab.
In the Patch Search group, select Product or Family (Advanced).
In the Product field, select Oracle Database.
In the Release field select one or more release numbers.
Click Search.
Any available patch updates are displayed in the Patch Search page.
Select the patch number and click ReadMe. The README page displays and contains information about the patch set and how to apply the patches to your installation.
Return to the Patch Search page, click Download, and save the file on your system.
Use the unzip utility provided with Oracle Database 12c to uncompress the Oracle patch updates that you downloaded from My Oracle Support. The unzip utility is located in the $ORACLE_HOME/bin
directory.
In a successful installation the following banner displays near the end of the installation:
Thank you for installing Oracle Application Express. Oracle Application Express is installed in the APEX_050000 schema.
To reinstall, you must 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.
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.
To verify whether you have a previous release of Application Express:
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 command in SQL*Plus:
select username from dba_users where regexp_like(username,'(FLOWS|APEX)_\d{6}') and username <> (select table_owner from all_synonyms where synonym_name = 'WWV_FLOW' and owner = 'PUBLIC')
If the query above returns any rows, the database contains a previous release of Oracle Application Express.
This section describes how to revert to a Oracle Application Express previous release.
To revert to a previous Oracle Application Express release 1.5:
If you altered your images directory, you must point the text alias /i/
back to images directory for the release you want to revert to. See "Copying the Images Directory."
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
Execute the following:
ALTER SESSION SET CURRENT_SCHEMA = FLOWS_010500; exec flows_010500.wwv_flow_upgrade.switch_schemas('APEX_050000','FLOWS_010500');
See the next section, "Removing the Oracle Application Express Release 5.0 Schema."
To revert to a Oracle Application Express release 1.6:
If you altered your images directory, you must point the text alias /i/
back to images directory for the release you want to revert to. See "Copying the Images Directory."
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
Execute the following:
ALTER SESSION SET CURRENT_SCHEMA = FLOWS_010600; exec flows_010600.wwv_flow_upgrade.switch_schemas('APEX_050000','FLOWS_010600');
Depending upon the release you are reverting to, execute the appropriate command in SQL*Plus:
See the next section, "Removing the Oracle Application Express Release 5.0 Schema."
To revert to a previous Oracle Application Express release 2.0:
If you altered your images directory, you must point the text alias /i/
back to images directory for the release you want to revert to. See "Copying the Images Directory."
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
Execute the following:
ALTER SESSION SET CURRENT_SCHEMA = FLOWS_020000; exec flows_020000.wwv_flow_upgrade.switch_schemas('APEX_050000','FLOWS_020000');
See the next section, "Removing the Oracle Application Express Release 5.0 Schema."
To revert to a previous Oracle Application Express release 2.2:
If you altered your images directory, you must point the text alias /i/
back to images directory for the release you want to revert to. See "Copying the Images Directory."
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
Execute the following:
ALTER SESSION SET CURRENT_SCHEMA = FLOWS_020200; exec flows_020200.wwv_flow_upgrade.switch_schemas('APEX_050000','FLOWS_020200');
See the next section, "Removing the Oracle Application Express Release 5.0 Schema."
To revert to a previous Oracle Application Express release 3.0:
If you altered your images directory, you must point the text alias /i/
back to images directory for the release you want to revert to. See "Copying the Images Directory."
Change your working directory to apex
in the 3.0 source.
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
Execute the following:
set define '^' @apexvalidate x x FLOWS_030000 ALTER SESSION SET CURRENT_SCHEMA = FLOWS_030000; exec flows_030000.wwv_flow_upgrade.switch_schemas('APEX_050000','FLOWS_030000'); ALTER SESSION SET CURRENT_SCHEMA = SYS; declare l_apex_version varchar2(30); begin l_apex_version := flows_030000.wwv_flows_release; dbms_registry.downgrading('APEX','Oracle Application Express','validate_apex','FLOWS_030000'); dbms_registry.downgraded('APEX',l_apex_version); validate_apex; end; /
See the next section, "Removing the Oracle Application Express Release 5.0 Schema."
To revert to a previous Oracle Application Express release 3.1:
If you altered your images directory, you must point the text alias /i/
back to images directory for the release you want to revert to. See "Copying the Images Directory."
Change your working directory to apex/core
in the 3.1 source.
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
Execute the following commands:
@wwv_flow_val.plb @wwv_dbms_sql.sql @wwv_dbms_sql.plb
Change your working directory to apex
in the 3.1 source.
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
Execute the following:
set define '^' @apexvalidate x x FLOWS_030100 ALTER SESSION SET CURRENT_SCHEMA = FLOWS_030100; exec flows_030100.wwv_flow_upgrade.switch_schemas('APEX_050000','FLOWS_030100'); ALTER SESSION SET CURRENT_SCHEMA = SYS; declare l_apex_version varchar2(30); begin l_apex_version := flows_030100.wwv_flows_release; dbms_registry.downgrading('APEX','Oracle Application Express','validate_apex','FLOWS_030100'); dbms_registry.downgraded('APEX',l_apex_version); validate_apex; end; /
See the next section, "Removing the Oracle Application Express Release 5.0 Schema."
To revert to a previous Oracle Application Express release 3.2:
If you altered your images directory, you must point the text alias /i/
back to images directory for the release you want to revert to. See "Copying the Images Directory."
Change your working directory to apex/core
in the 3.2 source.
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
Execute the following commands:
@wwv_flow_val.plb @wwv_dbms_sql.sql @wwv_dbms_sql.plb
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
Execute the following:
set define '^' @apexvalidate x x APEX_030200 ALTER SESSION SET CURRENT_SCHEMA = APEX_030200; exec apex_030200.wwv_flow_upgrade.switch_schemas('APEX_050000','APEX_030200'); ALTER SESSION SET CURRENT_SCHEMA = SYS; declare l_apex_version varchar2(30); begin l_apex_version := apex_030200.wwv_flows_release; dbms_registry.downgrading('APEX','Oracle Application Express','validate_apex','APEX_030200'); dbms_registry.downgraded('APEX',l_apex_version); validate_apex; end; /
See the next section, "Removing the Oracle Application Express Release 5.0 Schema."
To revert to a previous Oracle Application Express release 4.0:
Change your working directory to apex/core
in the 4.0 source.
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
Execute the following commands:
@wwv_flow_val.sql @wwv_flow_val.plb @wwv_dbms_sql.sql @wwv_dbms_sql.plb
Change your working directory to apex
in the 4.0 source.
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
Execute the following:
set define '^' @apexvalidate x x APEX_040000 ALTER SESSION SET CURRENT_SCHEMA = APEX_040000; exec apex_040000.wwv_flow_upgrade.switch_schemas('APEX_050000','APEX_040000'); ALTER SESSION SET CURRENT_SCHEMA = SYS; declare l_apex_version varchar2(30); begin l_apex_version := apex_040000.wwv_flows_release; dbms_registry.downgrading('APEX','Oracle Application Express','validate_apex','APEX_040000'); dbms_registry.downgraded('APEX',l_apex_version); validate_apex; end; /
See the next section, "Removing the Oracle Application Express Release 5.0 Schema."
To revert to a previous Oracle Application Express release 4.1:
If you altered your images directory, you must point the text alias /i/
back to images directory for the release you want to revert to. See "Copying the Images Directory."
Change your working directory to apex/core
in the 4.1 source.
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
Execute the following commands:
@wwv_flow_val.sql @wwv_flow_val.plb @wwv_dbms_sql.sql @wwv_dbms_sql.plb
Change your working directory to apex
in the 4.1 source.
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
Execute the following:
set define '^' @apexvalidate x x APEX_040100 ALTER SESSION SET CURRENT_SCHEMA = APEX_040100; exec apex_040100.wwv_flow_upgrade.switch_schemas('APEX_050000','APEX_040100'); ALTER SESSION SET CURRENT_SCHEMA = SYS; declare l_apex_version varchar2(30); begin l_apex_version := apex_040100.wwv_flows_release; dbms_registry.downgrading('APEX','Oracle Application Express','validate_apex','APEX_040100'); dbms_registry.downgraded('APEX',l_apex_version); validate_apex; end; /
See the next section, "Removing the Oracle Application Express Release 5.0 Schema."
To revert to a previous Oracle Application Express release 4.2 in a non-CDB:
If you altered your images directory, you must point the text alias /i/
back to images directory for the release you want to revert to. See "Copying the Images Directory."
Change your working directory to apex/core
in the 4.2 source.
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
Execute the following commands:
alter session set current_schema = SYS; @core_sys_views.sql grant select on sys.wwv_flow_gv$session to APEX_040200; @wwv_flow_val.sql @wwv_flow_val.plb @wwv_dbms_sql.sql @wwv_dbms_sql.plb begin dbms_utility.compile_schema('APEX_040200'); end; /
Change your working directory to apex
in the 4.2 source.
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
Execute the following:
set define '^' @apexvalidate x x APEX_040200 ALTER SESSION SET CURRENT_SCHEMA = APEX_040200; exec apex_040200.wwv_flow_upgrade.switch_schemas('APEX_050000','APEX_040200'); ALTER SESSION SET CURRENT_SCHEMA = SYS; declare l_apex_version varchar2(30); begin l_apex_version := apex_040200.wwv_flows_release; dbms_registry.downgrading('APEX','Oracle Application Express','validate_apex','APEX_040200'); dbms_registry.downgraded('APEX',l_apex_version); validate_apex; end; /
See the next section, "Removing the Oracle Application Express Release 5.0 Schema."
To revert to a previous Oracle Application Express release 4.2 in a CDB:
If you altered your images directory, you must point the text alias /i/
back to images directory for the release you want to revert to. See "Copying the Images Directory."
Change your working directory to apex/core
in the 4.2 source.
Create a new text file in that directory named apx42dgrd1.sql
consisting of the following:
alter session set current_schema = SYS; @core_sys_views.sql grant select on sys.wwv_flow_gv$session to APEX_040200; @wwv_flow_val.sql @wwv_flow_val.plb @wwv_dbms_sql.sql @wwv_dbms_sql.plb begin dbms_utility.compile_schema('APEX_040200'); end; /
Create a second new text file in that directory named apx42dgrd.sql
consisting of the following:
set define '^' whenever sqlerror exit column :xe_home new_value OH_HOME NOPRINT variable xe_home varchar2(255) set serverout on begin -- get oracle_home sys.dbms_system.get_env('ORACLE_HOME',:xe_home); if length(:xe_home) = 0 then sys.dbms_output.put_line(lpad('-',80,'-')); raise_application_error ( -20001, 'Oracle Home environment variable not set' ); end if; end; / whenever sqlerror continue set termout off select :xe_home from sys.dual; set termout on host ^OH_HOME/perl/bin/perl -I ^OH_HOME/rdbms/admin ^OH_HOME/rdbms/admin/catcon.pl -b apx42dgrd apx42dgrd1.sql
Start SQL*Plus and connect to CDB$ROOT
of 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
Execute the following commands:
@apx42dgrd.sql
Change your working directory to apex
in the 4.2 source.
Create a new text file in that directory name apx42dgrd1.sql
with the following contents:
set define '^' ALTER SESSION SET CURRENT_SCHEMA = SYS; @apexvalidate x x APEX_040200 ALTER SESSION SET CURRENT_SCHEMA = APEX_040200; exec apex_040200.wwv_flow_upgrade.switch_schemas('APEX_050000','APEX_040200'); ALTER SESSION SET CURRENT_SCHEMA = SYS; declare l_apex_version varchar2(30); begin l_apex_version := apex_040200.wwv_flows_release; dbms_registry.downgrading('APEX','Oracle Application Express','validate_apex','APEX_040200'); dbms_registry.downgraded('APEX',l_apex_version); validate_apex; end; /
Create a second new text file in that directory named apx42dgrd.sql
consisting of the following:
set define '^' whenever sqlerror exit column :xe_home new_value OH_HOME NOPRINT variable xe_home varchar2(255) set serverout on begin -- get oracle_home sys.dbms_system.get_env('ORACLE_HOME',:xe_home); if length(:xe_home) = 0 then sys.dbms_output.put_line(lpad('-',80,'-')); raise_application_error ( -20001, 'Oracle Home environment variable not set' ); end if; end; / whenever sqlerror continue set termout off select :xe_home from sys.dual; set termout on host ^OH_HOME/perl/bin/perl -I ^OH_HOME/rdbms/admin ^OH_HOME/rdbms/admin/catcon.pl -b apx42dgrd apx42dgrd1.sql
Start SQL*Plus and connect to CDB$ROOT
of 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
Execute the following:
@apx42dgrd.sql
See the next section, "Removing the Oracle Application Express Release 5.0 Schema."
After you have reverted to the prior release you can remove the Oracle Application Express 5.0 schema.
Removing the Oracle Application Express Release 5.0 Schema from a Non-CDB
Removing the Oracle Application Express Release 5.0 Schema from a CDB
To remove the release 5.0 schema from a non-CDB:
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
Execute the following command:
DROP USER APEX_050000 CASCADE;
Once you have removed the Oracle Application Express 5.0 schema, you can now attempt the upgrade again.
To remove the release 5.0 schema from a CDB:
Create a new text file named remove_apx50_usr1.sql
with the following contents:
alter session set current_schema = SYS; drop user APEX_050000 cascade;
Create a second new text file named remove_apx50_usr.sql
with the following contents:
set define '^' whenever sqlerror exit column :xe_home new_value OH_HOME NOPRINT variable xe_home varchar2(255) set serverout on begin -- get oracle_home sys.dbms_system.get_env('ORACLE_HOME',:xe_home); if length(:xe_home) = 0 then sys.dbms_output.put_line(lpad('-',80,'-')); raise_application_error ( -20001, 'Oracle Home environment variable not set' ); end if; end; / whenever sqlerror continue set termout off select :xe_home from sys.dual; set termout on host ^OH_HOME/perl/bin/perl -I ^OH_HOME/rdbms/admin ^OH_HOME/rdbms/admin/catcon.pl -b remove_apx50_usr remove_apx50_usr1.sql
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
Execute the following command:
@remove_apx50_usr.sql
Once you have removed the Oracle Application Express 5.0 schema, you can now attempt the upgrade again.
This section describes how to remove the Oracle Application Express schema, synonyms, and users from the database without deleting the database.
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 a 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 release of Application Express exists in the database.To remove Oracle Application Express from the database:
Change your working directory to the apex
directory where you unzipped the Oracle Application Express software.
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
Execute the following command:
SQL> @apxremov.sql
After successfully removing Application Express using apxremov.sql
, you must exit your current SQL*Plus session and reconnect before attempting another install using apexins.sql
.
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 directory where Oracle Application Express was downloaded or the images copied for ORDS to the directory defined by the first /i/
alias.
A page protection violation may be caused by manual alteration of protected page items. If this error occurs after installation when trying to log into Oracle Application Express, then stop and start Oracle REST Data Services. If you are unsure of what caused this error, contact the application administrator for assistance.