Databases AWS

Oracle Database Client 23ai on AlmaLinux 9 / Oracle Linux 9 — AWS User Guide

| Product: Oracle Database Client

Overview

This guide covers Oracle Database Client 23ai (23.26) on AlmaLinux 9 and Oracle Linux 9 (all share the same /opt/oracle/client layout), available as separate AMIs in the cloudimg Oracle Database Client listing. It is one variant family of the cloudimg Oracle Database Client listing. For a different client version, return to all Oracle Database Client versions →.

Oracle Database Client provides the tools and libraries needed to connect to and manage remote Oracle Database instances without requiring a full database server installation.

What is included in this AMI:

  • Oracle Database Client (Administrator install) pre-configured at /opt/oracle/client
  • SQLPlus, SQLLoader (sqlldr), tnsping, Oracle Net (TNS/EZConnect)
  • Full OCI and JDBC Thin client libraries for application development
  • Seeded tnsnames.ora and sqlnet.ora ready for TNS alias configuration
  • System-wide /etc/profile.d/oracle-client.sh — all Oracle env vars set on login
  • Bundled Oracle JDK replaced with system-managed OpenJDK (eliminates CVE exposure)
  • First-boot OS update sweep for latest security patches
  • 24/7 cloudimg support with guaranteed 24 hour response SLA

Prerequisites

Before launching this AMI, ensure you have:

  1. An active AWS account with an active Marketplace subscription for this listing
  2. An EC2 key pair for SSH access
  3. The hostname, port, and service name of the Oracle Database you wish to connect to

Recommended instance type: t3.medium (2 vCPU, 4 GB RAM)

Step 1: Launch the AMI

  1. Navigate to the AWS Marketplace and search for "Oracle Database Client cloudimg"
  2. Click Continue to Subscribe, accept the terms, then Continue to Configuration
  3. Select your preferred Region and the 23ai on AlmaLinux 9 software version
  4. Click Continue to Launch, then choose Launch through EC2
  5. Select instance type t3.medium (recommended) or larger
  6. Configure storage: 20 GB gp3 minimum
  7. Configure your Security Group with the following inbound rule:
Port Protocol Source Purpose
22 TCP Your IP SSH access
  1. Select your EC2 key pair and launch the instance

Step 2: Connect via SSH

Once the instance is running and has passed both status checks (2/2), connect as ec2-user:

ssh -i your-key.pem ec2-user@<instance-public-ip>

Replace <instance-public-ip> with the Public IPv4 address shown in the EC2 console.

Step 3: Verify the Oracle Client installation

The Oracle environment is configured automatically for all users via /etc/profile.d/oracle-client.sh. On login, ORACLE_HOME, PATH, and LD_LIBRARY_PATH are set. Confirm the client is working:

sqlplus -V

Expected output:

SQL*Plus: Release 23.0.0.0.0 - Production
Version 23.x.x.x

Check that Oracle Net (TNS layer) loads correctly:

tnsping invalid_alias

Expected output begins with:

TNS Ping Utility for Linux: Version 23.x.x.x

(The invalid_alias is intentionally unknown — the banner printing confirms the TNS layer is working.)

List the core client libraries:

ls /opt/oracle/client/lib/libclntsh.so*

Step 4: Configure tnsnames.ora

Add your remote database connection aliases to tnsnames.ora. The file is at /opt/oracle/client/network/admin/tnsnames.ora. Open it with any editor:

sudo vi /opt/oracle/client/network/admin/tnsnames.ora

Add an entry using this format:

MY_DATABASE =
  (DESCRIPTION =
    (ADDRESS_LIST =
      (ADDRESS = (PROTOCOL = TCP)(HOST = your-db-hostname)(PORT = 1521))
    )
    (CONNECT_DATA =
      (SERVER = DEDICATED)
      (SERVICE_NAME = your-service-name)
    )
  )

Replace: - your-db-hostname — IP address or DNS name of the Oracle Database server - 1521 — change if the listener uses a different port - your-service-name — the database service name (ask your DBA if unsure)

Step 5: Connect to a remote Oracle database via SQL*Plus

Use EZConnect syntax to test connectivity without a TNS alias (replace the placeholders):

sqlplus username/password@//your-db-hostname:1521/your-service-name

Once you have a TNS alias configured, connect using it:

sqlplus username/password@MY_DATABASE

Type EXIT to leave the SQL*Plus session.

Step 6: Using SQL*Loader

SQL*Loader (sqlldr) is included for high-speed bulk data loading. Confirm it is present:

sqlldr /? 2>&1 | head -5

Environment variables reference

Variable Value
ORACLE_HOME /opt/oracle/client
ORACLE_BASE /opt/oracle
TNS_ADMIN /opt/oracle/client/network/admin

These are set automatically for ec2-user via /etc/profile.d/oracle-client.sh.

Filesystem layout

Path Description
/opt/oracle/client Oracle Client ORACLE_HOME
/opt/oracle/oraInventory Oracle Universal Installer inventory
/opt/oracle/client/network/admin/tnsnames.ora TNS alias configuration
/opt/oracle/client/network/admin/sqlnet.ora Oracle Net client settings
/home/oracle/setEnv.sh Source file for oracle user env vars

On startup

A first-boot OS update script runs once on first launch to apply the latest security patches. It self-removes after completing successfully. You can check or disable it:

sudo crontab -l

To disable:

sudo crontab -l | grep -v initial_boot_update | sudo crontab -
sudo rm -f /stage/scripts/initial_boot_update.sh

Troubleshooting

Cannot connect via SSH

  1. Verify the instance has passed both EC2 status checks (2/2)
  2. Confirm your security group allows inbound TCP port 22 from your IP
  3. Ensure you are connecting as ec2-user with the correct key pair

SQL*Plus cannot connect — ORA-12541: TNS no listener

The Oracle listener on the target database is not running. Contact the database administrator.

SQL*Plus cannot connect — ORA-12514: TNS listener does not know of service

The service name in your connection string does not match the target database. Verify the correct service name with the database administrator.

SQL*Plus cannot connect — ORA-12170: TNS connect timeout

  1. Verify the target database hostname and port are reachable: telnet your-db-hostname 1521
  2. Check that the database server's security group or firewall allows inbound port 1521 from this EC2 instance

← Back to all Oracle Database Client versions