Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to install SQL * PLUS client in linux

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.

like image 613
Megha Sharma Avatar asked May 06 '14 07:05

Megha Sharma


People also ask

Where is sqlplus installed Unix?

The SQL*Plus executable is usually installed in $ORACLE_HOME/bin, which is usually included in your operating system PATH environment variable. You may need to change directory to the $ORACLE_HOME/bin directory to start SQL*Plus.

Can we install SQL Developer in Linux?

RPM for Linux Installation NotesSQL Developer supports JDK 7 and up. To install and run: Ensure you have a JDK installed, if not, download here. Download SQL Developer.


1 Answers

Go to Oracle Linux x86-64 instant clients download page

Download the matching 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 

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 

Set environment variables in your ~/.bash_profile

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 

Reload your .bash_profile by simply typing source ~/.bash_profile (suggested by jbass) or Log-out user and log-in again.

Now you're ready to use SQL*Plus and connect your server. Type in :

sqlplus "username/pass@(DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=192.168.2.1)(PORT=1521))(CONNECT_DATA=(SID=YOURSID)))" 
like image 52
Chamara Keragala Avatar answered Sep 29 '22 04:09

Chamara Keragala