RE: Perl 5.8.9 DBI/DBD::Oracle make test error
Hi all, There is a user scott, otherwise I cannot logon manually using sqlplus. I am using the same username password to logon for my connection testing using sqlplus. I have set ORACLE_USERID but still no luck. What to do? Thanks. Yeow -Original Message- From: John Scoles [mailto:sco...@pythian.com] Sent: Friday, June 18, 2010 12:04 AM To: Yeow Yiew Choong-PBKN64 Cc: dbi-users@perl.org Subject: Re: Perl 5.8.9 DBI/DBD::Oracle make test error Yeow Yiew Choong-PBKN64 wrote: I really doubt there is a scott/tiger user on you Oracle box set the ORACLE_USERID to a value user and password sid combination and then come back to the list ie export ORACLE_USERID=my_user/my_passw...@my_id > Hi, > > I have HP-UX 11.11(64bit PA-RISC) and Perl 5.8.9.(32bit & 64bit) The > Perl I installed from depot file from www.develooper.com. I am using > gcc 3.4.3 depot file from ftp.thewrittenword.com. > I am new to Perl. I want to install DBD::Oracle 1.24 (from CPAN) so > that I can connect to remote database Oracle 10g. > I am using Oracle Instantclient 10.2 (32bit) from Oracle download. > > DBI is included in the perl 5.8.9. > There is no issue on DBD compilation and make, the problem I have is > when I run make test. > > The error is: > # make test > PERL_DL_NONLAZY=1 /usr/bin/perl "-MExtUtils::Command::MM" "-e" > "test_harness(0, 'blib/lib', 'blib/arch')" t/*.t > t/01base# Test loading DBI, DBD::Oracle and version > t/01baseok t/10general.DBI > connect('','scott/tiger@(DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=zmy1 > 2s > ora02)(PORT=1521))(CONNECT_DATA=(SID=CGISSRND)))',...) failed: ERROR > OCIEnvNlsCreate. Check ORACLE_HOME (Linux) env var or PATH (Windows) > and or NLS settings, permissions, etc. at t/10general.t line 35 > Bailout called. Further testing stopped: Unable to connect to Oracle > (ERROR OCIEnvNlsCreate. Check ORACLE_HOME (Linux) env var or PATH > (Windows) and or NLS settings, permissions, etc.) > *** Error exit code 1 > > I can connect to Oracle using sqlplus manually. > DBD make test failed to connect to Oracle. > I have set ORACLE_HOME, LD_LIBRARY_PATH & SHLIB_PATH to my Oracle > Instantclient folder at /opt/instantclient_10_2. I have changed > t/10general.t under DBD setup folder to include the environment > variables but still failed. The variables are : > $ENV{ORACLE_HOME} = '/opt/instantclient_10_2'; $ENV{NLS_LANG} = > '.WE8ISO8859P15'; #$ENV{NLS_LANG} = 'en_US.UTF8'; #$ENV{NLS_LANG} = > 'AMERICAN_AMERICA.UTF8'; #$ENV{ORACLE_USERID} = 'scott/tiger'; > $ENV{ORACLE_SID} = 'CGISSRND'; $ENV{LD_LIBRARY_PATH} = > '/opt/instantclient_10_2'; $ENV{SHLIB_PATH} = > '/opt/instantclient_10_2'; $ENV{LD_RUN_PATH} = > '/opt/instantclient_10_2'; $ENV{TNS_ADMIN} = > '/opt/instantclient_10_2/network/admin'; > $ENV{LD_PRELOAD} = '/opt/java1.5/jre/lib/PA_RISC2.0/libjava.sl'; > #$ENV{TWO_TASK} = 'zmy12sora02'; > > I manually set $dbh as listed below: > > my $dbh = DBI->connect('dbi:Oracle:', > q{scott/tiger@(DESCRIPTION=(ADDRESS=(PROTO > COL=TCP)(HOST=zmy12sora02)(PORT=1521))(CONNECT_DATA=(SID=CGISSRND)))}, > ""); > > I can ping my server's IP address. > I tried different variable settings that I can find from other threads > in Internet but failed. > Please help. Thanks. > > regards, > Yeow > >
RE: Problem with make test DBD Oracle on RHEL5 server
Thanks for the response John, We were finally able to get it to work by executing "setenforce 0" to disable SELinux. -Original Message- From: John Scoles [mailto:sco...@pythian.com] Sent: Thursday, June 17, 2010 12:01 PM To: Ballou, Gayle Cc: dbi-users@perl.org Subject: Re: Problem with make test DBD Oracle on RHEL5 server Looks like the 64 bit client you are using is not all there. I would give the instant client 64 a shot. Just to be sure get the SDK as well. Cheers John scoles > I am having a problem getting DBD-Oracle to work. It is failing on the make > test on the initial test. If you could please give me any ideas you might > have on resolving this I would be so grateful. I have been trying to resolve > this for several days!! > > > > Thanks in advance > > > > [r...@cvlnxsybdq01 DBD-Oracle-1.24]# perl Makefile.PL > > Using DBI 1.52 (for perl 5.008008 on x86_64-linux-thread-multi) installed in > /usr/lib64/perl5/vendor_perl/5.8.8/x86_64-linux-thread-multi/auto/DBI/ > > > > Configuring DBD::Oracle for perl 5.008008 on linux (x86_64-linux-thread-multi) > > > > Remember to actually *READ* the README file! Especially if you have any > problems. > > > > Installing on a linux, Ver#2.6 > > Using Oracle in /usr/lib/oracle/10.2.0.4/client64 > > DEFINE _SQLPLUS_RELEASE = "1002000400" (CHAR) > > Oracle version 10.2.0.4 (10.2) > > Found /usr/share/oracle/10.2.0.4/client64/demo.mk > > Using /usr/share/oracle/10.2.0.4/client64/demo.mk > > Your LD_LIBRARY_PATH env var is set to > '/usr/lib/oracle/10.2.0.4/client64/lib:/opt/sybase/DataAccess/ODBC/lib:/opt/sybase/OCS-15_0/lib3p:/opt/sybase/OCS-15_0/lib:/opt/sybase/ASE-15_0/lib:' > > Reading /usr/share/oracle/10.2.0.4/client64/demo.mk > > WARNING: Oracle /usr/share/oracle/10.2.0.4/client64/demo.mk doesn't define a > 'build' rule. > > > > WARNING: I will now try to guess how to build and link DBD::Oracle for you. > > This kind of guess work is very error prone and Oracle-version > sensitive. > > It is possible that it won't be supported in future versions of > DBD::Oracle. > > *PLEASE* notify dbi-users about exactly _why_ you had to build it > this way. > > > > Found header files in /usr/include/oracle/10.2.0.4/client. > > > > Checking for functioning wait.ph > > > > > > System: perl5.008008 linux ls20-bc2-13.build.redhat.com 2.6.18-128.1.10.el5 > #1 smp wed apr 29 13:53:08 edt 2009 x86_64 x86_64 x86_64 gnulinux > > Compiler: gcc -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions > -fstack-protector --param=ssp-buffer-size=4 -m64 -mtune=generic -D_REENTRANT > -D_GNU_SOURCE -fno-strict-aliasing -pipe -Wdeclaration-after-statement > -I/usr/local/include -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 > -I/usr/include/gdbm > > Linker: /usr/bin/ld > > Sysliblist: > > Oracle makefiles would have used these definitions but we override them: > > CC: /usr/bin/g++32 > > LDFLAGS: -g > >[-g] > > Linking with -L../../ -locci -lclntsh -lpthread [from $(CCLIB)] > > > > Checking if your kit is complete... > > Looks good > > Warning: -L../../ changed to -L/junk/DBD-Oracle-1.24/../../ > > LD_RUN_PATH=/usr/lib/oracle/10.2.0.4/client64/lib > > Using DBD::Oracle 1.24. > > Using DBD::Oracle 1.24. > > Using DBI 1.52 (for perl 5.008008 on x86_64-linux-thread-multi) installed in > /usr/lib64/perl5/vendor_perl/5.8.8/x86_64-linux-thread-multi/auto/DBI/ > > Writing Makefile for DBD::Oracle > > > > *** If you have problems... > > read all the log printed above, and the README and README.help.txt files. > > (Of course, you have read README by now anyway, haven't you?) > > > > > > [r...@cvlnxsybdq01 DBD-Oracle-1.24]# make > > cp Oracle.pm blib/lib/DBD/Oracle.pm > > cp oraperl.ph blib/lib/oraperl.ph > > cp dbdimp.h blib/arch/auto/DBD/Oracle/dbdimp.h > > cp ocitrace.h blib/arch/auto/DBD/Oracle/ocitrace.h > > cp Oraperl.pm blib/lib/Oraperl.pm > > cp Oracle.h blib/arch/auto/DBD/Oracle/Oracle.h > > cp lib/DBD/Oracle/Object.pm blib/lib/DBD/Oracle/Object.pm > > cp mk.pm blib/arch/auto/DBD/Oracle/mk.pm > > cp lib/DBD/Oracle/GetInfo.pm blib/lib/DBD/Oracle/GetInfo.pm > > /usr/bin/perl -p -e "s/~DRIVER~/Oracle/g" > /usr/lib64/perl5/vendor_perl/5.8.8/x86_64-linux-thread-multi/auto/DBI/Driver.xst > > Oracle.xsi > > /usr/bin/perl /usr/lib/perl5/5.8.8/ExtUtils/xsubpp -typemap > /usr/lib/perl5/5.8.8/ExtUtils/typemap -typemap typemap Oracle.xs > > Oracle.xsc && mv Oracle.xsc Oracle.c > > gcc -c -I/usr/include/oracle/10.2.0.4/client > -I/usr/lib64/perl5/vendor_perl/5.8.8/x86_64-linux-thread-multi/auto/DBI > -D_REENTRANT -D_GNU_SOURCE -fno-strict-aliasing -pipe > -Wdeclaration-after-statement -I/usr/local/include -D_LARGEFILE_SOURCE > -D_FILE_OFFSET_BITS=64 -I/usr/include/gdbm -O2 -g -pipe -Wall > -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector > --param=ssp-buffer-size=4 -m64 -mtune=generic -DVERSION=\"1.24\" > -DXS_VERSION=\"1.24\" -fPIC > "-I/usr/lib64/per