X

A blog about Oracle's Database Cloud Service Technology

  • June 22, 2015

Upgrading Your 12c DBaaS Instance to APEX 5

Brian Spendolini
Database Cloud Services Product Manager

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 12.1.0.2.1 or 12.1.0.2.2

2. You still have APEX installed in the CDB 

If the above it true, you are going to need the following to
start:

1. Apex 5 downloaded from
otn.oracle.com

2. Patch #20618595 (For a
12.1.0.2.2 database)

(The following sections should be done as the oracle user)

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.

unzip p20618595_121020_Linux-x86-64.zip

Then, cd into the new patch directory

cd 20618595

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
-ph ./

This is going to check for patch conflicts. If this does not
return with

Prereq "checkConflictAgainstOHWithDetail" passed.

OPatch succeeded.

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:

opatch apply

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:

datapatch

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

$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

cd $ORACLE_HOME/apex

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.

cd
/u01/app/oracle/product/glassfish3/glassfish/domains/domain1/docroot

Move the old images directory to i_old

mv i i_old

Create an i directory

mkdir i

move into the i directory

cd i

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. 

 Upgrade complete! 

 (Special thanks to Jason Straub on helping out with the upgrade steps)


***** Extending your SSH session timeout *****

This should only be a temporary edit...

log into your cloud VM as opc

then change directory to the ssh directory

cd /etc/ssh

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
the following

TCPKeepAlive yes

ClientAliveCountMax 99999

ClientAliveInterval 30

TCPKeepAlive yes

save the file and restart ssh

sudo service sshd restart

Be the first to comment

Comments ( 0 )
Please enter your name.Please provide a valid email address.Please enter a comment.CAPTCHA challenge response provided was incorrect. Please try again.Captcha