if you want to connect to a remote oracle database from a linux machine (with net naming services, tnsnames.ora file) you should have oracle client software. you can download this software from oracle official site.
size of the softwares for client and server are so huge. Maybe it is normal for server software but not for client.
But you have an another choice, you can install only 2 rpm files and use sqlplus and oracle client libraries.
total size of these files is 34mb, download url is: http://www.oracle.com/technology/software/products/database/xe/htdocs/102xelinsoft.html
installation:
it is too basic.
rpm -iv oracle-instantclient-basic-10.2.0.3-1.i386.rpm
rpm -iv oracle-instantclient-sqlplus-10.2.0.3-1.i386.rpm
after installation you have to set LD_LIBRARY_PATH and add /usr/lib/oracle/10.2.0.3/client/lib. (to see the path of client files:
[root@oracle]# rpm -qlv oracle-instantclient-basic
-rwxr-xr-x 1 root root 39612 Nov 15 2006 /usr/lib/oracle/10.2.0.3/client/bin/genezi
-rw-r--r-- 1 root root 18825267 Nov 15 2006 /usr/lib/oracle/10.2.0.3/client/lib/libclntsh.so.10.1
-rw-r--r-- 1 root root 5486009 Nov 15 2006 /usr/lib/oracle/10.2.0.3/client/lib/libnnz10.so
-rw-r--r-- 1 root root 1398088 Nov 15 2006 /usr/lib/oracle/10.2.0.3/client/lib/libocci.so.10.1
-rw-r--r-- 1 root root 72480394 Nov 15 2006 /usr/lib/oracle/10.2.0.3/client/lib/libociei.so
-rw-r--r-- 1 root root 120135 Nov 15 2006 /usr/lib/oracle/10.2.0.3/client/lib/libocijdbc10.so
-rw-r--r-- 1 root root 1545954 Nov 15 2006 /usr/lib/oracle/10.2.0.3/client/lib/ojdbc14.jar
)
so, where is tnsnames.ora file?
you can put this file anywhere. it is enough to set TNS_ADMIN shell variable to the directory of tnsnames.ora file.
now you can use sqlplus to connect remote oracle database.
Wednesday, February 20, 2008
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment