Saturday, June 05, 2021

Upgrading Oracle APEX has never been easier

On May 12th Oracle APEX 21.1 was released. 

This post is not about why Oracle APEX 21.1 is worth an upgrade. You can see for yourself if you like the improvements in the Release Notes. Some companies upgrade once a year, some wait for the patch set bundle, and some upgrade very fast.

We upgraded our production instance this weekend. I blogged about how we do the upgrades and try to minimize downtime in the past. But upgrades have become even easier!

While the Oracle APEX kept running; 15 minutes install which of 5 minutes downtime, and we were done!

Note: it's always good to read the installation guide

Below what we did: 

  1. Download Oracle APEX
  2. Unzip
  3. Go into the directory 
  4. Connect to the Oracle Database with SQLcl or SQLPlus 
  5. Run 1 command:
@apexins.sql SYSAUX SYSAUX TEMP /i/

That was it! ... the installation did everything for us... and again this was in a live environment!
ORDS knows now that an APEX install is busy and suspends traffic for a certain time and next it comes up again:

Phase 1: no downtime


Phase 2 and 3: small downtime during phase 3 switch:


And done:


During Phase 3 downtime, I copied the new images folder.

I believe it wasn't really necessary as everything was working, but I did run the ORDS validate after the APEX install just to check it (while ORDS was still running):


And the proof of the max 5 minutes downtime:


I'm really impressed by the install and upgrade, it's basically an autonomous process these days 😀 

20 comments:

  1. using sysaux for apex is actually bad practice.

    ReplyDelete
  2. There are many discussions about the usage of SYSAUX or not.
    e.g. https://community.oracle.com/tech/developers/discussion/4184427/usage-of-sysaux-tablespace-for-apex

    I believe you need to decide for yourself if in your case it makes sense to have a dedicated APEX tablespace or not.

    ReplyDelete
  3. Hi Dimitri,

    We run Apex version 5.0.4.00.12 with EPG. Should I install ORDS 21.1.1 first and then do the Apex 21.1 upgrade?

    Thanks,
    Leo

    ReplyDelete
  4. Hi Leo,

    It doesn't really matter which you do first.
    Typically I would install APEX first, then ORDS.

    Dimitri

    ReplyDelete
  5. Hi Dimitri,

    I really enjoyed the new Apex 21.1 features. Is the release date for the oracle cloud environment available anywhere?

    Thanks,
    Robert

    ReplyDelete
  6. can i directly install latest release on existing old instance or i need to uninstall old apex instance then install new instance.

    Regards,

    ReplyDelete
  7. You can directly install the new version, no need to uninstall.

    ReplyDelete
  8. Hi Dimitri,

    thanks for this Blog. After Upgarding my apex from Version 19.1 to Version 21.1 as described here in your Blog.
    I reveived the following message after accessing ORDS via Chrome.

    "There is a problem with your environment because the Application Express files are not up-to-date! The files for version 19.1.0.00.15 have been loaded, but 21.1.0 is expected. Please verify that you have copied the images directory to your application server as instructed in the Installation Guide."

    do you have any tipp what could be wrong? regards Udo

    ReplyDelete
  9. Hi Udo,

    It looks like the images folder is not up-to-date.
    Did you copy the images folder? or did you update the CDN?
    If you did, try to refresh your page or empty the cache of the browser.

    Hope that helps,
    Dimitri

    ReplyDelete
  10. Hi Dimitri, do you happen to know in version 21.2 the account menu acts differently? In 21.1 I can click the top right to log out. In version 21.2 if I click it nothing happens?

    It also looks like Manage Requests / Manage Instance / Manage Workspaces / Monitor Activity is no longer across the top bar (you just use the icons?)

    Or I'm wondering if I messed something up

    ReplyDelete
  11. it's still there in APEX 21.2... it's the icon with the person and wrangler, next to the help icon.

    ReplyDelete
  12. I changed over to use the CDN and it all came back. When I flipped to local images it stops working, so something wrong with my images. Is it recommended to use the CDN anyways?

    ReplyDelete
  13. In most cases CDN makes a lot of sense yes.

    ReplyDelete
  14. Hello Sir, Can you please share steps to upgrade apex from 19.1 to 21.2. As starts from 20.1 ORDS is required and customer will install ORDS.So first we need to install Apex right and then ask our customer to install ords as while installing customer need ORDS user which we create using @apex_rest_config.sql script or with 21.2 version that will be created automatically. Please guide and provide the docs or any link.. Thanks in advance sir,

    Regards,
    Saurabh

    ReplyDelete
  15. Hola dimitri:

    Tengo este problema con APEX:
    There is a problem with your environment because the Application Express files are not up-to-date! The files for version 19.2.0.00.18 have been loaded, but 21.2.0 is expected. Please verify that you have copied the images directory to your application server as instructed in the Installation Guide.

    Saludos

    viviana

    ReplyDelete
  16. Hello,
    Question. We have upgraded the Apex version from 5.1 to 21.1:
    We have some problems with some functions that no longer exist in this version, for example this one: apex_050100.wwv_render_report3.is_valid_query.
    In version 21.1 this function does not exist, do you know with which other function could replace it? or if you have any documentation that could help me with this kind of problems?

    Thanks!

    ReplyDelete
  17. You should never use undocumented APIs...
    There is no documentation on undocumented APIs.

    I guess you can always look what the previous function is doing and create your own function from it.

    Hope that helps,
    Dimitri

    ReplyDelete
  18. Question: I have to update from APEX 18.2.0 to 22.2
    Should / Must I deinstall APEX first before installing new APEX with all patches ?

    any hint would be fine

    regards
    Rainer

    ReplyDelete
  19. No you don't need to uninstall APEX first. You can just install the new version and apply 1 patch (it contains all patches over time).

    ReplyDelete
  20. Flawless upgrade. This couldn't be easier, well maybe if I just think about it and my computer does it! :-)

    In my case I have different tablespaces:

    @apexins.sql tbs_apex tbs_apex temp /i/

    ReplyDelete