Alhamdulillah, another home-lab build done. This one started with a simple question: can I get an Autonomous Database on 26ai for free?
My OCI Free Tier tenancy already gives me two Always Free Autonomous Databases, but Always Free on 26ai is only offered in a handful of home regions, and mine is not one of them. So my cloud instance stays on 19c. Creating a second free account in another region is not an option either — Oracle’s Free Tier terms allow one free account per person.
The answer was the Autonomous AI Database Free container image. Oracle publishes it on container-registry.oracle.com, it runs on Podman, and it gives you the Autonomous stack — ORDS, Database Actions, APEX, the MongoDB API — on your own machine. To be clear up front: this is a local development and testing image, not the managed OCI service. There is no cloud bill, but there is also no scaling or automatic patching, and running it is entirely your job. In this post I build it in a VirtualBox VM and then put three 26ai features through their paces:
- Build an Oracle Linux 8.10 VM in VirtualBox and run the Autonomous AI Database 26ai Free container with Podman.
- Connect remotely with a wallet and use Database Actions.
- Load an ONNX embedding model and run semantic search over DBA notes.
- Build a JSON Relational Duality View and test reads and writes through SQL and the MongoDB-compatible API.
Lab Layout
| Item | Value |
|---|---|
| Host | Windows desktop, VirtualBox |
| Container VM | adbhost — Oracle Linux 8.10, 4 vCPU, 10 GB RAM, 50 GB disk |
| Client VM | dbhost1 — Oracle Linux 9 with a 26ai home (for SQL*Plus) |
| Image | adb-free:latest-26ai |
| Database version | Oracle AI Database 26ai 23.26.4.1.0, PDB MYATP |
| Workload type | ATP |
Host names and addresses below are lab placeholders. Replace <adbhost-ip> with your own VM address, and use your own passwords — the ones in my lab are not shown here.
Part 1 — Build the VM
I cloned an existing Oracle Linux 8.10 base snapshot rather than installing from ISO. clonevm generates new MAC addresses by default, so there is no NIC conflict with the source VM.
cd "C:\Program Files\Oracle\VirtualBox".\VBoxManage.exe clonevm ol8-base --snapshot "OL8.10 base" --name adbhost --basefolder "E:\VMs" --register.\VBoxManage.exe modifyvm adbhost --memory 10240 --cpus 4 --mouse usbtablet --usb-ohci on
Because the clone carries the source VM’s static IP, power off the source first and change the identity from the VirtualBox console before using SSH:
hostnamectl set-hostname adbhost.lab.localnmcli con mod enp0s8 ipv4.addresses <adbhost-ip>/24 ipv4.method manualnmcli con up enp0s8echo "<adbhost-ip> adbhost.lab.local adbhost" >> /etc/hosts
Before going further I confirmed nobody else on the host-only network owns the new address. A ping is not proof — the VM itself answers it — so I used duplicate address detection:
arping -D -c 3 -I enp0s8 <adbhost-ip>; echo "exit=$?"# exit=0 → no other host is using the address
Pre-checks: about 40 GB free on / and the registry reachable over the NAT adapter.
df -h / /varping -c 2 container-registry.oracle.com
Part 2 — Run the ADB Free 26ai Container
dnf install -y podman fusemodprobe fuseecho fuse > /etc/modules-load.d/fuse.confpodman pull container-registry.oracle.com/database/adb-free:latest-26ai# These are the port mappings used in this lab and verified with podman port:podman run -d --name adb26ai \ -p 1521:1521 -p 1522:1522 -p 8443:8443 -p 27017:27017 \ -e WORKLOAD_TYPE=ATP \ -e WALLET_PASSWORD='<WalletPwd>' \ -e ADMIN_PASSWORD='<AdminPwd>' \ --cap-add SYS_ADMIN --device /dev/fuse \ --hostname adbhost.lab.local \ container-registry.oracle.com/database/adb-free:latest-26ai
The ADMIN password needs 12–30 characters with upper case, lower case and a number, and cannot contain “admin”. --cap-add SYS_ADMIN --device /dev/fuse are needed because the container uses FUSE for its filesystem. For this specific lab run, I mapped host ports 1521, 1522, 8443 and 27017 to the same-numbered container ports. I verified the published mappings with podman port adb26ai and confirmed the listener inside the container with lsnrctl status LISTENER: TCP on 1521 and TCPS on 1522. Oracle’s current setup guide may show a different host-to-container mapping for its sample deployment, so check your actual container and listener rather than copying port assumptions blindly.
One thing that caught me: podman logs -f adb26ai never “finishes”. After ORDS reports the /ords/ pool as VALID, the log just carries on with normal alert-log activity. Press Ctrl+C and check health instead:
podman ps# STATUS: Up 20 minutes (healthy)

Open the required ports only on the trusted host-only lab network and configure the container to start with the VM. Before adding firewall rules, check which interfaces belong to each firewalld zone with firewall-cmd --get-active-zones. Apply the rules only to the zone containing the host-only interface; do not open these database, ORDS or MongoDB API ports on a public-facing interface. The per-port zone loop below is the recommended scoped form for readers; in my lab I used the simpler firewall command during setup.
# First confirm the active zones and their interfacesfirewall-cmd --get-active-zones# Recommended scoped form; replace YOUR_HOST_ONLY_ZONE with the zone assigned to the host-only interfacefor port in 1521 1522 8443 27017; do firewall-cmd --permanent --zone=YOUR_HOST_ONLY_ZONE --add-port=${port}/tcpdonefirewall-cmd --reload# Generate a unit for the existing container; do not recreate it on each startcd /etc/systemd/systempodman generate systemd --name adb26ai --files --new=falsesystemctl daemon-reloadsystemctl enable container-adb26ai.service
What this container is — and what it is not
“Zero cost” here means a local container, not a managed OCI Autonomous Database. Oracle positions the Free container image for development and testing, and it comes with fixed limits: 4 ECPUs, 20 GB of storage and a maximum of 30 simultaneous database sessions. Scaling CPU or storage is not available, and there is no automatic patching — newer versions are published to the container registry and you pull them yourself.
Persistence is the other thing to understand. I ran this lab container without a named volume, so its database files remained in the container’s writable layer. Stopping and starting that same container keeps the data, but removing the container and creating a replacement can lose it. For a new deployment, Oracle’s current guide recommends creating a named volume and mounting it at /u01/data. The guide also sets --shm-size=4g to provide shared-memory headroom for model loading and vector workloads. I did not use either option in this original lab run; the example below shows the recommended additions. Do not recreate an existing container just to add a volume without first planning and verifying a database backup or migration.
# Recommended for a new deployment; not used in this lab runpodman volume create OracleDBData# Add these options to the podman run command: --volume OracleDBData:/u01/data \ --shm-size=4g \
Part 3 — Make the Wallet Work from Another VM
mkdir -p /root/adb_walletpodman cp adb26ai:/u01/app/oracle/wallets/tls_wallet/. /root/adb_wallet/
The wallet copied from the container contains connection aliases that use localhost, which works inside the container VM but not from a separate client VM. On the ADB host, I edited this copied wallet’s tnsnames.ora (not the wallet inside the container) to use the host-only IP, keeping a .orig backup. I also set ssl_server_dn_match=no for this lab test. The certificate subject was checked on the ADB host with OpenSSL and returned CN = adb.lab.local. Use the actual certificate subject from your own deployment; do not assume it will match the container hostname.
After editing the copied wallet on the ADB host, copy it to the client VM. The following example uses dbhost1 as the client hostname; replace it with your own client host.
# On the ADB host VM, copy the edited wallet to the clientscp -r /root/adb_wallet oracle@dbhost1:/home/oracle/
On the client VM, create an isolated TNS directory for the LOW test alias. This keeps the client’s main wallet configuration separate from the test configuration.
# On the client VMmkdir -p /tmp/adb_tns_testcp /home/oracle/adb_wallet/tnsnames.ora /tmp/adb_tns_test/tnsnames.oracat > /tmp/adb_tns_test/sqlnet.ora <<'EOF'WALLET_LOCATION = (SOURCE = (METHOD = FILE) (METHOD_DATA = (DIRECTORY = /home/oracle/adb_wallet) ) )EOF# Use the certificate subject returned by:# openssl x509 -in /path/to/adb_container.cert -noout -subject# This lab certificate subject was CN=adb.lab.local; yours may differ.cat >> /tmp/adb_tns_test/tnsnames.ora <<'EOF'myatp_low_test = (description= (address=(protocol=tcps)(port=1522)(host=192.168.56.109)) (connect_data=(service_name=myatp_low.adb.oraclecloud.com)) (security=(ssl_server_dn_match=no)(SSL_SERVER_CERT_DN="CN=adb.lab.local")) )EOFTNS_ADMIN=/tmp/adb_tns_test tnsping myatp_low_test# Enter the ADMIN password when promptedTNS_ADMIN=/tmp/adb_tns_test sqlplus admin@myatp_low_test
select banner_full from v$version;select name, open_mode from v$pdbs;
Oracle AI Database 26ai Enterprise Edition Release 23.26.4.1.0 - ProductionNAME OPEN_MODE-------- ----------MYATP READ WRITE

