Tuesday, August 16, 2005

Installing DBD::Oracle perl module with oracle instantclient

First, you must install oracle instantclient rpm.

Set environment in the every user .bash_profile (dont forget to activate it by . .bash_profile). E.g:

LD_LIBRARY_PATH=/usr/lib/oracle/10.1.0.4/client/lib/:$LD_LIBRARY_PATH
TNS_ADMIN=/home
TWO_TASK=oracledb
export LD_LIBRARY_PATH TNS_ADMIN TWO_TASK


Create your tnsnames.ora (make sure your spell it right, tnsnames.ora not tnsname.ora, give me headache for 1 hour of this typo error) at the above TNS_ADMIN path. E.g:

oracledb =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = 2.1.1.149)(PORT = 1521))
(CONNECT_DATA =
(SERVER = DEDICATED)
(SERVICE_NAME = oracledb)
)
)


Then download DBD::Oracle
Untar the DBD oracle source
Then apply jean-cristophe makefile patch for installation.. at my installation, I have to edit jean oracle-instantclient-config to change the prefix from /opt to /usr and the version from 10.1.0.3 to 10.1.0.4..

taraaa.. now you can use DBD oracle perl module with instantclient.. why you shall apply the makefile patch?? because DBD oracle default Makefile.pl is for installing with server oracle..

0 Comments:

Post a Comment

<< Home