Thursday, March 11, 2010

Oracle Instant Client installation

with the oracle instant client (only available with 10g)you can connect remote oracle database, the package come with only 31MB in size. This version well work with 8i, 9i also
Now follow the steps to install on fedora 11 (which i used)

Download Instant client from oracle site. (below link)

http://www.oracle.com/technology/software/tech/oci/instantclient/htdocs/linuxsoft.html

1) instantclient-basic-linux32-10.1.0.5-20060511.zip
2) instantclient-sqlplus-linux32-10.1.0.5-20060511.zip

After download the package

Move both packages under /usr/local/oracle if dir not exist then create & move.

#mkdir /usr/local/oracle

#cd /usr/local/oracle

Then unzip the packages.

# unzip instantclient-basic-linux32-10.1.0.5-20060511.zip
# unzip instantclient-sqlplus-linux32-10.1.0.5-20060511.zip

#ls

Now you able to see the dir with name instantclient10_1, this sub-directory contain all the requird files.

Now set the environment variable like this..

# cat /root/.bash_profile
LD_LIBRARY_PATH=/usr/local/oracle/instantclient10_1
ORACL_HOME=/usr/local/oracle/instantclient10_1
PATH=$PATH:$HOME/bin:$ORACLE_HOME
export PATH ORACLE_HOME LD_LIBRARY_PATH

# cat /root/.bashrc
LD_LIBRARY_PATH=/usr/local/oracle/instantclient10_1
ORACLE_HOME=/usr/local/oracle/instantclient10_1
# Source global definitions
if [ -f /etc/bashrc ]; then
. /etc/bashrc
fi

export ORACLE_HOME




After all this setting,now time to connect remote database.

command is

#sqlplus user/password@//host/database

# sqlplus ramank/rk99@//10.131.11.228:1521/XE

(in this 5121 is port )

#[root@raman oracle]# sqlplus ramank/rk99@//10.131.11.228:1521/XE

SQL*Plus: Release 10.1.0.5.0 - Production on Thu Mar 11 22:00:58 2010

Copyright (c) 1982, 2005, Oracle. All rights reserved.


Connected to:
Oracle Database 10g Express Edition Release 10.2.0.1.0 - Production

SQL>



Run your query and enjoy.



Raman

0 comments: