Sub topic 1
Three free ways to get an Oracle database
This chapter compares three no-cost ways to get a working Oracle Database for practice, and shows how to start the two that need setup.
Prerequisites
You should already be comfortable with these:
- Basic SQL, including
SELECT,INSERT, andCREATE TABLE - Running commands in a terminal
- The client-server model, where a client program connects to a database server
- Docker or Podman, for the local container option only
Three free options
| Option | Setup effort | Control | Typical use |
|---|---|---|---|
| FreeSQL | None, runs in a browser | Low | Quick queries and saved scripts |
| Oracle Database 26ai Free in a container | Moderate, runs on your machine | High | Local development and testing |
| Always Free Autonomous Database | Low, hosted by Oracle Cloud | Medium | Cloud-style practice with a web console |
FreeSQL: SQL in the browser
FreeSQL is a free web page that runs SQL against an Oracle database hosted for you. You open the site, write a statement, and run it. Nothing is installed.
Use FreeSQL when you want to test a query in minutes. Do not rely on it for long-term work. Saved scripts and data can be removed, so keep copies of anything important.
Running Oracle Database 26ai Free in a container
Oracle Database Free is a no-cost edition of Oracle Database 26ai. A container packages the database and its dependencies so you can run it without a full installation. The following command starts the database and publishes its listener port, 1521.
docker run -d --name oracle-free \
-p 1521:1521 \
-e ORACLE_PWD='ChangeMe_123' \
container-registry.oracle.com/database/free:latestThe first start creates the database, which takes several minutes. Watch the log until it reports that the database is ready:
docker logs -f oracle-freeOnce the database is ready, connect to the pluggable database FREEPDB1. The container database (CDB) holds FREEPDB1, and most practice work belongs there.
> Note: Replace ChangeMe_123 with your own password before you run the command.
The container image is large and the first start is slow. If the log shows no progress for a long time, check that Docker has enough disk space and memory.Exercise
Exercise
Which option requires no installation, and why would you still back up important scripts when you use it?
Show answer
FreeSQL requires no installation because it runs in the browser. Keep backups because saved scripts and data on a free hosted service can be removed, so a local copy protects your work.