Building my Oracle APEX 26.1 AI Playground with Oracle AI Database 26ai, ORDS, SQLcl, Codex, MCP and APEXlang

Introduction
Over the last few days I wanted to build a personal Oracle APEX playground for experimenting with modern AI-assisted development workflows.
My goal was simple:
Oracle AI Database 26ai Free
Oracle APEX 26.1
ORDS 26.1.2
SQLcl 26.1.2
VS-Code
Codex/Claude
SQLcl MCP Server
Oracle Skills
APEXlang
This is not intended to be a production setup. It is a learning environment where I can safely experiment with AI-assisted Oracle APEX development.
1. Creating the Oracle Cloud VM
I started with a fresh Compute Instance in OCI.
My setup:
Oracle Linux 9
Public IP address
SSH access from my Mac
Small playground VM, not intended for production workloads
After creating the instance, I first checked whether the machine was reachable.
From my Mac:
nc -vz <PUBLIC_IP> 22
This returned:
Connection to <PUBLIC_IP> port 22 [tcp/ssh] succeeded!
That confirmed that the VM was reachable and SSH was open.
2. Updating Oracle Linux
Once SSH connectivity was confirmed I connected to the server and updated the system:
sudo dnf update -y
This is always my first step on a new VM.
3. Enabling the Developer Repository
Before installing Oracle AI Database 26ai I enabled the Oracle Linux developer repository.
sudo dnf config-manager --set-enabled ol9_developer
This repository provides additional packages that can be useful during development and Oracle software installation.
4. Installing Oracle AI Database 26ai Free
Before installing the actual database RPM, Oracle provides a preinstall package which prepares the operating system.
It creates the required users and groups, installs dependencies and configures kernel parameters.
sudo dnf install -y oracle-ai-database-preinstall-26ai
Then I downloaded the Oracle AI Database 26ai Free RPM:
wget https://download.oracle.com/otn-pub/otn_software/db-free/oracle-ai-database-free-26ai-23.26.1-1.el9.x86_64.rpm
And installed it:
sudo dnf install -y ./oracle-ai-database-free-26ai-23.26.1-1.el9.x86_64.rpm
After the RPM installation, the database still needs to be configured:
sudo /etc/init.d/oracle-free-26ai configure
This creates:
CDB: FREE
PDB: FREEPDB1
Listener on port 1521
5. Configuring Database Startup
After the initial database configuration, I enabled the database service so that it starts automatically after a reboot.
sudo systemctl start oracle-free-26ai
sudo systemctl enable oracle-free-26ai
Verify the service status:
sudo systemctl status oracle-free-26ai
Expected result:
Active: active (running)
This ensures that the database starts automatically whenever the VM is restarted.
6. Oracle Environment Variables
To simplify working with Oracle tools, I configured the Oracle environment variables for the oracle user.
echo "export ORACLE_HOME=/opt/oracle/product/26ai/dbhomeFree" >> ~/.bash_profile
echo "export ORACLE_SID=FREE" >> ~/.bash_profile
echo "export PATH=\$ORACLE_HOME/bin:\$PATH" >> ~/.bash_profile
Then reload the profile:
source ~/.bash_profile
Verify:
echo $ORACLE_HOME
echo $ORACLE_SID
Expected output:
/opt/oracle/product/26ai/dbhomeFree
FREE
7. Verifying the Database
To verify the installation:
sudo su - oracle
sqlplus / as sysdba
Then:
select banner_full from v$version;
The result showed:
Oracle AI Database 26ai Free
At this point the database was running.
8. Installing Oracle APEX 26.1
Next, I installed Oracle APEX 26.1.
Download and extract APEX.
wget https://download.oracle.com/otn_software/apex/apex-latest.zip
unzip apex-latest.zip
After downloading and extracting APEX, I connected as SYSDBA and switched into the PDB.
This step is important. I initially forgot to switch to the PDB and immediately ran into confusion.
Connect as SYSDBA:
alter session set container=FREEPDB1;
Then I started the APEX installation:
@apexins.sql SYSAUX SYSAUX TEMP /i/
After the installation completed, I created the APEX administrator account:
@apxchpwd.sql
After creating the APEX administrator account, I configured the required REST users.
@apex_rest_config.sql
During the execution, the script prompts for passwords for:
APEX_LISTENER
APEX_REST_PUBLIC_USER
These accounts are required by ORDS to communicate with APEX and serve APEX applications through the web. Once the script completed successfully, the APEX installation was fully prepared for the ORDS configuration that followed later in the setup.
Then I verified the APEX version:
select version_no from apex_release;
Expected:
26.1.0
8.1 Installing the Latest APEX Patch Set Bundle
After installing the base APEX 26.1 release, I applied the latest Patch Set Bundle available from My Oracle Support.
At the time of writing:
Patch:
39179920Patch Version:
4Resulting APEX version:
26.1.4
I downloaded and extracted the patch, then changed into the extracted patch directory:
cd 39179920
Next, I connected to FREEPDB1 as SYS using SQLcl:
sqlplus / as sysdba
alter session set container=FREEPDB1;
From the patch directory, I applied the Patch Set Bundle:
@catpatch.sql
After the patch completed, I verified the installed APEX version:
select version_no
from apex_release;
Expected result:
26.1.4
The installed patch can also be verified with:
select patch_number,
patch_version,
installed_on
from apex_patches
where patch_number = 39179920
order by installed_on;
9. Installing Java for ORDS
ORDS requires Java. So, on the VM I installed OpenJDK 21:
sudo dnf install -y java-21-openjdk
Verify:
java -version
10. Installing ORDS
I downloaded ORDS and installed it under:
/opt/oracle/ords
Then I created a configuration directory:
sudo mkdir -p /etc/ords/config
sudo chown -R oracle:oinstall /etc/ords
After that, I ran the ORDS installation:
ords --config /etc/ords/config install
During the setup I connected ORDS to:
Service Name: FREEPDB1
I also enabled APEX support and pointed ORDS to the APEX images directory.
Then I started ORDS manually:
ords --config /etc/ords/config serve
Locally on the VM I tested it with:
curl -I http://localhost:8080/ords/
The response was:
HTTP/1.1 302 Found
That meant ORDS was running.
11. Setting Up the Firewall
To access ORDS from my browser, I had to open port 8080 in two places.
On the VM:
sudo firewall-cmd --permanent --zone=public --add-port=1521/tcp
sudo firewall-cmd --permanent --add-port=8080/tcp
sudo firewall-cmd --reload
In Oracle Cloud, I also added ingress rules in the Virtual Cloud Network:
Protocol: TCP
Port: 1521/8080
After that I could open:
http://<PUBLIC_IP>:8080/ords/
The ORDS landing page appeared.
12. Running ORDS as a systemd Service
At first I started ORDS manually from the terminal. This works, but only as long as the SSH session stays open. After closing the terminal, ORDS was no longer reachable. So I created a systemd service:
sudo vi /etc/systemd/system/ords.service
Content:
[Unit]
Description=Oracle REST Data Services
After=network.target oracle-free-26ai.service
Requires=oracle-free-26ai.service
[Service]
Type=simple
User=oracle
Group=oinstall
Environment="ORDS_HOME=/opt/oracle/ords"
Environment="ORDS_CONFIG=/etc/ords/config"
ExecStart=/opt/oracle/ords/bin/ords --config /etc/ords/config serve
Restart=always
RestartSec=10
TimeoutStartSec=0
[Install]
WantedBy=multi-user.target
Then:
sudo systemctl daemon-reload
sudo systemctl enable ords
sudo systemctl start ords
Check:
sudo systemctl status ords
The service was active and running.
I also rebooted the VM to make sure ORDS starts automatically:
sudo reboot
After a few minutes, ORDS was reachable again.
13. Creating the Workspace
In APEX Administration Services I created my playground workspace:
Workspace: Playground
Schema: PLAYGROUND
This schema is the one I want to use for all my experiments.
14. Installing SQLcl on macOS
Since I want to work locally with VS-Code, Codex and SQLcl, I installed SQLcl on my Mac. Using Homebrew:
brew install --cask sqlcl
SQLcl was installed, but the sql command was not immediately available. So I added SQLcl to my path. In my case:
nano ~/.zshrc
Then:
export PATH="/opt/homebrew/Caskroom/sqlcl/26.1.2.132.1334/sqlcl/bin:$PATH"
Reload:
source ~/.zshrc
15. Installing Java on macOS
SQLcl also needs Java. So, I installed Temurin:
brew install --cask temurin
Verify:
java -version
In my case Java was installed correctly and SQLcl started. I noticed a Java warning because I was using a very new Java version, but SQLcl still worked fine.
Final Check:
sql -version
Expected:
SQLcl: Release 26.1.2.0 Production Build: 26.1.2.132.1334
16. Connecting SQLcl
Then I connected with SQLcl:
sql playground@<PUBLIC_IP>:1521/FREEPDB1
Store the connection using the SQLcl Connection Manager.
17. Setting up VS Code and Git
Next, I created a local project folder:
mkdir playground
cd playground
Then I initialized Git:
git init
18. Adding AGENTS.md
Before working with Codex, I created an AGENTS.md file. This file describes the rules and context for the AI assistant.
My first version included something like this:
Oracle APEX 26.1
Oracle AI Database 26ai
PLAYGROUND schema
Development guidelines
Safety rules
This provides context for Codex.
19. Configuring Codex
Codex uses a configuration file under:
~/.codex/config.toml
My configuration contains:
model = "gpt-5.6-sol"
model_reasoning_effort = "medium"
[projects."/Users/<user>/Project/playground"]
trust_level = "trusted"
For my personal playground I set the project to trusted. For customer projects I would be much more careful.
20. Configuring the SQLcl MCP Server
The most interesting part was connecting Codex to SQLcl through MCP. In the same Codex config file I added:
[mcp_servers.sqlcl]
command = "sql"
args = ["-mcp"]
startup_timeout_ms = 60000
After restarting VS Code / Codex, the SQLcl MCP server was detected.
In Codex I asked:
Use the sqlcl MCP server and list the available database connections.
Codex displayed the MCP tool call:
connections_list - SQLcl - SQL Developer (MCP Server)
This confirmed that:
Codex found the MCP server
SQLcl started in MCP mode
Codex could access SQLcl MCP tools
21. Installing Oracle Skills
For this project, I installed the Oracle APEX and Database skills locally:
npx skills add oracle/skills/apex
npx skills add oracle/skills/db
After installation my project contained:
.agents/skills/
├── apex/
├── db/
This keeps the selected Oracle skills directly inside the project and makes them available to supported AI coding agents.
21.1 Alternative: Sync Oracle Skills with SQLcl
SQLcl also provides a built-in command to install or update Oracle skills:
skills sync
The command synchronizes the latest supported Oracle skills and installs them into the standard locations used by supported AI coding agents.
This is useful if you want to make the skills available independently of a specific project instead of installing them separately into each project.
22. Creating the First APEX App with SQLcl
Finally, I generated the starter files for my first APEX application using SQLcl:
apex generate -name playground -id 101
This created the initial APEXlang project files.
Next, I validated the generated application:
apex validate
Finally, I imported the application into Oracle APEX:
apex import
At this point, the complete APEXlang workflow was working.
The complete chain was now working:
Mac
→ VS Code
→ SQLcl
→ Oracle AI Database 26ai
→ APEX 26.1
→ SQLcl MCP Server
Current Status
At this point I have a fully working personal APEX AI playground.
Installed and configured:
Oracle Cloud Compute Instance with Oracle Linux 9
Oracle AI Database 26ai Free
Oracle APEX 26.1
ORDS 26.1
APEX Workspace
PlaygroundSchema
PLAYGROUNDSQLcl
VS-Code
Git repository
Codex
SQLcl MCP Server
Oracle Skills
First generated APEX application
Lessons Learned
A few small things were important during the setup.
Always check the PDB
I forgot this more than once.
show con_name;
For APEX work it should usually be:
FREEPDB1
ORDS must run as a service
Starting ORDS manually is fine for testing. But if you close the terminal, ORDS stops. A systemd service is the better solution.
Do not expose everything publicly
For port 8080 this may be okay for a playground. For port 1521 I strongly recommend allowing only your own IP address or using an SSH tunnel.
Git is essential for AI-assisted development
Especially with Codex and APEXlang, Git is extremely helpful. Before letting AI change files, I want to see:
git diff
AGENTS.md matters
The more context Codex has, the better the results become. But I would keep it simple at the beginning.
What's Next?
The next step for me is to start working with APEXlang. My planned workflow:
Create APEX app
→ Export as APEXlang
→ Commit to Git
→ Let Codex analyze the app
→ Let Codex suggest improvements
→ Review changes with git diff
→ Import back into APEX
I do not want to start with a complex application. The first experiments should be small and controlled. Maybe a simple books, movies or conference talks application.
The goal is not to replace the developer.
The goal is to understand how far AI-assisted APEX development can go when the tooling, the database connection and the project structure are prepared properly.
Conclusion
This setup took some time, but it was worth it.
I now have a clean Oracle APEX 26.1 playground where I can safely experiment with AI-assisted coding, Codex, SQLcl MCP and APEXlang.
For me, this feels like a very interesting next step in the Oracle APEX development workflow.
Not because AI magically builds perfect applications.
But because it can become a very useful assistant when the environment is prepared properly, the context is clear and every change is reviewed carefully.
And that is exactly what I want to explore next.
About the author
Timo joined Hyand in Ratingen, Germany, as a Senior Consultant in 2019, focusing on Oracle databases and APEX applications. With a background as a Data Warehouse Specialist, he has expertise in Database Administration, performance tuning, and SQL development. Timo is passionate about web development, cloud computing, and the architecture behind it, and became part of the Oracle ACE Community in 2023. He enjoys sharing his knowledge at conferences and through blog posts. When he's not working, you can find him traveling, hanging out with his family, or cooking up something in the kitchen.
Comments
Join the discussionNo comments yet. Be the first to comment.





