Oracle Database 23ai Free on Oracle Linux 8 on Azure User Guide
Overview
This guide covers deploying cloudimg's Oracle Database Free image on Oracle Linux 8 from the Azure Marketplace. The image ships Oracle AI Database 26ai Free, release 23.26 (Oracle's current Free release and the direct successor of Oracle Database 23ai Free) with a ready-to-use container database and pluggable database. The database starts automatically at boot and every VM gets its own randomly generated passwords on first boot.
What's included in this VM image:
- Oracle AI Database 26ai Free 23.26 (64 bit) installed at
/opt/oracle/product/26ai/dbhomeFree FREEcontainer database with theFREEPDB1pluggable database, open read write- Oracle Listener on TCP port 1521, listening on all interfaces
- Database and listener started automatically at boot (
oracle-free-26aiservice) - Per-VM passwords for
SYS,SYSTEMandPDBADMIN, generated on first boot - SQL*Plus and SQLcl, with SQLcl and the database tools running on the operating system's OpenJDK 17 (patched with normal
dnfupdates) - AI Vector Search, JSON Relational Duality and Operational Property Graph
- Oracle Linux 8.10, fully patched at build time, Hyper-V Gen2
- 24/7 cloudimg support
Default user: azureuser · CDB: FREE · PDB: FREEPDB1 · Port: 1521
Prerequisites
- An active Microsoft Azure subscription
- An SSH key pair
- A Network Security Group rule allowing TCP 22 (and TCP 1521 only from your trusted IP if you will connect remotely)
Step 1: Deploy the virtual machine
Find Oracle DB 23ai Free on OL8 by cloudimg in the Azure Marketplace and select Create. Choose a resource group and region, a size of at least Standard_D2s_v3 (2 vCPU, 8 GB RAM), azureuser as the username and your SSH public key. Review and create.
With the Azure CLI:
az vm create \
--resource-group my-rg \
--name oracle-free \
--image <marketplace image URN> \
--size Standard_D2s_v3 \
--admin-username azureuser \
--ssh-key-values ~/.ssh/id_rsa.pub
Step 2: Connect over SSH
ssh azureuser@<vm-public-ip>
The first boot starts the database and generates the passwords. This takes two to five minutes after the VM is created. Check that it has finished:
sudo systemctl status oracle-free-firstboot.service --no-pager
The service shows active (exited) when the credentials are ready.
Step 3: Read your credentials
sudo cat /stage/scripts/oracle-database-credentials.log
The file is readable only by root and lists the SYSTEM, SYS and PDBADMIN passwords for this VM. Change them after your first login (see Step 7).
Step 4: Connect locally with SQL*Plus
sudo su - oracle
sqlplus / as sysdba
SELECT name, open_mode FROM v$pdbs;
SELECT version_full FROM v$instance;
Connect to the pluggable database as SYSTEM:
sqlplus system@//localhost:1521/FREEPDB1
SQLcl is also available as sql for the oracle user:
sql system@//localhost:1521/FREEPDB1
Step 5: Connect remotely
Add an inbound NSG rule for TCP 1521 restricted to your own IP address, then connect from SQL Developer, SQLcl or any Oracle client with:
- Host: the VM's public IP
- Port:
1521 - Service name:
FREEPDB1 - User:
SYSTEM(or an application user you create)
Never open port 1521 to the whole internet.
Step 6: Manage the database service
sudo /etc/init.d/oracle-free-26ai status
sudo /etc/init.d/oracle-free-26ai stop
sudo /etc/init.d/oracle-free-26ai start
The service is enabled at boot, so the database and listener come back automatically after a restart.
Step 7: Change passwords and create an application user
-- as SYSDBA in the CDB
ALTER USER SYSTEM IDENTIFIED BY "<new password>";
ALTER USER SYS IDENTIFIED BY "<new password>";
-- create an application user in the PDB
ALTER SESSION SET CONTAINER = FREEPDB1;
CREATE USER appuser IDENTIFIED BY "<password>" QUOTA UNLIMITED ON USERS;
GRANT DB_DEVELOPER_ROLE TO appuser;
Free edition limits
Oracle Database Free is limited by Oracle to 2 CPU threads, 2 GB of database RAM and 12 GB of user data. It is licensed under the Oracle Free Use Terms and Conditions. For larger workloads move to a licensed Oracle Database edition.
Keeping the system up to date
sudo dnf -y upgrade
This also updates the OpenJDK used by SQLcl and the database tools. Oracle Database Free itself is updated by Oracle as new Free releases; to move to a newer release, export your data and import it into a new VM.
Troubleshooting
- Credentials file still shows a placeholder: the first boot is still running. Wait a few minutes and check
sudo journalctl -u oracle-free-firstbootand/var/log/oracle-free-firstboot.log. - Cannot connect remotely: confirm the NSG allows TCP 1521 from your IP and that
sudo ss -tlnp | grep 1521shows the listener. - Listener status:
sudo su - oracle -c 'lsnrctl status'
Support
cloudimg provides 24/7 support for this image. Email support@cloudimg.co.uk with your VM details and a description of the issue.