APEX 5 is out, and I bet you want to start using it as soon as
possible. This post will guide you through upgrading your 12c DBaaS instance to
APEX 5. (just follow the APEX 5 upgrade docs for 11gR2 cloud instances) There
are a few challenges to overcome but nothing too difficult. The APEX docs spell
it out here. I am going to assume a few things here for
this guide. (We all know what assuming does)
1. You are on 22.214.171.124.1 or 126.96.36.199.2
2. You still have APEX installed in the CDB
If the above it true, you are going to need the following to
(The following sections should be done as the oracle user)
1. Apex 5 downloaded from
2. Patch #20618595 (For a
Ok...lets go..start by using scp/sftp to get these 2 files to your
DBaaS instance. We can put them into the /tmp directory on the cloud instance.
Now, unzip the patch file to this directory.
Then, cd into the new patch directory
To apply this patch, the database and its listeners have to be
shutdown. Multiple ways to do this so whichever way you feel most confortable
is the best.
Once the database and listener is down, run the following:
$ORACLE_HOME/OPatch/opatch prereq CheckConflictAgainstOHWithDetail
This is going to check for patch conflicts. If this does not
Prereq "checkConflictAgainstOHWithDetail" passed.
you need to stop what you are doing. Continuing may do bad things
to your database.....bad things....
Everything look ok? Then we can start patching...run the following
to start the patch:
If the patch applied successfully, start up
the database and the listener. We now need to upgrade all PDBs with
the new patch we applied. This is done with a utility called datapatch. You can
simple run this utility by issuing the following command at the Linux prompt:
OK...patch applied, database and listener up and running and
all PDBs patched up. We now can start on our APEX upgrade. Start by unzipping
apex. This will result in an apex directory. Lets do
some maintenance and move the old apex directory and replace it with
the new apex directory. Change the Linux directory to the Oracle Home
Now rename the apex 4.2 home to apex_old
mv apex apex_old
Now move the apex 5 home to the oracle home
mv /tmp/apex $ORACLE_HOME
Move into the new apex directory
start up sqlplus as sys
sqlplus / as sysdba
and now start the upgrade...
but wait! More than likely your SSH session is going to time
out during the upgrade...you can change the timeout parameters on the VM. Check
the end of this post for a suggestion. After extending the timeouts...continue
with the upgrade.
@apexins.sql SYSAUX SYSAUX TEMP /i/
Once the upgrade finishes, check the log files for errors by
issuing the following commands at the Linux prompt.
grep ORA- *.log
grep PLS- *.log
If you see no errors, we need to replace the image directory as
the next step. Change directory to the glassfish docroot.
Move the old images directory to i_old
mv i i_old
Create an i directory
move into the i directory
and copy the images from the apex directory to here
cp -rf $ORACLE_HOME/apex/images/* .
And that’s it...going to your apex URL on the could will
bring up the new APEX 5 UI.
This should only be a temporary edit...
log into your cloud VM as opc
then change directory to the ssh directory
make a copy of the ssh config file
sudo cp sshd_config sshd_config.save
edit the file as root
sudo vi sshd_config
change the parameters at the end of the file or replace them with
save the file and restart ssh
sudo service sshd restart