Tip: I did not put TNS_ADMIN in the client’s .bash_profile. That VM also runs a Data Guard primary, and a global TNS_ADMIN would hide its normal network configuration. An alias keeps it scoped:
echo "alias adb='TNS_ADMIN=/home/oracle/adb_wallet sqlplus admin@myatp_low'" >> ~/.bashrc
Database Actions is available at https://<adbhost-ip>:8443/ords/sql-developer. After signing in as ADMIN, the Vector Database page shown in this lab can be opened at https://<adbhost-ip>:8443/ords/admin/_sdw/?nav=vector-db. Replace <adbhost-ip> with the IP address of the container VM. These URLs use the lab’s HTTPS endpoint; because its certificate is self-signed, the browser may display a security warning. The Vector Database path is a Database Actions page route and may vary with the installed ORDS/Database Actions version.

Part 4 — A Lab User
create user labuser identified by "<LabPwd>";grant db_developer_role to labuser;grant create mining model to labuser;alter user labuser quota unlimited on data;begin ords_admin.enable_schema( p_enabled => true, p_schema => 'LABUSER', p_url_mapping_type => 'BASE_PATH', p_url_mapping_pattern => 'labuser', p_auto_rest_auth => true); commit;end;/
Part 5 — AI Vector Search with an In-Database ONNX Model
A quick word on embeddings for readers new to this. An embedding model turns a piece of text into a fixed-length list of numbers — 384 of them for the model used here — that represents what the text means. Texts with similar meaning end up close together, so “find notes like this question” becomes a distance calculation that SQL can do. The goal of this part: generate those embeddings inside the database, with SQL, without calling any external API. Oracle provides a prebuilt, augmented version of the Hugging Face all-MiniLM-L12-v2 model in ONNX format for exactly this.
Two errors on the way
My first attempt used DBMS_VECTOR.LOAD_ONNX_MODEL_CLOUD with the object-storage link from Oracle’s original 2024 announcement blog. As LABUSER it failed with:
ORA-00904: "DBMS_CLOUD"."GET_OBJECT": invalid identifierORA-06512: at "SYS.DBMS_VECTOR", line 3819
LOAD_ONNX_MODEL_CLOUD calls DBMS_CLOUD internally, and the user had no execute privilege on it. The grant has to be run as ADMIN — running it from the LABUSER session gave a misleading ORA-00942 on C##CLOUD$SERVICE.DBMS_CLOUD$BASE.
grant execute on dbms_cloud to labuser;
With the grant in place, the call reached the network and failed again:
ORA-20011: Connect failed because target host or object does not exist.
The link in the old blog no longer resolves to an object. Oracle’s current AI models page (linked from the Vector Search documentation) now offers the model as a zip, all_MiniLM_L12_v2_augmented.zip, and the database cannot load a zip directly. So I downloaded and unzipped it on the VM and copied the .onnx file into the container’s DATA_PUMP_DIR.
Loading the model from a file
Find the directory path (as ADMIN) and give LABUSER access:
col directory_path format a70select directory_path from dba_directories where directory_name = 'DATA_PUMP_DIR';grant read, write on directory data_pump_dir to labuser;
On the VM, using the download link from Oracle’s AI models page:
mkdir -p /root/onnx && cd /root/onnxcurl -L -o all_MiniLM_L12_v2_augmented.zip "<download-link-from-oracle-ai-models-page>"unzip -o all_MiniLM_L12_v2_augmented.zip# all_MiniLM_L12_v2.onnx 128Mpodman cp all_MiniLM_L12_v2.onnx adb26ai:<DATA_PUMP_DIR-path>/podman exec -u 0 adb26ai chown oracle:oinstall <DATA_PUMP_DIR-path>/all_MiniLM_L12_v2.onnx
Then, as LABUSER:
exec dbms_vector.load_onnx_model('DATA_PUMP_DIR', 'all_MiniLM_L12_v2.onnx', 'ALL_MINILM_L12_V2');col model_name format a20col algorithm format a10col mining_function format a15select model_name, algorithm, mining_function from user_mining_models;
MODEL_NAME ALGORITHM MINING_FUNCTION-------------------- ---------- ---------------ALL_MINILM_L12_V2 ONNX EMBEDDING
Semantic search over DBA notes
To keep it relevant to my day job, the test data is a small table of DBA troubleshooting notes:
create table dba_notes ( id number generated always as identity primary key, title varchar2(200), note varchar2(4000), embed vector);insert into dba_notes (title, note) values('ORA-01555', 'Snapshot too old: undo retention too small or long running query, increase undo_retention or undo tablespace');insert into dba_notes (title, note) values('Archivelog full', 'Archive destination full, database hangs, clear space in FRA or increase db_recovery_file_dest_size');insert into dba_notes (title, note) values('adop fs_clone failure', 'EBS online patching fs_clone fails, check adop logs, disk space on run and patch file systems');insert into dba_notes (title, note) values('Data Guard lag', 'Standby apply lag high, check MRP process, network bandwidth and archive gap on standby');insert into dba_notes (title, note) values('Workflow mailer down', 'EBS workflow notification mailer not sending email, check SMTP server and mailer component status');insert into dba_notes (title, note) values('Tablespace full', 'ORA-01653 unable to extend table, add datafile or enable autoextend on the tablespace');commit;update dba_notesset embed = vector_embedding(all_minilm_l12_v2 using title || ' ' || note as data);commit;
Now ask questions in plain language, using wording that is deliberately different from the notes:
col title format a25col distance format 0.9999select title, round(vector_distance(embed, vector_embedding(all_minilm_l12_v2 using 'users cannot get emails from oracle apps' as data), cosine), 4) distancefrom dba_notesorder by distancefetch first 3 rows only;
TITLE DISTANCE------------------------- --------Workflow mailer down 0.6405Tablespace full 0.8137ORA-01555 0.8529
-- same query with: 'standby database is behind primary'TITLE DISTANCE------------------------- --------Data Guard lag 0.6044ORA-01555 0.7694Tablespace full 0.8022
“Behind” and “lag” share no characters, and “oracle apps” never appears in the Workflow note, yet both questions found the right note first with a clear gap to the next result. That is the whole point of embeddings: matching on meaning rather than keywords. With six rows this is a demonstration, not a benchmark, but it shows the full pipeline — model, vector column, distance search — running entirely in SQL.

Part 6 — JSON Relational Duality Views
Relational tables and JSON documents usually force a choice: normalized rows that are good for integrity and SQL reporting, or self-contained documents that application developers find easier to work with. A duality view removes that choice. The data is stored once, in ordinary tables with keys and constraints, and the view presents it as JSON documents that can be read and written directly. I modelled a tiny inventory of lab servers and the databases on them:
create table lab_servers ( server_id number primary key, hostname varchar2(50), ip_addr varchar2(20));create table lab_dbs ( db_id number primary key, db_name varchar2(30), version varchar2(20), server_id number references lab_servers);create or replace json relational duality view server_dv aslab_servers @insert @update @delete{ _id : server_id, hostname : hostname, ip : ip_addr, databases : lab_dbs @insert @update @delete [ { dbId : db_id, dbName : db_name, version : version } ]};
Insert JSON through the view — each document lands in both tables:
insert into server_dv values ('{"_id":1,"hostname":"dbhost1","ip":"10.0.0.11","databases":[{"dbId":101,"dbName":"CDB26","version":"23.26.1"}]}');insert into server_dv values ('{"_id":2,"hostname":"adbhost","ip":"10.0.0.12","databases":[{"dbId":201,"dbName":"MYATP","version":"23.26.4.1"}]}');commit;
Then change the data with plain relational SQL and read it back as JSON:
update lab_dbs set version = '23.26.4.1' where db_name = 'CDB26';commit;set long 2000col doc format a80select json_serialize(data pretty) doc from server_dv where json_value(data, '$._id') = 1;
{ "_id" : 1, "_metadata" : { "etag" : "83D06EAD5CC81CB678006ACC2E9026D2", "asof" : "00000000003F2090" }, "hostname" : "dbhost1", "ip" : "10.0.0.11", "databases" : [ { "dbId" : 101, "dbName" : "CDB26", "version" : "23.26.4.1" } ]}
The SQL update appears in the document immediately, and the etag changes with it. That etag is what gives duality views optimistic locking: a client that read the document before the update and tries to write back with the old etag is rejected instead of silently overwriting newer data.

