Deployment guide

Oracle Database Client 11g

Overview

Oracle Database Client 11g provides the tools and libraries you need to connect to and manage remote Oracle Database instances. It includes SQL*Plus, Oracle Net and other client utilities, without requiring a full database installation.

This SecureAnyCloud AMI from the AWS Marketplace delivers Oracle Database Client 11g Administrator on Linux, preinstalled and configured. This guide walks you through deployment and configuration.

What you get:

  • Oracle Database Client 11g Administrator 11.2.0.4 installed at /u01
  • A dedicated oracle OS user with an environment script (setEnv.sh)
  • SQL*Plus for connecting to remote Oracle databases
  • An OS package update script that keeps the system current
  • AWS CLI v2 for AWS service integration
  • Systems Manager Agent (SSM) for remote management
  • CloudWatch Agent for monitoring
  • Latest security patches applied at build time
  • 24/7 SecureAnyCloud support with a guaranteed 24-hour response SLA

Prerequisites

Before you launch this AMI, make sure you have:

  • An active AWS account
  • An active subscription to the Oracle Database Client 11g listing on AWS Marketplace
  • An EC2 key pair for SSH access
  • The hostname, port and service name of the Oracle Database you want to connect to

Recommended instance type: t3.small (2 vCPU, 2 GB RAM) or larger. The minimum requirements are 1 vCPU, 1 GB RAM and 20 GB of disk space.

1

Launch the AMI

  • Open the AWS Marketplace and search for "Oracle Database Client 11g SecureAnyCloud".
  • Choose Continue to Subscribe, accept the terms, then choose Continue to Configuration.
  • Select your preferred Region and Software Version.
  • Choose Continue to Launch.
  • Choose Launch through EC2 for full control over the instance configuration.
  • Select your instance type (t3.small is recommended).
  • Configure storage with a minimum of 20 GB gp3.
  • Configure your Security Group with the following inbound rule:

Port 22, protocol TCP, source Your IP: SSH access.

  • Select your EC2 key pair and launch the instance.
2

Connect via SSH

When your instance is running and has passed both status checks (2/2), connect to it over SSH:

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

To switch to the root user:

sudo su -

Important: Wait for the EC2 instance to reach 2/2 successful status checks before you connect. Early connection attempts can fail with permission denied errors while the instance is still initialising.

3

Switch to the Oracle User and Set Environment

The dedicated oracle OS user owns the Oracle Client software. Switch to this user and source the environment. Type the command rather than pasting it:

sudo su - oracle cd $HOME . ./setEnv.sh

The setEnv.sh script sets the Oracle environment variables required for utilities such as sqlplus.

4

Configure tnsnames.ora

Before you connect to a remote Oracle Database, create a tnsnames.ora configuration file. Run the following commands as the oracle user, replacing the example values with your target database details:

cd $HOME . ./setEnv.sh echo 'MY_DATABASE = (DESCRIPTION = (ADDRESS_LIST = (ADDRESS = (PROTOCOL = TCP)(HOST = YOUR_DB_HOSTNAME)(PORT = 1521)) ) (CONNECT_DATA = (SERVER = DEDICATED) (SERVICE_NAME = YOUR_SERVICE_NAME) ) ) ' > "$ORACLE_HOME/network/admin/tnsnames.ora"

Replace the following values:

  • YOUR_DB_HOSTNAME with the IP address or DNS name of your Oracle Database server
  • 1521 with the port number, if it differs from the default
  • YOUR_SERVICE_NAME with the service name of the target database
5

Connect to a Remote Database via SQL*Plus

Set the Oracle environment variables and connect to your remote database:

cd $HOME . ./setEnv.sh sqlplus 'system/password@(DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=your-db-host)(PORT=1521))(CONNECT_DATA=(SERVICE_NAME=your-service-name)))'

Replace system, password, your-db-host and your-service-name with your actual database connection details.

Expected output:

SQL*Plus: Release 11.2.0.4.0 Production Copyright (c) 1982, 2013, Oracle. All rights reserved. Connected to: Oracle Database ... SQL>

Type EXIT to leave the SQL*Plus session.

Server Components

Oracle Client 11g: version 11.2.0.4, installed at /u01.

Note: The automatic OS package update script can update component versions on first boot.

Filesystem Layout

The image uses the following mount points:

  • / (38 GB): Root filesystem
  • /boot (2.0 GB): Operating system kernel files
  • /u01 (20 GB): Oracle software installation directory

Key Oracle directories:

  • /u01/app/oracle: Oracle base directory
  • /u01/app/oracle/product: Oracle Client software home
  • $ORACLE_HOME/network/admin: TNS configuration files (tnsnames.ora, sqlnet.ora)

Managing the Oracle Client

The Oracle Client is a set of tools and libraries, not a running service, so there are no services to start or stop. To use the client tools, switch to the oracle user and source the environment.

sudo su - oracle cd $HOME . ./setEnv.sh

Scripts and Log Files

  • /stage/scripts/initial_boot_update.sh: Updates the OS with the latest packages on first boot
  • /stage/scripts/initial_boot_update.log: Output log for the boot update script
  • /home/oracle/setEnv.sh: Sets Oracle environment variables for sqlplus and other tools

On Startup

An OS package update script runs on first boot to bring the image fully up to date. To disable it, remove the script and its crontab entry:

rm -f /stage/scripts/initial_boot_update.sh crontab -e
# Delete the following line, save and exit: @reboot /stage/scripts/initial_boot_update.sh

Troubleshooting

Cannot connect via SSH

  • Verify that the instance has reached 2/2 status checks in the EC2 console.
  • Confirm that your security group allows inbound TCP port 22 from your IP.
  • Make sure you are using the correct key pair and connecting as ec2-user.

SQL*Plus cannot connect to the remote database

  • Verify that the target database is running and accepting connections.
  • Check that the hostname, port and service name are correct.
  • Make sure the security group of the target database allows inbound port 1521 from this client instance.
  • Test network connectivity: telnet <db-host> 1521
  • Verify that tnsnames.ora is correctly configured at $ORACLE_HOME/network/admin/tnsnames.ora.

ORA-12541: TNS:no listener

  • The target database listener is not running. Contact the database administrator.
  • Verify that the hostname and port are correct in your connection string.

ORA-12514: TNS:listener does not currently 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.

Security Recommendations

  • Restrict SSH access. Allow port 22 only from trusted IP addresses.
  • Secure credentials. Never store database passwords in plain text files.
  • Use Oracle Wallet. Configure Oracle Wallet for secure credential storage.
  • Encrypt connections. Configure Oracle Net Services to use SSL/TLS encryption.
  • Limit OS access. Restrict SSH access to authorised administrators only.
  • Keep the system updated. Apply OS security patches regularly.

Support

If you have any issues with this product, contact SecureAnyCloud support:

  • Email: sales@secureanycloud.com
  • Website: secureanycloud.com
  • Support hours: 24/7 with a guaranteed 24-hour response SLA

Deploy on AWS

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

View this image

Need Help?

Our support team is available 24/7.

sales@secureanycloud.com