Wednesday, 18 November 2015

Patching APEX 5.0.0 to 5.0.2

Oracle Technology Network Developer Day

How to setup and upgrade your Oracle APEX VM

There are many reasons why you would want to download one of these. Most of us need a separate DEV environment to do our experiments on. 

Sometimes you just do not have access to your companies DEV environments or are not allowed to run things there. 

On the other side limited access to apex.oracle.com can also be a reason. I found them very useful for running training's or doing various testings. 

Process to download it is quite simple and it shouldn't take long for you to be up and running. 

Reason why I decided to write a post about it is because by default VM comes with APEX 5.0.0 version installed while very recently Oracle announced patch 5.0.2 so I thought everyone would love to be on latest version. :))

ORACLE APEX VM download

Once your download is completed you need a tool to run this VM, I am using VirtualBox here.

1. Start your virtual box and import .ova file from your download location. 
2. Open your browser and open http://localhost:8080/ords/

If all is okay you should see your APEX login page. 

By default your INTERNAL workspace password has not been set and you will not be able to login into your APEX environment. 

So first thing we need to do is to configure this password.

3. Download APEX Installation files from Apex installation
4. Unzip them under Desktop/Apex
5. To change INTERNAL workspace password run apxchpwd.sql script from sqlplus:
   - open terminal window
   - position your self in /home/oracle/Desktop/Apex
   - start sqlplus
        sqlplus "sys as sysdba"   
     enter password
     @apxchpwd.sql (to run the script)
     type in your new apex internal password
   - exit sqlplus 

Now you can login into your APEX Internal workspace using your username and password:


Now you can create workspaces and administer your own APEX instance. If this is all you needed you could stop here and default APEX 5.0.0 version should be ready for you.

To upgrade to 5.0.1 or 5.0.2 patch process is the same as below:

1. After you have APEX Internal password all setup
2. open support.oracle.com  
3. download patch #21805060 (this is 5.0.2 patch)
4. extract it to Desktop/Apex/patch
5. open the directory-> cd /home/oracle/Desktop/Apex/patch
6. start sqlplus with:
        sqlplus "sys as sysdba"   
     enter password (all default oracle passwords are oracle)
     @apxpatch.sql (to run the script)

After 7-10 minutes your patch should be installed!
7. As a last step we need to copy our new images into current APEX images directory.
cp -Rf /home/oracle/Desktop/Apex/patch/images/* /home/oracle/apex/images
Note here that official way to do this is by running: 
    @apxldimg.sql /home/oracle/Desktop/Apex/patch

but simple copy seems to be doing a good job.

If you do not complete the last step you might get a warning that you are using old APEX image file version but you should still be able to login into the new environment. 

Once this is done, reopen your APEX link and you should be running APEX 5.0.2 version.

Hope this helps.

Regards,
SLino

No comments:

Post a comment