oracle client ubuntu 10.10

3 Mar

oracle client ubuntu 10.10
0. persiapan
ubs@ubs:~$ sudo apt-get update
ubs@ubs:~$ sudo apt-get install libaio

1. download instantclient

http://www.oracle.com/technetwork/topics/linuxsoft-082809.html

a. instantclient-basiclite-linux32-11.2.0.2.0.zip
b. instantclient-sdk-linux32-11.2.0.2.0.zip
c. instantclient-sqlplus-linux32-11.2.0.2.0.zip

2. unzip instantclient

ubs@ubs:~$ sudo su – root
root@ubs:~# mkdir /u02 -p
root@ubs:~# unzip instantclient-basiclite-linux32-11.2.0.2.0.zip -d /u02
root@ubs:~# unzip instantclient-sdk-linux32-11.2.0.2.0.zip -d /u02
root@ubs:~# unzip instantclient-sqlplus-linux32-11.2.0.2.0.zip -d /u02

3. konfigurasi /etc/ld.so.conf
root@ubs:~# echo /u02/instantclient_11_2 >> /etc/ld.so.conf
root@ubs:~# ldconfig

4. konfigurasi /etc/profile
cat – <<EOF > /etc/profile
ORACLE_HOME=/u02/instantclient_11_2
export TNS_ADMIN=/u02/instantclient_11_2/network/admin
echo export SQLPATH=$ORACLE_HOME
export LD_LIBRARY_PATH=$ORACLE_HOME:$LD_LIBRARY_PATH
export PATH=$PATH:$SQLPATH
EOF

5. konfigurasii sqlnet.ora & tnsnames.ora
mkdir /u02/instantclient_11_2/network/admin -p
cat – <<EOF > /u02/instantclient_11_2/network/admin/sqlnet.ora
# sqlnet.ora Network Configuration File
NAMES.DIRECTORY_PATH= (TNSNAMES, EZCONNECT)
EOF

cat – <<EOF > /u02/instantclient_11_2/network/admin/tnsnames.ora
# TNSNAMES.ORA Network Configuration File
ppc =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = 172.20.141.25)(PORT = 1521))
(CONNECT_DATA =
(SERVER = DEDICATED)
(SERVICE_NAME = ppc)
(INSTANCE_NAME = ppc)
)
)
EOF

6. bikin link
root@ubs:~# ln -s /u02/instantclient_11_2/libclntsh.so.11.1 /u02/instantclient_11_2/libclntsh.so
root@ubs:~# ln -s /u02/instantclient_11_2/libocci.so.11.1 /u02/instantclient_11_2/libocci.so

7. copykan di /usr/lib dan /usr/local/lib
root@ubs:~# cp /u02/instantclient_11_2/libclntsh.so /usr/lib
root@ubs:~# cp /u02/instantclient_11_2/libclntsh.so /usr/local/lib

8. test sqlplus
ubs@ubs:~$ sqlplus scott/tiger@ppc
SQL*Plus: Release 11.2.0.2.0 Production on Fri Mar 4 12:37:34 2011
Copyright (c) 1982, 2010, Oracle.  All rights reserved.
Connected to:
Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 – Production
With the Partitioning, OLAP and Data Mining options

SQL> select * from dept;

DEPTNO DNAME          LOC
———- ————– ————-
31 IT             SURABAYA
10 ACCOUNTING     NEW YORK
20 RESEARCH       DALLAS
30 SALES          CHICAGO
40 OPERATIONS     BOSTON

SQL> exit
Disconnected from Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 – Production
With the Partitioning, OLAP and Data Mining options

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: