Every semester, the same thing happens.
The university assignment drops. It says: "Use Oracle SQL. No PostgreSQL. No MySQL. Oracle specifically." And then half the class spends their first week not learning SQL — they spend it fighting a broken installer, corrupted Oracle setup files, missing Java dependencies, and a setup guide written in 2009.
I've been there. I work with databases professionally and even I found the native Oracle installer on Windows annoying. For a first-year student touching SQL for the first time? It's a genuine nightmare.
So here's what actually works: Docker. You run Oracle in a container, connect with a proper GUI tool, and you're writing real SQL in 5 minutes. No broken installation. No corrupted registry. Nothing permanently burned into your PC.
But before the setup — a small note.
A Word About Your OS Choice
I run Linux. Have been for years. And every time I help a classmate debug an Oracle installation failure at 2am, that failure is always on Windows.
Linux just works differently. Package managers are open. The terminal is a first-class citizen. Docker runs natively without a translation layer. When something breaks, you understand it and fix it — you don't reinstall and pray.
I'm not here to force you to switch today. But if you've been curious about Linux — Ubuntu, Fedora, Arch, whatever calls to you — this is exactly the kind of workflow where you'll feel the difference. Every Docker command in this guide runs cleaner on Linux. Every terminal shortcut. Every file path. It's a different experience.
The tools we're using — Docker, DBeaver, Beekeeper Studio — are all open source or open core. They don't lock you in. They don't require a license. They don't phone home. They work on any OS. That's intentional. That's the value of building on open foundations.
If this guide converts even one person to trying Linux alongside their studies — worth it.
Now. Let's get Oracle running.
What You'll Need
1. Docker — docker.com
Runs Oracle in an isolated container. Think of it as a lightweight virtual machine that starts in seconds.
- Linux: Install Docker Engine directly — no "Desktop" wrapper needed, runs natively
- Windows / Mac: Install Docker Desktop — handles everything for you
🐧 Linux one-liner:
# Ubuntu / Debian sudo apt install docker.io # Fedora sudo dnf install dockerNo 1.5 GB installer. Just a package. That's the Linux flex right there.
2. A database GUI — pick one:
- Beekeeper Studio → beekeeperstudio.io — Clean, fast, beginner-friendly. Free community edition. Recommended.
- DBeaver → dbeaver.io — Heavier but works on everything. If Beekeeper won't open on your machine (it happens on some PCs), use this.
Both are free and open source. No trial period. No "sign in to continue." Just install and go.
Step 1 — Launch Oracle with One Command
Make sure Docker is running, then open your terminal and run:
Linux / Mac (multi-line, easier to read):
docker run -d \
-p 1521:1521 \
-e ORACLE_PASSWORD=password \
-v oracle-volume:/opt/oracle/oradata \
--name oracle-free \
--restart unless-stopped \
gvenzl/oracle-free
Windows CMD / PowerShell (Run with Administrator mode) — paste as a single line (backslash continuation doesn't work on Windows):
docker run -d -p 1521:1521 -e ORACLE_PASSWORD=password -v oracle-volume:/opt/oracle/oradata --name oracle-free --restart unless-stopped gvenzl/oracle-free
Same command. Same result. Two formats.
What each part means:
docker run → create and start a new container
-d → detached: run in background, get terminal back
-p 1521:1521 → port mapping: your-machine:inside-container
-e ORACLE_PASSWORD=password → set the database password
-v oracle-volume:/opt/... → named volume: data survives container restarts
--name oracle-free → give it a name you can reference later
--restart unless-stopped → auto-start Oracle when your PC reboots
gvenzl/oracle-free → the Docker image (lean, well-maintained Oracle Free)
First run downloads the image (~1–2 GB depending on your internet). Go make tea. After that, future starts are instant.
Step 2 — Wait for Oracle to Be Ready
The container starts immediately, but Oracle itself needs 60–90 seconds to fully initialize inside.
Watch the logs:
docker logs -f oracle-free
You'll see a wall of output. Wait for this:
#########################
DATABASE IS READY TO USE!
#########################
Once you see it, Oracle is fully up. Press Ctrl+C to exit the log view — Oracle keeps running in the background.
Step 3 — Enter Oracle Directly from the Terminal
Before we open any GUI, let me show you the powerful way.
You can open a live SQL session inside the container with:
docker exec -it oracle-free sqlplus system/password@FREEPDB1
Breaking this down:
docker exec → run a command inside an already-running container
-i → interactive: keep stdin open so you can type
-t → tty: allocate a terminal so it feels like a real shell
oracle-free → name of the container to enter
sqlplus → Oracle's command-line SQL client (already inside the container)
system/password → username / password
@FREEPDB1 → the Oracle service/pluggable database to connect to
Your prompt changes to:
SQL>
You're now inside Oracle. Type SQL directly and press Enter:
SQL> SELECT 'Hello from inside Oracle!' AS msg FROM dual;
MSG
-------------------------
Hello from inside Oracle!
SQL> EXIT
Type EXIT to leave. You're back to your normal terminal. Oracle is still running.
You can also drop into a full bash shell inside the container:
docker exec -it oracle-free bash
This gives you a Linux shell inside the container — you can explore the Oracle file system, check configs, run any Linux command. Type exit to come back out.
[oracle@abc123 ~]$ ← you're inside the container now
[oracle@abc123 ~]$ exit
$ ← back to your machine
This is how real server administration works. You SSH (or exec) into a machine and run things. Docker gives you that same model locally.
Step 4 — Connect with Beekeeper Studio or DBeaver
For your assignment work — writing, testing, running SQL with a proper editor — the GUI is your home.
Connection details — use these exactly:
| Field | Value |
|---|---|
| Database type | Oracle |
| Host | localhost |
| Port | 1521 |
| Username | SYSTEM |
| Password | password |
| Service Name | FREEPDB1 |
⚠️ Service Name must be
FREEPDB1— not blank, notXE, notFREE. ExactlyFREEPDB1.
Beekeeper Studio: New Connection → Oracle → fill in the fields → Test → Save & Connect.
DBeaver: New Database Connection → search Oracle → fill in fields → Test Connection (it will auto-download the Oracle JDBC driver if needed — allow it) → Finish.
You'll see the database tree on the left. You're in.
Step 5 — Basic SQL for Your Assignment
Here's the essential SQL you'll need. This covers 90% of university assignments.
Create a table
CREATE TABLE students (
id NUMBER GENERATED ALWAYS AS IDENTITY PRIMARY KEY,
name VARCHAR2(100) NOT NULL,
roll_no VARCHAR2(20) UNIQUE,
dept VARCHAR2(50),
cgpa NUMBER(3,2)
);
📝 Oracle uses
VARCHAR2, notVARCHAR.NUMBER, notINT. Oracle-specific data types — this is exactly why assignments require Oracle.
Insert data
INSERT INTO students (name, roll_no, dept, cgpa)
VALUES ('Habibullah', 'CSE-2201', 'Computer Science', 3.85);
INSERT INTO students (name, roll_no, dept, cgpa)
VALUES ('Motiur Rahman', 'CSE-2202', 'Computer Science', 3.70);
INSERT INTO students (name, roll_no, dept, cgpa)
VALUES ('Fatima Begum', 'EEE-2201', 'Electrical Engineering', 3.90);
COMMIT;
⚠️
COMMITis required in Oracle to save your changes permanently. Without it, changes only exist in your current session.
SELECT — retrieve data
-- All rows, all columns
SELECT * FROM students;
-- Specific columns only
SELECT name, roll_no, cgpa FROM students;
-- Filter with WHERE
SELECT name, cgpa
FROM students
WHERE dept = 'Computer Science';
-- Sort results
SELECT name, cgpa
FROM students
ORDER BY cgpa DESC;
-- Multiple conditions
SELECT name, cgpa
FROM students
WHERE dept = 'Computer Science'
AND cgpa >= 3.80;
UPDATE and DELETE
-- Update a specific row
UPDATE students
SET cgpa = 3.95
WHERE roll_no = 'CSE-2201';
COMMIT;
-- Delete a row
DELETE FROM students
WHERE roll_no = 'EEE-2201';
COMMIT;
Create a second table and JOIN
CREATE TABLE courses (
course_id NUMBER GENERATED ALWAYS AS IDENTITY PRIMARY KEY,
course_name VARCHAR2(100),
dept VARCHAR2(50),
credits NUMBER
);
INSERT INTO courses (course_name, dept, credits) VALUES ('Database Systems', 'Computer Science', 3);
INSERT INTO courses (course_name, dept, credits) VALUES ('Data Structures', 'Computer Science', 3);
INSERT INTO courses (course_name, dept, credits) VALUES ('Circuit Analysis', 'Electrical Engineering', 3);
COMMIT;
-- JOIN students to their department's courses
SELECT s.name, s.roll_no, c.course_name, c.credits
FROM students s
JOIN courses c ON s.dept = c.dept
ORDER BY s.name;
Aggregates — GROUP BY, COUNT, AVG
-- Count students per department
SELECT dept, COUNT(*) AS total_students
FROM students
GROUP BY dept;
-- Average CGPA per department, only show above 3.5
SELECT dept, ROUND(AVG(cgpa), 2) AS avg_cgpa
FROM students
GROUP BY dept
HAVING AVG(cgpa) > 3.5;
Oracle-specific utilities
-- DUAL: Oracle's special dummy table for single-row expressions
SELECT SYSDATE FROM dual; -- current date and time
SELECT UPPER('hello world') FROM dual;
SELECT 100 * 3.14 FROM dual;
-- See what tables you've created
SELECT table_name FROM user_tables;
-- Describe a table's structure
DESCRIBE students;
The Complete Docker Command Reference
Every Docker command you'll need for managing your Oracle container:
┌─────────────────────────────────────────────────────────────────┐
│ CONTAINER LIFECYCLE │
├─────────────────────────────┬───────────────────────────────────┤
│ Create + start Oracle │ docker run -d ... (Step 1 cmd) │
│ Start an existing container │ docker start oracle-free │
│ Stop Oracle │ docker stop oracle-free │
│ Restart Oracle │ docker restart oracle-free │
│ Delete the container │ docker rm oracle-free │
│ (stop it first!) │ → data in volume is kept safe │
└─────────────────────────────┴───────────────────────────────────┘
┌─────────────────────────────────────────────────────────────────┐
│ STATUS & MONITORING │
├─────────────────────────────┬───────────────────────────────────┤
│ See running containers │ docker ps │
│ See ALL containers │ docker ps -a │
│ Live log stream │ docker logs -f oracle-free │
│ Last N lines of logs │ docker logs --tail 50 oracle-free │
│ Full container info │ docker inspect oracle-free │
│ Resource usage │ docker stats oracle-free │
└─────────────────────────────┴───────────────────────────────────┘
┌─────────────────────────────────────────────────────────────────┐
│ TERMINAL ACCESS │
├─────────────────────────────┬───────────────────────────────────┤
│ SQL*Plus session │ docker exec -it oracle-free \ │
│ │ sqlplus system/password@FREEPDB1│
│ │ │
│ Bash shell inside │ docker exec -it oracle-free bash │
│ │ │
│ Quick one-off SQL │ docker exec oracle-free sqlplus \ │
│ (non-interactive) │ -S system/password@FREEPDB1 \ │
│ │ <<< "SELECT SYSDATE FROM dual;" │
└─────────────────────────────┴───────────────────────────────────┘
┌─────────────────────────────────────────────────────────────────┐
│ DATA & VOLUMES │
├─────────────────────────────┬───────────────────────────────────┤
│ List all volumes │ docker volume ls │
│ Inspect data volume │ docker volume inspect oracle-volume│
│ Delete data volume │ docker volume rm oracle-volume │
│ ⛔ THIS DELETES ALL DATA │ Only do this to fully reset │
└─────────────────────────────┴───────────────────────────────────┘
┌─────────────────────────────────────────────────────────────────┐
│ IMAGES │
├─────────────────────────────┬───────────────────────────────────┤
│ List downloaded images │ docker images │
│ Pull latest Oracle image │ docker pull gvenzl/oracle-free │
│ Remove image from disk │ docker rmi gvenzl/oracle-free │
└─────────────────────────────┴───────────────────────────────────┘
The full workflow, from zero to SQL:
┌──────────────────────┐
│ docker pull │ ← first time only
│ gvenzl/oracle-free │ (~1-2 GB download)
└──────────┬───────────┘
│
▼
┌──────────────────────┐
│ docker run -d ... │ ← creates + starts container
│ --name oracle-free │
└──────────┬───────────┘
│
▼
┌──────────────────────┐
│ docker logs -f │ ← wait for:
│ oracle-free │ DATABASE IS READY TO USE!
└──────────┬───────────┘
│
┌──────────────┴──────────────┐
│ │
▼ ▼
┌──────────────────┐ ┌──────────────────────┐
│ docker exec -it │ │ Beekeeper Studio │
│ oracle-free │ │ or │
│ sqlplus ... │ │ DBeaver │
└────────┬─────────┘ └──────────┬───────────┘
│ │
▼ ▼
SQL> prompt SQL editor tab
(terminal / CLI) (visual / GUI)
│ │
└──────────────┬───────────────┘
│
▼
┌────────────────────────┐
│ Write and run SQL │
│ CREATE TABLE ... │
│ INSERT INTO ... │
│ SELECT * FROM ... │
└────────────────────────┘
│
┌───────────┴──────────┐
│ When done today: │
▼ ▼
docker stop docker start
oracle-free oracle-free
(next session)
Common Issues & Fixes
"Port 1521 is already in use"
Something else is occupying that port. Change -p 1521:1521 to -p 1522:1521 in your run command, and update the port field to 1522 in your GUI connection.
Beekeeper Studio won't launch on my PC
Use DBeaver. It's heavier but runs on everything.
ORA-12514: listener does not know of service FREEPDB1
Oracle isn't fully initialized yet. Run docker logs -f oracle-free and wait until you see DATABASE IS READY TO USE.
ORA-01017: invalid username/password
Username: SYSTEM (all caps). Password: password. Service: FREEPDB1. Check for typos.
docker: command not found on Linux
Docker isn't installed or the service isn't running:
sudo systemctl start docker
sudo systemctl enable docker # auto-start on boot
sudo usermod -aG docker $USER # run docker without sudo
# → log out and back in for the group change to apply
Container disappeared after PC restart
The --restart unless-stopped flag handles auto-start. If you removed it manually, re-run the Step 1 command. Your data is safe in the oracle-volume volume unless you explicitly deleted it.
Why Docker Beats the Native Installer
The official Oracle installer:
- 4–8 GB download
- Requires specific Visual C++ redistributables on Windows
- Conflicts with existing Java installations sometimes
- Occasionally fails silently with no clear error
- Permanently modifies your system files
- Doesn't fully uninstall
Docker:
- First download ~1–2 GB, then instant starts forever after
- Fully isolated — zero changes to your actual system
- Full wipe and reinstall takes 30 seconds
- Identical behavior on Windows, Mac, and Linux
- Cleanup:
docker rm oracle-free && docker volume rm oracle-volume— completely gone
And on Linux? Docker runs natively. No Desktop app. No virtualization layer. Just a container running directly on the kernel. Faster. Cleaner. The way it's meant to run.
One Last Thing
You just set up Oracle using Docker — an open-source container runtime. Connected with Beekeeper Studio or DBeaver — open-source tools. On a workflow that runs best on a free, open-source operating system.
You paid nothing. You need no Windows license to run a database. You waited 5 minutes, not 5 hours.
That's the open-source stack. That's what Linux gives you daily. The tools that professional developers use aren't locked behind expensive licenses — they're free, community-maintained, and they run better on open systems.
If this guide saved you an afternoon of installation frustration — share it with your classmates. Alhamdulillah, that's the whole point.
Got stuck at any step? Drop the exact error message in the comments — I'll help you through it.
Top comments (0)