APEX Install/Upgrade (Pre 20.2)

Preparation

  • WORKAREA_SIZE_POLICY should be AUTO and MEMORY_TARGET should be at least 300M.

  • If you are following best practice and NOT using AMM, but you are using ASMM and APMM then the sum of SGA_TARGET and PGA_AGGREGATE_TARGET should be at least 300M.

export APXVER=21.2
mkdir -p /u01/img/apex/${APXVER}

  • Download to /u01/img/apex

unzip /u01/img/apex/apex_${APXVER}.zip -d /u01/img/apex/${APXVER}
rm /u01/img/apex/apex_${APXVER}.zip

  • Create a Guaranteed Restore Point (or ensure you have another method to backout if necessary).

CREATE RESTORE POINT apexupgrade GUARANTEE FLASHBACK DATABASE;

DataPump is not recommended for backing up the APEX schema and FLOWS_FILES as this does not work under 12.1.0.2 and aboveSee: 1912162.1
  • If this is an initial install or you are enabling the version of APEX shipped with the database then choose how you want to connect to APEX (ORDS/OHS/Embedded PL/SQL gateway) and click the appropriate links to configure.

  • If this is an Upgrade then temporarily prevent access to APEX (again using the appropriate links).

  • ORDS is the recommended technology for production workloads.

  • The Embedded PL/SQL Gateway may be suitable for a non-production environment (but standalone ORDS would be a better choice, if your platform supports it... e.g Linux does, AIX doesn't). With later versions of APEX (20.2+), support for the Embedded PL/SQL Gateway has been withdrawn.

  • OHS is desupported since APEX 20.2.

ORDS can be installed before or after APEX.
Note that use of the Embedded PL/SQL Gateway is desupported for APEX since APEX 20.2.
Note that use of the Oracle HTTP Server with mod_plsql plugin is desupported for APEX since APEX 20.2.

Installation

If the first or second digit of the version will change as a result of this upgrade (e.g. 4.1 to 4.2) then you need a full install of APEX. If only the third digit will change (e.g. 4.2.2 to 4.2.6) then you just need a patch...

export APXVER=21.2

This should match the version number in your download location path (e.g. for /u01/img/apex/18.1 APXVER is 18.1)

cd /u01/img/apex/${APXVER}/apex

sqlplus / as sysdba @apexins.sql SYSAUX SYSAUX TEMP /i/

If you want APEX to live in a different tablespace update the tablespace names accordingly.The tablespace names relate to "apex", "files", and "temp" segment storage.Homing APEX in SYSAUX is generally appropriate.This usually takes approximately 15 minutes to complete.

Patch

To apply a Patch instead of running the full install...

cd /u01/img/apex/${APXVER}/patch

sqlplus / as sysdba @apxpatch.sql

Review apxpatch.log for errors

Configure Static Files

OHS

Note that OHS is no longer supported for APEX (since 20.2)

As 'ohs'...

cd $ORACLE_HOME/Apache/modplsql/conf

Add the following two lines to the dads.conf file (if they are not there already)...

PlsqlPathAlias r

PlsqlPathAliasProcedure wwv_flow.resolve_friendly_url

Stop & Restart OHS

Update Images

Embedded PL/SQL Gateway

Note that the Embedded PL/SQL Gateways is desupported and apxldimg.sql isn't shipped with versions of APEX since APEX 20.2.

cd /u01/img/apex/${APXVER}/apex

sqlplus / as sysdba @apxldimg /u01/img/apex/${APXVER}

OHS

Note that OHS is no longer supported for APEX (since 20.2)

As 'ohs'...

cp -R /u01/img/apex/${APXVER}/apex/images/* /u01/app/ohs/product/10.1.0/Apache/images/

The destination directory is defined in $ORACLE_HOME/Apache/modplsql/conf/dads.conf

Post-Install

  • Remember to drop any Guaranteed Restore Point (be sure you don't need to backout first)

  • Start ORDS, EPG or OHS as necessary

Note that use of the Embedded PL/SQL Gateway is desupported for APEX since APEX 20.2.
Note that use of the Oracle HTTP Server with mod_plsql plugin is desupported for APEX since APEX 20.2.

Backout

Bibliography


https://blogs.oracle.com/apex/post/on-premises-apex-installations-in-oracle-database-21c-and-beyondhttps://oracle-base.com/articles/misc/oracle-application-express-apex-installationhttps://mikedietrichde.com/2017/05/02/is-your-apex-version-certified-with-your-database-release/https://emarcel.com/deploying-apex-database-12c/
Master Note for Oracle Application Express (APEX) Upgrades (Doc ID 1088970.1)Application Express (APEX) Database and Web Server Certification Reference (Doc ID 1344948.1)12.1.0.1 EXPDP Does Not Export APEX Schema (Doc ID 1912162.1)
http://dgielis.blogspot.com/2015/01/preparing-architecture-for-apex-50.html (Running different versions in different PDBs using ORDS) http://dgielis.blogspot.com/2016/05/please-use-https-for-your-apex-apps.html
Static File Supporthttps://docs.oracle.com/cd/E59726_01/install.50/e39144/http_server.htm#HTMIG29474
21.2https://blogs.oracle.com/apex/post/announcing-oracle-apex-212https://apex.oracle.com/en/platform/features/whats-new-212/https://docs.oracle.com/en/database/oracle/application-express/21.2/htmrn/index.html (Release Notes)https://docs.oracle.com/en/database/oracle/application-express/21.2/htmig/index.html (Iinstallation Guide)
Application Express Installation Guidehttps://docs.oracle.com/database/121/HTMIG/toc.htm (Release 12.1)https://docs.oracle.com/cd/E59726_01/install.50/e39144/listener.htm (Release 5: Installing Application Express and Configuring Oracle REST Data Services)https://docs.oracle.com/cd/E37097_01/install.42/e35123/overview.htm (Release 4.2)
OHShttps://docs.oracle.com/database/apex-18.1/HTMIG/Installing-AE-and-configuring-LWL-Oracle-HTTP-Server.htm