Deployment guide

Oracle DB Client 21c

Overview

This guide shows you how to deploy Oracle Database Client 21c (21.3.0.0.0) on Oracle Linux 8 from AWS Marketplace. It is one variant of the SecureAnyCloud Oracle Database Client listing. To use a different client version, return to the list of all Oracle Database Client versions.

Oracle Database Client provides the tools and libraries that you need to connect to and manage remote Oracle Database instances. You do not need a full database server installation.

What you get:

  • Oracle Database Client (Administrator install), preconfigured at /u01/app/oracle/product/21c/client_1.
  • SQL*Plus, SQL*Loader (sqlldr), tnsping and Oracle Net (TNS/EZConnect).
  • Full OCI and JDBC Thin client libraries for application development.
  • Pre-seeded tnsnames.ora and sqlnet.ora files, ready for TNS alias configuration.
  • A system-wide environment: sqlplus, sqlldr and tnsping work from any shell, and the Oracle environment variables are set at login through /etc/profile.d/oracle-client.sh.
  • The bundled Oracle JDK replaced with system-managed OpenJDK (eliminates CVE exposure).
  • A first-boot OS update sweep for the latest security patches.
  • 24/7 SecureAnyCloud support with a guaranteed 24-hour response SLA.

Prerequisites

Before you launch this AMI, make sure that you have:

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

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

1

Launch the AMI

  • Go to the AWS Marketplace and search for "Oracle Database Client SecureAnyCloud".
  • Choose Continue to Subscribe and accept the terms. Then choose Continue to Configuration.
  • Select your preferred Region and the 21c on Oracle Linux 8 software version.
  • Choose Continue to Launch, then choose Launch through EC2.
  • Select instance type t3.medium (recommended) or larger.
  • Configure storage: 20 GB gp3 minimum.

Configure your Security Group with the following inbound rule:

  • Port 22 (TCP), source your IP: SSH access.

Select your EC2 key pair and launch the instance.

2

Connect with SSH

When 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.

3

Verify the Oracle Client installation

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

sqlplus -V

The output is similar to the following:

SQL*Plus: Release 21.0.0.0.0 - Production Version 21.3.0.0.0

Check that Oracle Net (the TNS layer) loads correctly:

tnsping invalid_alias

The output begins with:

TNS Ping Utility for Linux: Version 21.0.0.0.0

The alias invalid_alias is intentionally unknown. The banner confirms that the TNS layer works.

List the core OCI client libraries. The environment is set automatically at login:

ls "$ORACLE_HOME"/lib/libclntsh.so*
4

Configure tnsnames.ora

Add your remote database connection aliases to tnsnames.ora. The file is at /u01/app/oracle/product/21c/client_1/network/admin/tnsnames.ora. Open it with any editor:

sudo vi $ORACLE_HOME/network/admin/tnsnames.ora

Add an entry in 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 the following values:

  • your-db-hostname: the IP address or DNS name of the Oracle Database server.
  • 1521: change it if the listener uses a different port.
  • your-service-name: the database service name (ask your DBA if you are unsure).
5

Connect to a remote Oracle database via SQL*Plus

Use EZConnect syntax to test connectivity without a TNS alias. Replace the sample values with your own:

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

After you configure a TNS alias, connect with it:

sqlplus username/password@MY_DATABASE

Type EXIT to leave the SQL*Plus session.

6

Use SQL*Loader

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

sqlldr /? 2>&1 | head -5

Environment variables reference

  • ORACLE_HOME: /u01/app/oracle/product/21c/client_1
  • ORACLE_BASE: /u01/app/oracle
  • TNS_ADMIN: /u01/app/oracle/product/21c/client_1/network/admin

The ec2-user account gets these variables automatically through /etc/profile.d/oracle-client.sh.

Filesystem layout

  • /u01/app/oracle/product/21c/client_1: Oracle Client ORACLE_HOME.
  • /u01/app/oraInventory: Oracle Universal Installer inventory.
  • /u01/app/oracle/product/21c/client_1/network/admin/tnsnames.ora: TNS alias configuration.
  • /u01/app/oracle/product/21c/client_1/network/admin/sqlnet.ora: Oracle Net client settings.
  • /home/oracle/setEnv.sh: source file for the oracle user's environment variables.

On startup

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

sudo crontab -l

To disable it, run:

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

Troubleshooting

Cannot connect with SSH

  • Verify that the instance has passed both EC2 status checks (2/2).
  • Confirm that your security group allows inbound TCP port 22 from your IP.
  • Make sure that you connect 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

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

Return to all Oracle Database Client versions.

Deploy on AWS

Launch Oracle Database Client with 24/7 support from SecureAnyCloud.

View on Marketplace

Need Help?

Our support team is available 24/7.

sales@secureanycloud.com

Deploy on AWS