Upgrade Oracle Apex from 5.1.x to 18.1

Oracle has released the latest version of Apex and keeping in line with their naming convention Apex has jumped from version 5.1.4 to 18.1 . The new version of Apex has many exciting new features, you can read about them all here
Setup :
Apex Version : Oracle Apex 5.1.4
Webserver : ORDS Running on Apache Tomcat 9
DB Version : Oracle 12.2 with January 2018 Patchset

1. Download Apex 18.1 from Oracle Website
Link: http://www.oracle.com/technetwork/developer-tools/apex/downloads/index.html

2. Rename the old apex directory in ORACLE_HOME

cd $ORACLE_HOME
mv apex/ apex_old/

3. Go to the new Apex Directory and run the Upgrade

cd apex/
SQL> @apexins.sql apex apex temp /i/
apex - tablespace for apex
apex - tablespace for apex files
temp - temporary tablespace

After a while you will get the below message if you had an earlier version of Oracle Apex

Session altered.
timing for: Phase 1 (Installation)
Elapsed: 00:04:59.21
Phase 2 (Upgrade)
Session altered.
 
-- Now beginning upgrade. This will take several minutes.-------')
timing for: Phase 2 (Upgrade)
Elapsed: 00:06:10.38
Phase 3 (Switch)
...Upgrading DBMS_REGISTRY
PL/SQL procedure successfully completed.
 
Session altered.
Thank you for installing Oracle Application Express 18.1.0.00.45
Oracle Application Express is installed in the APEX_180100 schema.
The structure of the link to the Application Express administration services is as follows:
http://host:port/pls/apex/apex_admin (Oracle HTTP Server with mod_plsql)
http://host:port/apex/apex_admin (Oracle XML DB HTTP listener with the embedded PL/SQL gateway)
http://host:port/apex/apex_admin (Oracle REST Data Services)
The structure of the link to the Application Express development interface is as follows:
http://host:port/pls/apex (Oracle HTTP Server with mod_plsql)
http://host:port/apex (Oracle XML DB HTTP listener with the embedded PL/SQL gateway)
http://host:port/apex (Oracle REST Data Services)
timing for: Phase 3 (Switch)
Elapsed: 00:00:58.70
timing for: Complete Installation
Elapsed: 00:11:10.83
PL/SQL procedure successfully completed.

4. Load Images Directory for Apex.

@apex_epg_config.sql ORACLE_HOME
@apex_epg_config.sql /u01/app/oracle/product/12.2.0/dbhome_1

5. Copy images from Apex image directory and Restart your Webserver, in my case I have Tomcat, else you will get below error after you access your Web URL for Apex
“There is a problem with your environment because the Application Express files are not up-to-date! The files for version 5.1.4.00.08 have been loaded, but 18.1.0.00.45 is expected. Please verify that you have copied the images directory to your application server as instructed in the Installation Guide.”
As tomcat user

cd /u01/app/oracle/product/12.2.0/dbhome_1/apex/images/
cp -R * $CATALINA_HOME/webapps/i
sh $CATALINA_HOME/bin/shutdown.sh
sh $CATALINA_HOME/bin/startup.sh

If the error persists, clear all browser cache ,cookies and restart your browser
https://support.oracle.com/epmos/faces/DocumentDisplay?_afrLoop=158503212359153&parent=EXTERNAL_SEARCH&sourceId=PROBLEM&id=2342618.1&_afrWindowMode=0&_adf.ctrl-state=beqcsqsc3_4

And Oracle Apex is upgraded to the latest version 18.1.0.00.45
Screen Shot 2018-05-28 at 11.17.12 AM

Category: ApexDatabaseUncategorized

Tags:

Leave a Reply

Article by: Shadab Mohammad