Part 7 — The MongoDB API
The container exposes the Oracle Database API for MongoDB on port 27017. The schema needs the SODA role (as ADMIN):
grant soda_app to labuser;
Install mongosh from MongoDB’s repository and connect:
cat > /etc/yum.repos.d/mongodb-org-8.0.repo <<'EOF'[mongodb-org-8.0]name=MongoDB Repositorybaseurl=https://repo.mongodb.org/yum/redhat/8/mongodb-org/8.0/x86_64/gpgcheck=1enabled=1gpgkey=https://pgp.mongodb.com/server-8.0.ascEOFdnf install -y mongodb-mongosh# Enter the password at the prompt; do not put it in the command linemongosh --tlsAllowInvalidCertificates -u labuser 'mongodb://<adbhost-ip>:27017/labuser?authMechanism=PLAIN&authSource=$external&tls=true&retryWrites=false&loadBalanced=true'
mongosh reported Using MongoDB: 7.0.22 — the API version Oracle presents to the client. Run commands one line at a time; pasting several lines together made mongosh treat them as one JavaScript block and fail with “Missing semicolon”.
labuser> show collectionsSERVER_DV [view]labuser> db.server_dv.find({hostname: "adbhost"})[ { _id: 2, hostname: 'adbhost', ip: '10.0.0.12', databases: [ { dbId: 201, dbName: 'MYATP', version: '23.26.4.1' } ], ... }]
The duality view shows up as a collection. Now the other direction — write from Mongo:
labuser> db.server_dv.insertOne({_id: 3, hostname: "dbhost2", ip: "10.0.0.13", databases: [{dbId: 301, dbName: "CDB19", version: "23.26.1"}]}){ acknowledged: true, insertedId: 3 }
…and read it back with SQL:
col hostname format a15col db_name format a10col version format a12select s.hostname, d.db_name, d.versionfrom lab_servers s join lab_dbs d on d.server_id = s.server_idorder by s.server_id;
HOSTNAME DB_NAME VERSION--------------- ---------- ------------dbhost1 CDB26 23.26.4.1adbhost MYATP 23.26.4.1dbhost2 CDB19 23.26.1
One insertOne from a Mongo client became a row in lab_servers and a row in lab_dbs, with the foreign key in place.


