APEX 5 Migration - Part 1 - Requirements and Installation

Von Tobias Arnhold 12.03.2015
During this year I have done several APEX 5 migrations and I held three lectures on the topic.
Unfortunately it only reached out in Germany, however the content would contribute to simplifying the work for everyone. So I decided to blog it. I will cover this topic in three different posts:
- Requirements and Installation
- Common issues after the migration
- Universal Theme migration

I start with the requirements and installation of APEX 5.
The most of the content at this part is described in the APEX documentation and I will shorten it to the most important parts.


Database version requirements:
Version (EE,SE,SE1) or higher
XE with Version 11.2 (

Database storage requirements:
APEX Tablaspace takes around 220 MB
SYSTEM Tablespace takes around 100 MB
Each additional language installation takes 60 MB

WEB Listener version requirements:
Oracle REST (formally known as APEX Listener) Version 2.0.3 or higher
Oracle HTTP Server 11g (dependend on the Database Version)
Embedded PL/SQL Gateway ab 11.1g (dependend on the Database Version)

WEB Listener storage requirements:
Direcory /i/ takes now 160 MB (around 12.000 files about 800 directories)
INFO: To support old applications APEX 5 includes all old and new files.

Client requirements - APEX Application Builder:
Internet Explorer 9
Firefox 35
Chrome 40
Safari 7

Client requirements - APEX Applications
IE 7 or higher
Universal Theme requires IE 9 or higher
INFO: IE 6 will no longer work with APEX 5!

When is the right time to migrate?
The database and client requirements should be fulfilled.
An old rule says: Wait until the second patch-set of APEX is released. (Example 4.0.2, 4.1.2, 4.2.2, 5.0.2)
Luckily version 5.0.2 is available for download since 20.10.2015.
IMHO: If all requirements suit and you have some time left over then there is no reason not to upgrade.

The two most common migration-ways:

Upgrade towards an existing database
Install APEX in a new environment

Installation Guide for Linux with Oracle 11g and Glassfish (including Oracle REST)

I assume the following directories:
APEX Software:      /directory/software
Webserver:             /directory/appsrv/glassfish4
Image directory:    /directory/appsrv/appimages
Oracle DB:              /directory/ora_home

Install steps:
// Stop webserver (for example Glassfish)
cd /directory/appsrv/glassfish4/bin
./asadmin stop-domain domainXY

// unpack apex 5 zip file
cd /directory/software
unzip apex_5.0.2.zip

// copy images to new directory
mv /directory/software/apex/images /directory/appsrv/appimages/images_5

// Jump into apex directory
cd /directory/software/apex

// Installation
sqlplus /nolog
connect / as sysdba
@apexins.sql SYSAUX SYSAUX TEMP /i/

// jump into apex image directory and rename image directories
cd /directory/appsrv/appimages/
mv apex apex_42
mv apex_5 apex

// Language installation (German)
cd /directory/software/apex/builder/de
export NLS_LANG

sqlplus /nolog

// Activate ACL
// https://docs.oracle.com/cd/E59726_01/install.50/e39144/http_server.htm#HTMIG29394
// Configure REST
cd /directory/software/apex
sqlplus /nolog
conn / as sysdba

// Startup webserver
cd /directory/appsrv/glassfish4/bin
./asadmin start-domain domainXY
Check if the installation went successful by executing the following select:
select version, status 
from sys.dba_registry 
where comp_id = 'APEX';
You can even check for installation errors by executing this select as SYS:
select upgrade_command, upgrade_error 
from apex_050000.wwv_flow_upgrade_progress 
where upgrade_error is not null 
order by upgrade_date;
If you use a the Oracle HTTP Server be aware to update the dads.conf
// dads.conf umbenennen
cd /directory/appsrv/OHS/my_instance/mod_plsql
cp dads.conf dads_42.conf
// edit dads.conf with the new parameters:
// PlsqlPathAlias r
// PlsqlPathAliasProcedure wwv_flow.resolve_friendly_url
Rollback to APEX 4
Every greater release of APEX (4.0,4.1,4.2,5.0) brings an own Oracle schema,  into there will all APEX applications be copied. Luckily when needed this makes it easy to switch back to the old version.
For that just follow the installation steps described here:

Whats happens is:
 -  Appoint the old APEX schema as the current one
 -  Remove the APEX 5 schema
 -  You can upgrade again

The upgrade itself works excellent like the ones before. All the migrations I have made so far went successful and were really fast.
A post by Robert Schäfer tells more about the installation on 12c. But  it seems it gets you into more trouble!?

Whats next?
Next time I will write about the common issues you experience within your applications. And what you especially must look out for.

Post Tags: