Wednesday, 23 December 2015

How to install SQLPLUS client in linux

 How to install SQL * PLUS client in Linux ?

Its really very simple steps to do this, and very crazy while dependency for compatibility with OS (x32 bit or x64 bit).

I have done for x64 bit Linux UBUNTU. Usally Oracle provides .rpm packages , and you need to download those packages into  your machine.

Download here.

Assuming that you have already installed Oracle Database , else you are connecting some remote database. Because, this post only show the sqlplus installation to connect existing database.

Downloaded files :-


Copy these files to your prefered location. I have  used below location.


Now time for convert these .rpm packages into debian specific package and install on your Ubuntu. Use alien command to convert.

Follow the below steps and install one-by-one.

First install the sqlplus :-

dev@javadevelopersguide-developer-desktop /usr/java $ sudo alien -i oracle-instantclient12.1-sqlplus-

[sudo] password for dev:

dpkg --no-force-overwrite -i oracle-instantclient12.1-sqlplus_12.

Selecting previously unselected package oracle-instantclient12.1-sqlplus.

(Reading database ... 226951 files and directories currently installed.)

Unpacking oracle-instantclient12.1-sqlplus (from oracle-instantclient12.1-sqlplus_12. ...

Setting up oracle-instantclient12.1-sqlplus ( ...

Second install the basic (packages) :-

dev@javadevelopersguide-developer-desktop /usr/java $ sudo alien -i oracle-instantclient12.1-basic-
dpkg --no-force-overwrite -i oracle-instantclient12.1-basic_12.

Selecting previously unselected package oracle-instantclient12.1-basic.

(Reading database ... 226963 files and directories currently installed.)

Unpacking oracle-instantclient12.1-basic (from oracle-instantclient12.1-basic_12. ...

Setting up oracle-instantclient12.1-basic ( ...

Processing triggers for libc-bin ...

ldconfig deferred processing now taking place

Third install the devel :-

dev@javadevelopersguide-developer-desktop /usr/java $ sudo alien -i oracle-instantclient12.1-devel-

dpkg --no-force-overwrite -i oracle-instantclient12.1-devel_12.

Selecting previously unselected package oracle-instantclient12.1-devel.

(Reading database ... 226981 files and directories currently installed.)

Unpacking oracle-instantclient12.1-devel (from oracle-instantclient12.1-devel_12. ...

Setting up oracle-instantclient12.1-devel ( ...

Once these installation complete, you can start sqlplus using below command. Either you can use your specific user/password with correct server address.

dev@javadevelopersguide-developer-desktop /usr/java $ sqlplus / as sysdba

Good to go if no error, else follow with fixing below !! Good luck.

Note - You may face the below library missing issue while executing sqlplus command. Error below :-

dev@javadevelopersguide-developer-desktop /usr/java $ sqlplus / as sysdba

sqlplus: error while loading shared libraries: cannot open shared object file: No such file or directory

Now this issue saying the lib is not loading, the sqlplus is complaining about the missing library.

So you need to edit the oracle.conf and provide the correct lib path (i.e : /usr/lib/oracle/12.1/client64/lib).Add this path into oracle.conf file.

dev@javadevelopersguide-developer-desktop /usr/java $ sudo vi /etc/


Now, you should be able to connect to your preferred Database. I have connected to our remote server as below :

dev@javadevelopersguide-developer-desktop /usr/java $ sqlplus my_user/my_password@z2customdb01.ztest/
SQL*Plus: Release Production on Wed Dec 23 16:30:02 2015
Copyright (c) 1982, 2013, Oracle. All rights reserved.
Last Successful login time: Wed Dec 23 2015 16:18:22 +11:00

Connected to:

Oracle Database 12c Enterprise Edition Release - 64bit Production

With the Partitioning option


Yes, its working. Hope it will help you.

Follow for more details on Google+ and @Facebook!!!

Find More :-

No comments:

Post a Comment