Wednesday, October 13, 2010

Install Oracle Instant Client Installation on UNIX / Linux Server

1. Confirm you can login as the oracle account (primary group dba) on the target server:

[oracle@lnx544 ~]$ id
uid=5005(oracle) gid=56(dba) groups=56(dba),57(oinstall),58(dbasudo),102(operator),2003(prpftp),2004(tcsgrp),5084(paiseasftp),5107(da)


2. Check for /ora01/oracle mount point with sufficient disk space (basic 10g Instant Client is approx 100MB)

[oracle@lnx544 ~]$ cd /ora01/oracle
[oracle@lnx544 ~]$ df -k .
Filesystem           1K-blocks      Used Available Use% Mounted on
/dev/mapper/appvg-ora01
                       2064208     35920   1923432   2% /ora01


3, Create the directory /ora01/oracle/product/

mkdir -p /ora01/oracle/product/

4. Download Oracle Instant Client  from Oracle site

5. Copy the file to /ora01/oracle/product

6. Unzip the file in /ora01/oracle/product

[oracle@lnx544 product]$ unzip instantclient-basic-linux32-10.2.0.2-20060331.zip
Archive:  instantclient-basic-linux32-10.2.0.2-20060331.zip
  inflating: instantclient_10_2/classes12.jar
  inflating: instantclient_10_2/libclntsh.so.10.1
  inflating: instantclient_10_2/libnnz10.so
  inflating: instantclient_10_2/libocci.so.10.1
  inflating: instantclient_10_2/libociei.so
  inflating: instantclient_10_2/libocijdbc10.so
  inflating: instantclient_10_2/ojdbc14.jar

7. Change the unzipped directory name to match the Client version(for easy identification)

 [oracle@lnx544 product]$ mv instantclient_10_2 10.2.0.2

8. The instant client will be configured by the Websphere Administrator to use a $TNS_ADMIN environment variable. 

9. Create the network/admin subdirectories in the instant client $ORACLE_HOME

mkdir –p /ora01/oracle/product/10.2.0.2/network/admin

10. Copy following files
to /ora01/oracle/product/10.2.0.2/network/admin
tnsnames.ora
sqlnet.ora
ldap.ora ( if using OID)

11. test connectivity

Example of connect string using jdbc

Recommend
the method we use for WebSphere:
jdbc:oracle:thin:@ldap://oid-uat:389/demo,cn=OracleContext,dc=csxt,dc=csx,dc=com  

A single instance:
   jdbc:oracle:thin:@lnx101-vip:1521:demo

Using TNSName: 
   jdbc:oracle:thin:@demo.world

Full URL:
   jdbc:oracle:thin:@(DESCRIPTION=(ADDRESS = (PROTOCOL = TCP)(HOST = lnx101-vip.csxt.csx.com)(PORT = 1521))(ADDRESS = (PROTOCOL = TCP)(HOST = lnx102-vip.csxt.csx.com)(PORT = 1521))(LOAD_BALANCE = yes)(FAILOVER = on)(CONNECT_DATA =(SERVER = DEDICATED)(SERVICE_NAME = demo)(FAILOVER_MODE =(TYPE = session)(METHOD = basic)(RETRIES = 10)(DELAY = 1))))

another option :
jdbc:oracle:thin:@ldap:// oid-dev:389/ demo,cn=OracleContext,dc=csxt,dc=csx,dc=com ldap:// oid-dev:389/ demo,cn=OracleContext,dc=csxt,dc=csx,dc=com


Hope this help. Regards Rupam