Alhamdulillah. After the 19c to 26ai upgrade in my home lab, the next step was Oracle APEX. This post covers installing APEX 26.2 into a 26ai pluggable database, putting ORDS 26.3 in front of it, creating a workspace, running a sample application, and making ORDS start on its own after a reboot. Everything used public downloads, with no My Oracle Support account. Hostnames, IP addresses and passwords are masked.
Lab environment
| Item | Value |
|---|---|
| VM | labhost26, Oracle Linux 9.8 on VirtualBox |
| Database | Oracle AI Database 26ai EE 23.26.1, CDB26 with PDB26 |
| APEX | 26.2.0 (apex-latest.zip) |
| ORDS | 26.3.1 (ords-latest.zip), standalone mode on port 8080 |
| Java | OpenJDK 17.0.21 (OS package) |
| Install target | PDB26 only |
APEX is a no-cost feature of the database. The base release download is the full product. What needs a support contract is the Patch Set Bundle from My Oracle Support, which comes up again at the end.
Step 1: Confirm APEX is not already there
SHOW PDBSSET LINESIZE 150COL comp_id FORMAT a10COL version FORMAT a15COL status FORMAT a10ALTER SESSION SET CONTAINER=PDB26;SELECT comp_id, NVL(version,'-') version, status FROM dba_registry WHERE comp_id='APEX';
CON_ID CON_NAME OPEN MODE RESTRICTED
---------- ------------------------------ ---------- ----------
2 PDB$SEED READ ONLY NO
3 PDB26 READ WRITE NO
no rows selected
No APEX component in PDB26, so this is a fresh install.
Step 2: Download and unzip APEX
The VM had internet access, so I pulled the zip straight onto it:
cd /u01/stagecurl -sSL -o apex-latest.zip https://download.oracle.com/otn_software/apex/apex-latest.zipls -lh apex-latest.zipmkdir -p /u01/app/oracle/apex_installcd /u01/app/oracle/apex_installunzip -q /u01/stage/apex-latest.zipcat apex/images/apex_version.txt
-rw-r--r--. 1 oracle oinstall 322M Nov 19 19:10 apex-latest.zipOracle APEX Version: 26.2
Step 3: Install APEX into PDB26
I ran apexins.sql under nohup so a dropped PuTTY session would not interrupt it. It has to be started from the apex directory.
cd /u01/app/oracle/apex_install/apexnohup sqlplus -s / as sysdba > apexins_run.out 2>&1 <<'EOF' &ALTER SESSION SET CONTAINER=PDB26;@apexins.sql SYSAUX SYSAUX TEMP /i/EXITEOF
SYSAUX: tablespace for the APEX schemaSYSAUX: tablespace for uploaded filesTEMP: temporary tablespace/i/: virtual path for static images. Keep/i/to make later upgrades simpler.
The structure of the link to the Oracle APEX Administration Services is as follows:http://host:port/ords/apex_adminThe structure of the link to the Oracle APEX development environment is as follows:http://host:port/ords/apextiming for: Complete InstallationElapsed: 6.00
Six minutes on this VM. One thing to watch when checking the log: a plain grep -i error returns a lot of noise, because many APEX objects have “error” in their names (wwv_flow_error_api, wwv_install_error$ and so on). Anchoring the search on the message prefixes gives a real answer:
grep -E "^ORA-|^PLS-|^SP2-" /u01/app/oracle/apex_install/apex/install*.log
No output, so no errors.
Step 4: Instance administrator and APEX_PUBLIC_USER
ALTER SESSION SET CONTAINER=PDB26;@apxchpwd.sql
Enter the administrator's username [ADMIN]User "ADMIN" does not yet exist and will be created.Enter ADMIN's email [ADMIN]Enter ADMIN's password []Created instance administrator ADMIN.
The password needs upper and lower case letters, a digit and a punctuation character.
APEX_PUBLIC_USER is created locked with a random password. The installation guide also warns that with the default profile the password expires after 180 days, after which APEX stops working until it is changed. For the lab I gave it a profile without password expiry:
CREATE PROFILE apex_nolimit LIMIT PASSWORD_LIFE_TIME UNLIMITED;ALTER USER APEX_PUBLIC_USER PROFILE apex_nolimit;ALTER USER APEX_PUBLIC_USER IDENTIFIED BY "<password>" ACCOUNT UNLOCK;SELECT comp_id, NVL(version,'-') version, status FROM dba_registry WHERE comp_id='APEX';
COMP_ID VERSION STATUS---------- --------------- ----------APEX 26.2.0 VALID
Step 5: Java, ORDS download and firewall
# as rootdnf -y install java-17-openjdk-headlessjava -versionmkdir -p /u01/app/oracle/ords /u01/app/oracle/ords_configcd /u01/app/oracle/ordscurl -sSL -o /u01/stage/ords-latest.zip https://download.oracle.com/otn_software/java/ords/ords-latest.zipunzip -q /u01/stage/ords-latest.zipchown -R oracle:oinstall /u01/app/oracle/ords /u01/app/oracle/ords_configfirewall-cmd --permanent --add-port=8080/tcpfirewall-cmd --reload
openjdk version "17.0.21" 2026-10-20 LTSOracle REST Data Services 26.3.1.r3031615
Running ords --version without --config printed a warning that the configuration folder was inside the product folder. That only applies to that one command. I kept the configuration in its own directory, /u01/app/oracle/ords_config, so ORDS can be replaced later without touching the configuration.
Step 6: Install ORDS into PDB26
A non-interactive install, with both passwords read from stdin so they do not end up in shell history. The first line is the SYS password, the second the new ORDS_PUBLIC_USER password.
export CFG=/u01/app/oracle/ords_configexport PATH=/u01/app/oracle/ords/bin:$PATHread -s -p "SYS password: " SYSPW; echoread -s -p "New ORDS_PUBLIC_USER password: " ORDSPW; echoprintf "%s\n%s\n" "$SYSPW" "$ORDSPW" | ords --config $CFG install \ --log-folder $CFG/logs \ --admin-user SYS \ --db-hostname localhost --db-port 1521 --db-servicename pdb26 \ --feature-db-api true --feature-rest-enabled-sql true --feature-sdw true \ --gateway-mode proxied --gateway-user APEX_PUBLIC_USER \ --proxy-user \ --password-stdin
INFO Installing Oracle REST Data Services version 26.3.1.r3031615 in PDB26INFO ... Verified database prerequisitesINFO ... Created Oracle REST Data Services proxy userINFO ... Created Oracle REST Data Services schemaINFO ... Granted privileges to Oracle REST Data ServicesINFO ... Created Oracle REST Data Services database objectsINFO Completed installation for Oracle REST Data Services version 26.3.1.r3031615. Elapsed time: 00:00:15.445INFO Completed configuring PL/SQL gateway user for Oracle REST Data Services version 26.3.1.r3031615.
With --gateway-mode proxied, ORDS connects as ORDS_PUBLIC_USER and proxies to APEX_PUBLIC_USER for APEX requests.
Step 7: Static images and first start
ords --config $CFG config set standalone.static.path /u01/app/oracle/apex_install/apex/imagesnohup ords --config $CFG serve > $CFG/logs/ords_serve.out 2>&1 &ss -ltnp | grep 8080curl -s -o /dev/null -w "HTTP %{http_code}\n" http://localhost:8080/ords/apex
The global setting named: standalone.static.path was set to: /u01/app/oracle/apex_install/apex/imagesINFO Oracle REST Data Services initializedOracle REST Data Services version : 26.3.1.r3031615Oracle REST Data Services server info: jetty/12.0.37LISTEN 0 50 *:8080 *:* users:(("java",pid=xxxx,fd=7))HTTP 302
The 302 is the redirect to the APEX sign-in page. From the Windows host, http://<vm-ip>:8080/ords/apex_admin opened the Administration Services login.
Step 8: Workspace
As ADMIN in Administration Services, I created a workspace through Create Workspace:
| Workspace | LAB |
| Schema | New schema LAB_APEX, 100 MB quota |
| Workspace administrator | LABADMIN |
Two small things on the way. The email field rejected a value that was not a full address, and after the error the password field was cleared, so it had to be typed again. A normal format such as name@example.com was accepted. APEX then created a dedicated tablespace and datafile for the new schema in PDB26:
Workspace LAB provisioned with administrator LABADMIN. Database user LAB_APEX createdwith default tablespace APEX_1494828056200061 using datafile/u01/oradata/CDB26/PDB26/APEX_1494828056200061.dbf
On the first sign-in to the LAB workspace, APEX required LABADMIN to change the password, which is expected for a new workspace administrator.
Step 9: A sample application as an end-to-end test
From Gallery, Sample Apps, I installed the Brookstrut Sample App into the LAB workspace. It creates its own tables and seed data, so it is a quick way to confirm the whole chain: database, APEX engine, ORDS, and static files. The app ran as App 100 with its icons and styling loading correctly, which confirmed the static path setting.
After running “Generate 100 Transactions” a few times, the Sales Dashboard showed $238,687 in sales, 28,381 units and 5,200 transactions, with a daily chart covering the seeded history from mid-October up to the generated data. The workspace home then showed 1 application and 8 tables in LAB_APEX.
Step 10: Start ORDS at boot with systemd
ORDS was still running under nohup, so it would not survive a reboot. The database on this VM already starts through a systemd unit, oracle-cdb26.service. In my earlier 26ai install, SELinux blocked systemd from executing a script directly under /u01, so I used the same approach here: a small wrapper in /usr/local/bin.
cat > /usr/local/bin/ords_start.sh <<'EOF'#!/bin/bashexport JAVA_HOME=/usr/lib/jvm/jre-17exec /u01/app/oracle/ords/bin/ords --config /u01/app/oracle/ords_config serveEOFchmod 755 /usr/local/bin/ords_start.shcat > /etc/systemd/system/ords.service <<'EOF'[Unit]Description=Oracle REST Data Services (APEX)After=network-online.target oracle-cdb26.serviceWants=oracle-cdb26.service[Service]User=oracleGroup=oinstallExecStart=/usr/local/bin/ords_start.shRestart=on-failureRestartSec=30[Install]WantedBy=multi-user.targetEOFsystemctl daemon-reloadsystemctl enable ordspkill -u oracle -f "ords.*serve"; sleep 5systemctl start ords
● ords.service - Oracle REST Data Services (APEX) Loaded: loaded (/etc/systemd/system/ords.service; enabled; preset: disabled) Active: active (running) since Thu 2026-11-19 19:50:59 IST; 40s agoLISTEN 0 50 *:8080 *:* users:(("java",pid=xxxx,fd=7))
After=oracle-cdb26.service orders the start after the database unit, and Restart=on-failure with a 30 second delay covers the case where the database is not fully open yet when ORDS starts. After a test reboot the APEX page was not available straight away. It came up within a couple of minutes, once the database and ORDS had both started, and the workspace and sample app data were all there.
Two notes from the workspace home page
- “Patch Set 1 is available”. APEX Patch Set Bundles are downloaded from My Oracle Support. With only a personal Oracle account, the lab stays on the base 26.2.0 release.
- “Enable Generative AI”. This needs an AI service and its credentials configured in APEX. I left it off for now.
Lessons learned
- Install APEX into the PDB you need. Here only PDB26 got APEX, and the CDB root stayed clean.
- When checking
apexinslogs, search for^ORA-,^PLS-and^SP2-, not the word “error”. - Give
APEX_PUBLIC_USERa profile that suits your password policy. With the default 180-day expiry, APEX stops working on the day the password expires. - Keep the ORDS configuration folder outside the ORDS product folder.
- Read passwords from stdin for the non-interactive ORDS install rather than typing them on the command line.
- Set
standalone.static.pathto the APEXimagesdirectory, and use a sample app to confirm that pages render with their styling. - Move ORDS to systemd before calling the setup finished, and test with a real reboot.
ما شاء الله, the lab now has 26ai, APEX 26.2 and ORDS 26.3 starting together on boot, with a working workspace and sample app. A natural next step is repeating the 19c to 26ai upgrade with APEX installed in the source database, to see how AutoUpgrade handles the APEX component.
Leave a Reply