Install Oracle 23ai Database on Macbook

Installing Oracle Database 23ai on ARM Macs with Sample Schemas

The M-series chips combine the CPU, GPU, and Neural Engine on a single chip, facilitating software development and AI/ML tasks. Many development tools and creative software have been optimized for the M-series, resulting in faster build times, smoother performance, and better overall efficiency. Also M-series chips are known for their long battery life. Macbook Air M1 battery lasts for 18 hours and this post is written on a Macbook Air M1. It looks like a marketing post so far.

In the Stack Overflow Developer Survey, macOS consistently ranks as second for popular operating systems among developers. Many programming languages and frameworks, including Python, Node.js, Docker, and Kubernetes now offer native support for M-series chips.

Finally announced on November 12, 2024, Oracle’s release of the 23ai database container images now enables us to create a test environment within seconds.

Two types of the image are currently available :

The Full image: supports all the database features provided by Oracle Database 23ai Free.
The Lite image: smaller image size with a stripped-down installation of the database.
The Lite image has a smaller storage footprint than the Full image (~80% image size reduction) and a substantial improvement in image pull time. This image is useful in CI/CD scenarios and for simpler use cases where advanced database features are not required.

I will provide all the steps and use the Full image. You may also refer to Oracle Database 23ai (23.5.0.0) Free Container Image Documentation for more information.

You may also run Step 2 directly without running Step 1. With docker run command, if image is not available it will be pulled from repository.

With this command it will start an Oracle 23ai database with ORACLE_SID = FREE and with a pluggable database in it with ORACLE_PDB_SID=FREEPDB1. It will be listening on port 1521 by default. But we will mapping port 1426 on the host machine to port 1521 in the container. Since my school number is 1426, we will be using it.

If you want to use The Lite image, replace the container-registry.oracle.com/database/free:latest value with container-registry.oracle.com/database/free:latest-lite

Add the downloaded directory to your PATH variable to in .zsh_profile.

We will connect to the database using SQLcI with the command provided below.

In Oracle Database 23ai, creating sample schemas has become significantly easier compared to older versions. Order Entry(OE) and Product Media (PM) schemas has been archived.

In earlier releases of Oracle Database, setting up sample schemas like HR, SH, OE, IX, BI, and PM required additional steps. I relied on a pre-exported dump file (e.g., Sampleschemas.dmp) to import these schemas into the database. This process, while effective, involved several manual steps, including setting up directories and importing the dump file.

Oracle Database 23ai simplifies the process, making it more straightforward to create and configure these schemas. Now we have three sample schemas. HR,CO and SH. Instead of relying on an external dump file, I now use commands provided below. We will use Oracle Database 23ai Sample Schemas – Installation of Sample Schemas as a reference.

With native ARM support, Mac developers can now create test environments just in seconds, taking full advantage of Oracle Database 23ai. Sample schemas like HR, SH and CO are invaluable for developers and database administrators to test features, demonstrate use cases, and experiment with various database functionalities. These schemas are pre-populated with realistic sample data to simulate real-world scenarios.

Hope it helps.


Discover More from Osman DİNÇ


Comments

Leave your comment