Intellipaat Back

Explore Courses Blog Tutorials Interview Questions
0 votes
2 views
in AWS by (12.9k points)

I am working on AWS services. I have an ec2 ( centos ) instance. I need to configure SQL*Plus client on this centos machine.

The server with whom I want to connect is at some remote area. The server version is oracle-se(11.2.0.2)

Kindly help me getting the client installed on the centos machine.

Thanks in advance.

1 Answer

0 votes
by (18.2k points)

Use the following commands:

1. Download Oracle Linux instant client

oracle-instantclient11.2-basic-11.2.0.2.0.x86_64.rpm

oracle-instantclient11.2-sqlplus-11.2.0.2.0.x86_64.rpm

2. Install

rpm -ivh oracle-instantclient11.2-basic-11.2.0.2.0.x86_64.rpm

rpm -ivh oracle-instantclient11.2-sqlplus-11.2.0.2.0.x86_64.rpm

3. Set environment variables in your ~/.bash_profile as shown below:

ORACLE_HOME=/usr/lib/oracle/11.2/client64

PATH=$ORACLE_HOME/bin:$PATH

LD_LIBRARY_PATH=$ORACLE_HOME/lib

export ORACLE_HOME

export LD_LIBRARY_PATH

export PATH

4. Reload the bash_profile using the following command:

source ~/.bash_profile

5. Start using SQL*PLUS and connect your server:

sqlplus "username/pass@(DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=192.168.2.1)(PORT=1521))(CONNECT_DATA=(SID=YOURSID)))"

Related questions

0 votes
1 answer
Want to get 50% Hike on your Salary?

Learn how we helped 50,000+ professionals like you !

0 votes
1 answer
0 votes
1 answer

31k questions

32.8k answers

501 comments

693 users

Browse Categories

...