To Access Oracle form the Ubuntu Linux as its open Source Platform, is easy and its installation process is also easy. As Oracle instant client is a free tool that is provided by Oracle Corporation and easily available on Oracle website. This client is are available for every Platform like Windows, Linux,Unix and all other platform. Latest Version of Oracle Instant client is 12.2 which is for all platform like windows, Linux x86-64 and all other platforms. you can download this on this http://www.oracle.com/technetwork/database/features/instant-client/index-097480.html
Every one need Basic Instant Client or Basic-Lite..
First you need to download these 3 packages that you can download from http://www.oracle.com/technetwork/topics/linuxx86-64soft-092277.html
These Packages that you can download from website keep these all RPM file in one folder and now open the command line of Ubuntu install alien package on Ubuntu. this package convert the .RPM file into .Deb file that are executable on Ubuntu Linux.
sudo apt-get install alien
after installing alien on Ubuntu now install the RPM package on Ubuntu using alien.
sudo alien -i oracle-instantclient12.2-basic-18.104.22.168.0-1.x86_64.rpm
sudo alien -i oracle-instantclient12.2-sqlplus-22.214.171.124.0-1.x86_64.rpm
sudo alien -i oracle-instantclient12.2-devel-126.96.36.199.0-1.x86_64.rpm
after installing these packages now try to connect the oracle instant client with oracle with following string.
While exeucting sqlplus if you got error that sqlplus: command not found then you need to add ORACLE_HOME variables. so first install libaio1
sudo apt-get install libaio1
sudo apt-get install libaio1:i386 —(32 bit instant client on 64 bit OS)
Oracle Libraries Integration
if sqlplus is complain about the missing libraries then you can add the libraries to the LD_LIBRARY_PATH using the following command.
for Example if the version 12.2 and Linux x86-64 the you will execute the following command.
now Execute the following command to add it to the system library list, create new file as follow
sudo vi /etc/ld.so.conf.d/oracle.conf && sudo chmod o+r /etc/ld.so.conf.d/oracle.conf and add /usr/lib/oracle/12.2/client64/lib/ (for 64 bit OS) /usr/lib/oracle/12.2/client/lib/ ( for 32 bit OS)
now run:- sudo ldconfig
Oracle database applications look for Oracle software in the location specified in the environment variable ‘ORACLE_HOME’.
to define this variable in a system-wide location.
sudo sudo vi /etc/profile.d/oracle.sh && sudo chmod o+r /etc/profile.d/oracle.sh
Add the following Line : –
Alternatively, each user can define this in their ~/.bash_profile
sqlplus was not recognized as a command untill the following line was also included in the oracle.sh file:
The instant client sometimes places the include files, such as oci.h, in /usr/include/oracle/<version>/client.
Run Following command to identify
ls $ORACLE_HOME ls -d /usr/include/oracle/*/client*/*
if ORACLE_HOME, and it is located over in /usr/include/oracle/ , create a symbolic link
sudo ln -s /usr/include/oracle/12.2/client $ORACLE_HOME/include
sudo ln -s /usr/include/oracle/12.2/client64 $ORACLE_HOME/include
And then check it is correct
Now on Command line run the below command
as you run this command your prompt will come on
now you can run queries and run you oracle related tool..