Additional validation from an OL9.8 client
After the original walkthrough, I ran an additional connectivity and CRUD check from a separate Oracle Linux 9.8 client VM. I installed mongodb-mongosh 2.14.3 from the MongoDB 8.0 repository (the package reported as 2.14.3-1.el8). This installs the MongoDB Shell client only; it does not install a MongoDB Server. The endpoint tested here is Oracle AI Database 26ai’s MongoDB-compatible API on port 27017, not the separate MongoDB Server used elsewhere in my lab. The API identified itself to mongosh as MongoDB-compatible version 7.0.22.
I also rechecked wallet connectivity from the separate OL9.8 client. The listener inside the container showed TCP on port 1521 and TCPS on port 1522. The original myatp_low and myatp_tp aliases worked from the client after I edited the copied wallet’s tnsnames.ora on the ADB host to replace localhost with the host-only IP and set DN matching off, retaining the original file as tnsnames.ora.orig. The separate myatp_low_tls alias used TCPS port 1521 and failed with an SSL handshake error; the listener’s TCPS endpoint was on port 1522. For an isolated re-test, I created myatp_low_test under /tmp/adb_tns_test and pointed its sqlnet.ora to the copied wallet.
# Enter the database password when promptedmongosh --tlsAllowInvalidCertificates -u admin 'mongodb://<adbhost-ip>:27017/admin?authMechanism=PLAIN&authSource=$external&ssl=true&retryWrites=false&loadBalanced=true'# In mongoshdb.runCommand({ ping: 1 })# { ok: 1 }
The ping returned { ok: 1 }. I then created a small test collection and inserted and retrieved a document through the API:
use labdbdb.createCollection("employees")db.employees.insertOne({ emp_id: 101, name: "Lab DBA", role: "Oracle DBA", technology: "Oracle AI Database 26ai"})db.employees.find()
The collection creation succeeded, the insert returned acknowledged: true, and find() returned the inserted document. This is a direct MongoDB API CRUD smoke test. It is separate from the earlier SERVER_DV JSON Relational Duality View demonstration, where a MongoDB API insert was reflected in the underlying relational tables and then queried with SQL. For this lab connection I used --tlsAllowInvalidCertificates because the endpoint uses a lab certificate; this is a testing shortcut only. In a production environment, configure certificate trust and hostname validation instead.
Gotchas Worth Remembering
- Always Free 26ai depends on region availability. The local Free container is a development and test environment, not a managed OCI Autonomous Database service.
- Check the real listener and published ports. Use
podman porton the VM andlsnrctl status LISTENERinside the container. - Protect database persistence. This original lab run did not use a named volume; removing and recreating the container can lose its database state.
- Check the TCPS port in the alias. The
myatp_low_tlsalias pointed to TCPS port1521and failed with an SSL handshake error; the listener’s TCPS endpoint was on port1522. - Scope firewall rules to the host-only network. Do not expose database, ORDS or MongoDB API ports publicly.
- Keep
TNS_ADMINscoped per command. The client VM also hosts another database environment. - MongoDB API authentication is not ordinary MongoDB SCRAM. Oracle’s API uses
authMechanism=PLAIN,authSource=$externaland TLS.
Wrapping Up
ما شاء الله, in one afternoon a single VM went from a cloned base image to a working Autonomous AI Database 26ai — newer than both my cloud instance and my other lab databases — with in-database vector search, duality views and Mongo compatibility all tested end to end, at no cost.
The vector search piece is the one I will build on next. A table of DBA notes searchable by meaning is the foundation of the troubleshooting assistant I am working on in this lab, and keeping the embedding model inside the database means no data leaves it.
This is a lab build. The container image is intended for development and testing, and shortcuts like disabling DN matching and using a self-signed certificate do not belong in production.
References and Further Reading
- Oracle: Autonomous AI Database Free Container (current setup guide, named volume and shared-memory options)
- Oracle: Understanding Container Setup Configuration (container parameters and persistent storage)
- Oracle REST Data Services: Enabling and Configuring the Oracle Database API for MongoDB
- MongoDB: mongosh documentation

Leave a Reply