#If you followed my Oracle 23c Free Docker, APEX & ORDS all-in-one simple guide blog some time ago, you may wish to upgrade to the latest versions of
APEX
APEX Patch Set
ORDS
In this case, follow the instructions below.
Issues I encountered:
I ran out of space on my OCI Compute instance, so I assigned it 50GB of Block Storage
I encountered and fixed the MBean Warning message in ORDS
APEX Images were identified as a previous release. I tried various things to no avail (see the chmod idea in the blog). However, after making a coffee it'd magically fixed itself 🤷♂️
Prerequisites
Log in to your Workspace and click on the About menu option
Take note of your Product Build, APEX_LISTENER_VERSION and Patch Version (note: Patch Version appears between Schema Compatibility and Last DDL Time but only if it's currently on a patch version - mine is not)
It looks like I'm on APEX 23.1 and ORDS 23.1.4 and I want to upgrade to the latest - which at the time of writing is APEX 23.2 + patch set 2 & ORDS 23.3
Stop ORDS + Install wget
Stop ORDS before we do anything
Now we enter bash
docker exec -it 23cfree /bin/bash
Drop into superuser
su
Stop ORDS
sh /home/oracle/scripts/stop_ords.sh
Take this opportunity to Install wget
dnf install wget -y
Update ORDS
This will update ORDS to the latest version
Whilst still as su, update ORDS
dnf update ords -y
Upgrade ORDS
export _JAVA_OPTIONS="-Xms512M -Xmx512M" ords --config /etc/ords/config install
Use the following configuration
Installation Type > Choose option [1] Connection > Choose option [1] administrator username > SYS password > E
The output will look like this
Oracle REST Data Services - Interactive Install Enter a number to select the type of installation [1] Install or upgrade ORDS in the database only [2] Create or update a database pool and install/upgrade ORDS in the database [3] Create or update a database pool only Choose [1]: Enter a number to select the database pool to use or specify the database connection [1] default jdbc:oracle:thin:@//localhost:1521/FREEPDB1 [2] Specify the database connection Choose [1]: Provide database user name with administrator privileges. Enter the administrator username: SYS Enter the database password for SYS AS SYSDBA: Connecting to database user: SYS AS SYSDBA url: jdbc:oracle:thin:@//localhost:1521/FREEPDB1
Start ORDS
sh /home/oracle/scripts/start_ords.sh
Note: if you are upgrading to ORDS 23.3.0 or above and you have followed my Nginx Proxy Manager blog, then in Nginx Proxy Manager, you must edit /ords/ section by clicking the ⚙️icon and remove this line
proxy_set_header Host $http_host:$port;
Update APEX
This will update APEX to the latest version
Exit Super User (if in superuser)
[ $(id -u) -eq 0 ] && exit
Run this to get the latest APEX (1min)
curl -o apex-latest.zip https://download.oracle.com/otn_software/apex/apex-latest.zip
unzip it & enter the apex folder (1min)
# CAREFUL: This removes the apex folder from the original instructions rm -r /home/oracle/apex # unzip unzip -o apex-latest.zip rm apex-latest.zip cd apex
Open SQL*Plus with sqlplus / as sysdba
sqlplus / as sysdba
like this...
bash-4.4$ sqlplus / as sysdba SQL*Plus: Release 23.0.0.0.0 - Developer-Release on Wed Apr 5 13:27:32 2023 Version 23.2.0.0.0 Copyright (c) 1982, 2023, Oracle. All rights reserved. Connected to: Oracle Database 23c Free, Release 23.0.0.0.0 - Developer-Release Version 23.2.0.0.0
Set the PDB
ALTER SESSION SET CONTAINER = FREEPDB1;
Then run the APEX installer below to upgrade APEX
@apexins.sql SYSAUX SYSAUX TEMP /i/
Configure Static File Support
@apex_rest_config.sql
Use the following configuration
APEX_LISTENER user > E APEX_REST_PUBLIC_USER > E
Exit out of sqlplus when compete
exit
Copy the latest APEX images folder to where ORDS expects it
# Backup Images folder / or delete it mv /home/oracle/software/apex/images /home/oracle/software/apex/images$(date +"%Y%m%d") # Copy the APEX images folder cp -r /home/oracle/apex/images /home/oracle/software/apex # TBC chmod 777 /home/oracle/software/apex/images/
Install the latest APEX Patch Set
In your browser, go to https://apex.oracle.com/download and check for the presence of the latest cumulative patch set i.e
Click the link, sign in to My Oracle Support and Click Download
You'll see the download window.
Right-click the filename in the hyperlink i.e. p35895964_2320_Generic.zip and copy the link address to the clipboard. It will look like something similar to this:
# APEX 23.2 Patch 1 # https://updates.oracle.com/Orion/Services/download/p35895964_2320_Generic.zip?aru=25470420&patch_file=p35895964_2320_Generic.zip # APEX 23.2 Patch 2 # https://updates.oracle.com/Orion/Services/download/p35895964_2320_Generic.zip?aru=25497679&patch_file=p35895964_2320_Generic.zip # APEX 23.2 Patch 3 # https://updates.oracle.com/Orion/Services/download/p35895964_2320_Generic.zip?aru=25536745&patch_file=p35895964_2320_Generic.zip # APEX 23.2 Patch 4 # https://updates.oracle.com/Orion/Services/download/p35895964_2320_Generic.zip?aru=25565403&patch_file=p35895964_2320_Generic.zip # APEX 23.2 Patch 10 # https://updates.oracle.com/Orion/Services/download/p35895964_2320_Generic.zip?aru=25826581&patch_file=p35895964_2320_Generic.zip # APEX 24.1 Patch 4 # https://updates.oracle.com/Orion/Services/download/p36695709_2410_Generic.zip?aru=25831745&patch_file=p36695709_2410_Generic.zip # APEX 24.1 Patch 5 # https://updates.oracle.com/Orion/Services/download/p36695709_2410_Generic.zip?aru=25863828&patch_file=p36695709_2410_Generic.zip
Note: you can use the above URLs instead of using the browser to find them
Exit Super User (if in superuser)
[ $(id -u) -eq 0 ] && exit
Now prepare a command like this, but change the username, password and URL (the URL needs to be in quotes)
#!/bin/bash # Define variables oracleUsername="myOracleUsername" oraclePassword="myOraclePassword" url="PASTE URL HERE" # Use variables in wget command wget --http-user="$oracleUsername" \ --http-password="$oraclePassword" \ --no-check-certificate \ --output-document="patchfile.zip" \ "$url"
Paste in your prepared wget command to terminal and the patch file will download.
Connecting to aru-akam.oracle.com (aru-akam.oracle.com) HTTP request sent, awaiting response... 200 OK Length: 357387 (349K) [application/zip] Saving to: 'patchfile.zip' patchfile.zip 100%[===================>] 349.01K --.-KB/s 2023-12-01 21:21:14 (167 MB/s) - 'patchfile.zip' saved [357387/357387]
Unzip it
unzip patchfile.zip
Enter the patch folder.
patchfolder=$(unzip -l patchfile.zip | awk '{print $4}' | grep -o '^[^/]\+/' | sed 's#/$##' | sort | uniq) cd $patchfolder
Open SQL*Plus with sqlplus / as sysdba
sqlplus / as sysdba
like this...
bash-4.4$ sqlplus / as sysdba SQL*Plus: Release 23.0.0.0.0 - Developer-Release on Wed Apr 5 13:27:32 2023 Version 23.2.0.0.0 Copyright (c) 1982, 2023, Oracle. All rights reserved. Connected to: Oracle Database 23c Free, Release 23.0.0.0.0 - Developer-Release Version 23.2.0.0.0
Set the PDB
ALTER SESSION SET CONTAINER = FREEPDB1;
Then run the APEX installer below to patch APEX
@catpatch.sql
Copy the patched APEX images folder to where ORDS expects it
sudo cp -rf images /home/oracle/software/apex
Remove the patch file and patch folder
cd /home/oracle/ rm /home/oracle/patchfile.zip rm -r $patchfolder
Start ORDS
Finally, start ORDS
Drop into superuser
su
Start ORDS
sh /home/oracle/scripts/start_ords.sh
Exit Super User (if in superuser)
[ $(id -u) -eq 0 ] && exit
Confirm the upgrade
Log in to your Workspace and click on the About menu option
Take note of your Product Build, APEX_LISTENER_VERSION and Patch Version
Success!
What's the picture? I spotted this on a walk near Follifoot. I had to do a double-take when I saw it. Visit Yorkshire!