Installing Oracle Instant Client and Tools in an AWS EC2

I’m using the AWS Amazon Linux 2 AMI on my EC2. To download the Oracle Instant Client get the download urls for the instant client and instant client tools from: https://www.oracle.com/database/technologies/instant-client/linux-x86-64-downloads.html

Download using curl and install with rpm:

curl instant-client-url-from-page-above --output instant-client.rpm
rpm -i instant-client.rpm
curl instant-client-tools-from-page-above --output instant-client-tools.rpm
rpm -i instant-client-tools.rpm

To connect using sql-plus:

sqlplus 'admin@(DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=your-instance-endpoint.rds.amazonaws.com)(PORT=1521))(CONNECT_DATA=(SID=your-db-name)))'

Enter password when prompted.

2 Replies to “Installing Oracle Instant Client and Tools in an AWS EC2”

  1. Hi Teams,
    I don’t connect sqlplus like sqlplus ‘admin@(DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=your-instance-endpoint.rds.amazonaws.com)(PORT=1521))(CONNECT_DATA=(SID=your-db-name)))’. I want keep it tsnnames.ora file and connect the sqlplus. How to do that and where we need to create that file. please provide us the steps.

    Thanks Advance.

    1. create a directory and define a TNS_ADMIN variable. put your tnsnames.ora file there

      mkdir ~/my_tns
      export TNS_ADMIN=~/my_tns
      touch ~/tnsnames.ora

Leave a Reply to Karthik Reddy Cancel reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.