Run Oracle Database on Oracle Linux for Arm

2
0
Send lab feedback

Run Oracle Database on Oracle Linux for Arm

Introduction

Oracle Database 19c Enterprise Edition, the current long-term support release of Oracle Database, is now certified and available on the popular Arm architecture for cloud and on-premises deployments.

The Oracle Cloud Infrastructure (OCI) Ampere A1 compute platform provides deterministic performance, linear scalability, and an energy-efficient, sustainable, eco-friendly design for Oracle Database customers. Building applications is free to try, easy to learn, and fast to explore.

This tutorial uses the container method to install Oracle Database 19c on Oracle Linux on an OCI Ampere A1 compute instance.

For help outside of this lab environment, see the Oracle Database server Release 19c documentation .

Objectives

In this lab, you'll learn how to:

  • Install Oracle Database 19c using Podman
  • Connect to Oracle Database 19c using SQL*Plus

Prerequisites

  • A system running Oracle Linux

Accept the Oracle Standard Terms and Restrictions

Use of the Oracle Database image requires the acceptance of the Oracle Standard Terms and Restrictions.

  1. Open a browser and go to https://container-registry.oracle.com .

    oracle-container-registry-website

  2. Click the Sign In button in the upper right corner of the site.

    site-sign-in-button

    Authenticate using your Oracle Single Sign On credentials.

  3. Click the Database tile to access the various Oracle Database images.

    oracle-database-tile

  4. Under the Repository column, click the enterprise link.

    enterprise-repo-link

  5. Select your language in the informational tile on the right and click the Continue button.

    info-tile

  6. Read and scroll through the Oracle Standard Terms and Restrictions pop-up window.

  7. Click the Accept button at the bottom of the pop-up window.

  8. Verify the acceptance of the Oracle Standard Terms and Restrictions.

    The informational tile should now display a green circle with a white check and the date and time of your last acceptance.

    info-tile-accept

Setup Lab Environment

Note: When using the free lab environment, see Oracle Linux Lab Basics for connection and other usage instructions.

  1. If not already connected, open a terminal and connect via ssh to the ol-node01 instance.

    ssh oracle@<ip_address_of_instance>
  2. Confirm the version of Oracle Linux.

    cat /etc/oracle-release
  3. Check the platform architecture.

    uname -i

    The aarch64 indicates the hardware platform as the Arm architecture.

  4. Install Podman and the container-tools packages.

    sudo dnf module install -y container-tools:ol8

Install Oracle Database 19c Server Using Podman

  1. Create a data volume.

    The data volume allows the database to persist during container recreation.

    podman volume create oradata
  2. Create a secret.

    The secret is a utility to pass secure text strings to the container, such as ssh-keys or passwords.

    echo "Welcome1" | podman secret create oracle_pwd -

    The SYS,SYSTEM, and PDBADMIN administrative user accounts all use the same password. Oracle recommends that your password be at least 8 characters in length, containing at least 1 upper case character, 1 lower case character, and 1 digit [0-9].

  3. Log in to the Oracle Container Registry.

    podman login container-registry.oracle.com

    Enter your Oracle Single Sign On username and password at the given prompts.

  4. Start the Oracle Database container image.

    podman run -d --name oracle-db --secret=oracle_pwd -p 1521:1521 -v oradata:/opt/oracle/oradata container-registry.oracle.com/database/enterprise:19.19.0.0

    Warning: While pulling the image, the process appears to freeze when writing the manifest and storing signatures. After several minutes, the command will complete and present the running container id.

  5. Verify the Oracle Database image is running.

    podman ps

    The status reports the container is running and (starting). Repeat this command using watch podman ps until the status shows as (healthy), which takes around 10 minutes. Use Ctrl-C to exit out of the watch command.

Connect to the Oracle Database 19c Server Container

  1. Get the mapped database port.

    podman port oracle-db
  2. Get the Oracle Database Service name.

    While the Oracle SID is the unique name that identifies your instance/database, the Service name is the TNS alias you give when remotely connecting to your database.

    podman exec -it oracle-db lsnrctl status

    The Service name for the image defaults to ORCLCDB.

  3. Run SQL*Plus using the same image you used to start the database.

    podman run --rm -ti container-registry.oracle.com/database/enterprise:19.19.0.0 sqlplus sys/Welcome1@//10.0.0.150:1521/ORCLCDB as sysdba
  4. Select from the DUAL table.

    select * from dual;

    Example Output:

    [oracle@ol-node-01 ~]$ podman run --rm -ti container-registry.oracle.com/database/enterprise:19.19.0.0 sqlplus sys/Welcome1@//10.0.0.150:1521/ORCLCDB as sysdba
    
    SQL*Plus: Release 19.0.0.0.0 - Production on Fri Jul 28 01:21:39 2023
    Version 19.19.0.0.0
    
    Copyright (c) 1982, 2023, Oracle.  All rights reserved.
    
    
    Connected to:
    Oracle Database 19c Enterprise Edition Release 19.0.0.0.0 - Production
    Version 19.19.0.0.0
    
    SQL> select * from dual;
    
    D
    -
    X
  5. Select the system date.

    select sysdate from dual;

    Example Output:

    SQL> select sysdate from dual;
    
    SYSDATE
    ---------
    28-JUL-23
  6. Exit SQL*Plus.

    quit

Stop and Remove the Oracle Database 19c Server Container

  1. Stop the container.

    podman stop oracle-db

    Note: When stopping the container, ignore the expected warning regarding StopSignal SIGTERM.

  2. Remove the container.

    podman rm oracle-db

    The oradata volume remains after removing the container, thus preserving any data added or configuration changes made to the database.

For More Information

See other related resources:

SSR