🤩 Free Oracle Database: Download, Install, Tutorial… My Getting Started Guide 🚀🦭🐳
Tags: learning, sql, quickinstall, oracle
Published: 2024-03-25 08:45:44

**TL;DR — In this post, I share the tricks I’ve learned for getting started fast with the Oracle Database for free.**

---

## Download, Install: Free and Fast

Here are the 2 paths I use when speed is needed:

- Free Oracle Database 23c Free container image (_more in this post_)
- Free Oracle Autonomous Database 19c/21c (_requires an Oracle Cloud Infrastructure Always Free account and an Internet connection)

## Free Oracle Database 23c Free container image

Given you have a running Podman or Docker setup for x86_64 architecture (I work on both Linux and Windows), you can start an Oracle database 23c in less than 2 minutes (depending upon your Internet bandwidth) using this command:

```bash
podman run --rm --name oracle -p 1521:1521 \
       -e ORACLE_PASSWORD=free \
       gvenzl/oracle-free:23-slim
```

Gerald Venzl maintains [images](https://github.com/gvenzl/oci-oracle-free) with different characteristics (full, regular, slim; normal or faststart; for 21c and 23c versions).

When the container is up and running, you get a Pluggable Database (aka PDB) named **freepdb1** which is ready to accept your commands.

## Oracle SQL Developer Extension for VSCode or SQLcl

The very next step is to get this SQL Developer extension:

![Oracle SQL Developer Extension for VSCode](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/8ierqp33ibjayn04axkq.png)

This is the next generation of **SQL Developer**. Over time all features will be there with additional ones.

If you are more in the CLI team, you can get the [latest](https://download.oracle.com/otn_software/java/sqldeveloper/sqlcl-latest.zip) version of SQLcl in one click. This requires a JDK 11 or 17. In case you didn’t know, SQLcl is the next generation of sqlplus, developed by the same team as SQL Developer; bringing console history, and powerful commands (Liquibase integration for changes management, DDL generation, formats conversion, color display, auto-completion, _repeat_ command, status bar, vi mode, etc.). There is also a possibility to integrate JavaScript based plugins.

![SQLcl syntax highlighting and status bar](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/e23xay6tnknxv9z08q40.png)

Jeff Smith has [a lot to share](https://www.thatjeffsmith.com/archive/2023/08/your-ideal-oracle-database-command-line-experience/) about SQLcl and the SQL Developer extension.

## Create a User and connect to your Database

With the SQL Developer extension or SQLcl, you can now access your running Pluggable Database to create the user account you’ll use to develop your application.

This step requires some kind of root access (as for Linux). The root user of an Oracle database is named **SYS** and can use the highest privileges SYSDBA. Hence let’s register a new Connection in SQL Developer extension (remember password is `free`):

![Registration of a connection to SYS as SYSDBA privileged user.](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/8z99uvxr3wyxjpyub4j0.png)

Now you can connect to the database and open an SQL Worksheet:

![Connect by clicking on the connection name and then open an SQL Worksheet to run SQL commands.](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/pd655077pjf0x5j4vhrm.png)

Copy and paste the SQL commands below:

```sql
create user developer identified by "free";

-- no quota on USERS tablespace
alter user developer quota unlimited on users;

-- quick setup for developers
grant DB_DEVELOPER_ROLE to developer;

-- To drop: drop user developer cascade;
```

Running the script with F5 will create a user named `developer` with `free` as its password. It grants unlimited quota on the `USERS` tablespace (so you can insert data) and the new 23c `DB_DEVELOPER_ROLE` role is granted; it provides just enough privileges to let you develop and use numerous capabilities.

## DONE

You now just need to register a new connection for this newly created `developer` user and you’re done, you can now connect to your Pluggable Database and create tables, views, sequences, JSON collections, etc.

Following are some links to continue your journey:

- [SQL Reference Guide](https://docs.oracle.com/en/database/oracle/oracle-database/23/sqlrf/Changes-in-This-Release-for-Oracle-Database-SQL-Language-Reference.html)
- [New 23c Features](https://docs.oracle.com/en/database/oracle/oracle-database/23/nfcoa/introduction.html)
- [My blog post about the JDBC driver](https://medium.com/db-one/oracle-jdbc-drivers-a84e2b5f7eb9)
- Tutorials: [LiveLabs](https://apexapps.oracle.com/pls/apex/f?p=133%3A100%3A101089681582464%3A%3A%3A%3ASEARCH%3A23c) and [LiveSQL](https://livesql.oracle.com/)

Happy dev!