perl DBI 1.25 not connectting to Oracle 10g
perl DBI 1.25 not connectting to Oracle 10g
am 05.01.2006 20:01:35 von sunilav
--Next_1136487691---0-202.54.124.151-29676
Content-type: text/plain;
charset=iso-8859-1
Content-Transfer-Encoding: quoted-printable
Content-Disposition: inline
Hi,
I am trying this combination:=0Aperl: v5.61=0ADBI: 1.25=0AO=
racle: 10g=0AOS: Solaris Unix=0AThe directory /home/me/perlmods contains DB=
I.pm, DBI dir, DBD dir, Bundle, etc
In my perl program I am using=0ABE=
GIN {unshift(@INC,'/home/me/perlmods')}=0Ause DBI;
my $dbh =3D DBI->co=
nnect('DBI:Oracle','sid','user','pass') || die "msg";=0A...
The progra=
m terminates at the connect line and does not even print the msg in the die=
statement.
Is version a problem here OR is perl not able to find DBI=
OR should i install DBD:Oracle as well? I am just using DBI for basic sql =
fetch in preparedstatements.
Thanks,=0ASunil
--Next_1136487691---0-202.54.124.151-29676--
Re: perl DBI 1.25 not connectting to Oracle 10g
am 05.01.2006 20:22:09 von mdougher
You need Oracle DBD. If it's there there will be per5~/DBD/Oracle.pm and an
Oracle directory.
On 5 Jan 2006 19:01:35 -0000, Sunil A V wrote
>
> Hi,
>
> I am trying this combination:
> perl: v5.61
> DBI: 1.25
> Oracle: 10g
> OS: Solaris Unix
> The directory /home/me/perlmods contains DBI.pm, DBI dir, DBD dir,
> Bundle, etc
>
> In my perl program I am using
> BEGIN {unshift(@INC,'/home/me/perlmods')}
> use DBI;
>
> my $dbh = DBI->connect('DBI:Oracle','sid','user','pass') || die
> "msg"; ...
>
> The program terminates at the connect line and does not even print
> the msg in the die statement.
>
> Is version a problem here OR is perl not able to find DBI OR should
> i install DBD:Oracle as well? I am just using DBI for basic sql
> fetch in preparedstatements.
>
> Thanks,
> Sunil
Matthew Dougherty
mdougher@inch.com
973-325-8556
AIM: mattsei
Re: Re: perl DBI 1.25 not connectting to Oracle 10g
am 05.01.2006 22:05:43 von sunilav
--Next_1136495139---0-202.54.124.145-16269
Content-type: text/plain;
charset=iso-8859-1
Content-Transfer-Encoding: quoted-printable
Content-Disposition: inline
Thanks Matthew. I am in process of installing DBD::Oracle 1.16 I am waiting=
for some internal permissions.=0AI will let you know. Thanks
=0AOn Fr=
i, 06 Jan 2006 Matthew Dougerty wrote :=0A>You need Oracle DBD. If it's th=
ere there will be per5~/DBD/Oracle.pm and an=0A>Oracle directory.=0A>=0A>On=
5 Jan 2006 19:01:35 -0000, Sunil A V wrote=0A> >=0A> > Hi,=0A> >=0A> > I a=
m trying this combination:=0A> > perl: v5.61=0A> > DBI: 1.25=0A> > Oracle: =
10g=0A> > OS: Solaris Unix=0A> > The directory /home/me/perlmods contains D=
BI.pm, DBI dir, DBD dir,=0A> > Bundle, etc=0A> >=0A> > In my perl program I=
am using=0A> > BEGIN {unshift(@INC,'/home/me/perlmods')}=0A> > use DBI;=0A=
> >=0A> > my $dbh =3D DBI->connect('DBI:Oracle','sid','user','pass') || die=
=0A> > "msg"; ...=0A> >=0A> > The program terminates at the connect line an=
d does not even print=0A> > the msg in the die statement.=0A> >=0A> > Is ve=
rsion a problem here OR is perl not able to find DBI OR should=0A> > i inst=
all DBD:Oracle as well? I am just using DBI for basic sql=0A> > fetch in pr=
eparedstatements.=0A> >=0A> > Thanks,=0A> > Sunil=0A>=0A>=0A>Matthew Doughe=
rty=0A>mdougher@inch.com=0A>973-325-8556=0A>AIM: mattsei=0A>=0A
--Next_1136495139---0-202.54.124.145-16269--
Workaround needed. Re: Re: perl DBI 1.25 not connectting to Oracle 10g
am 06.01.2006 00:48:48 von sunilav
--Next_1136504925---0-202.54.124.178-6420
Content-type: text/plain;
charset=iso-8859-1
Content-Transfer-Encoding: quoted-printable
Content-Disposition: inline
Now I am trying to install DBD::Oracle 1.16 version to Oracle 10.2.0.1.0_64=
db server.=0ASince I am using Perl 32 bit version 5.61 and I do not have p=
ermissions to upgrade it to 64 bit,=0AIS THERE A WORKAROUND to get this ins=
talled with 32 bit perl?
Initially I got the following error while run=
ning 'make'=0A-------------------------------
rm -f blib/arch/auto/=
DBD/Oracle/Oracle.so
LD_RUN_PATH=3D"/opt/oracle/product/10.2.0.1.0_=
64/lib32:/opt/oracle/product/10.2.0.1.0_64/rdbms/lib32" cc -G Oracle.o db=
dimp.o oci8.o -xarch=3Dv9 -L/opt/oracle/product/10.2.0.1.0_64/lib/ -L/opt/=
oracle/product/10.2.0.1.0_64/rdbms/lib/ -lclntsh `cat /opt/oracle/produ=
ct/10.2.0.1.0_64/lib/sysliblist` -R/opt/oracle/product/10.2.0.1.0_64/lib -l=
aio -lposix4 -lkstat -lm -lthread -lpthread -o blib/arch/auto/DBD/Oracle/=
Oracle.so
ld: fatal: file Oracle.o: wrong ELF class: ELFCLASS3=
2
ld: fatal: File processing errors. No output written to blib/arch=
/auto/DBD/Oracle/Oracle.so
*** Error code 1
make: Fatal err=
or: Command failed for target `blib/arch/auto/DBD/Oracle/Oracle.so'
--=
-----------------------------=0A =0AI got around the above problem by re=
moving -xrach=3Dv9 from all make files. It continued few steps further and =
is now giving
-------------------------------=0ARunning Mkbootstrap fo=
r DBD::Oracle ()
chmod 644 Oracle.bs
rm -f blib/arch/auto/DBD/Ora=
cle/Oracle.so
LD_RUN_PATH=3D"/opt/oracle/product/10.2.0 .1.0_64/lib32:/=
opt/oracle/product/10.2.0.1.0_64/rdbms/lib32" cc -G Oracle.o dbdimp.o oc=
i8.o -L/opt/oracle/product/10.2.0.1.0_64/lib/ -L/opt/oracle/product/10.2.0.=
1.0_64/rdbms/lib/ -lclntsh `cat /opt/oracle/product/10.2.0.1.0_64/lib/s=
ysliblist` -R/opt/oracle/product/10.2.0.1.0_64/lib -laio -lposix4 -lkstat =
-lm -lthread -lpthread -o blib/arch/auto/DBD/Oracle/Oracle.so
ld=
: fatal: file /opt/oracle/product/10.2.0.1.0_64/lib//libclntsh.so: wrong EL=
F class: ELFCLASS64
ld: fatal: File processing errors. No output writt=
en to blib/arch/auto/DBD/Oracle/Oracle.so
*** Error code 1
make: =
Fatal error: Command failed for target `blib/arch/auto/DBD/Oracle/Oracle.so=
'
=0A-------------------------------
On Fri, 06 Jan 2006 Ma=
tthew Dougerty wrote :=0A>You need Oracle DBD. If it's there there will be=
per5~/DBD/Oracle.pm and an=0A>Oracle directory.=0A>=0A>On 5 Jan 2006 19:01=
:35 -0000, Sunil A V wrote=0A> >=0A> > Hi,=0A> >=0A> > I am trying this com=
bination:=0A> > perl: v5.61=0A> > DBI: 1.25=0A> > Oracle: 10g=0A> > OS: Sol=
aris Unix=0A> > The directory /home/me/perlmods contains DBI.pm, DBI dir, D=
BD dir,=0A> > Bundle, etc=0A> >=0A> > In my perl program I am using=0A> > B=
EGIN {unshift(@INC,'/home/me/perlmods')}=0A> > use DBI;=0A> >=0A> > my $dbh=
=3D DBI->connect('DBI:Oracle','sid','user','pass') || die=0A> > "msg"; ...=
=0A> >=0A> > The program terminates at the connect line and does not even p=
rint=0A> > the msg in the die statement.=0A> >=0A> > Is version a problem h=
ere OR is perl not able to find DBI OR should=0A> > i install DBD:Oracle as=
well? I am just using DBI for basic sql=0A> > fetch in preparedstatements.=
=0A> >=0A> > Thanks,=0A> > Sunil=0A>=0A>=0A>Matthew Dougherty=0A>mdougher@i=
nch.com=0A>973-325-8556=0A>AIM: mattsei=0A>=0A
--Next_1136504925---0-202.54.124.178-6420--
RE: Workaround needed. Re: Re: perl DBI 1.25 not connectting to Oracle 10g
am 06.01.2006 17:46:05 von Andy
> Now I am trying to install DBD::Oracle 1.16 version to Oracle
> 10.2.0.1.0_64 db server.
> Since I am using Perl 32 bit version 5.61 and I do not have
> permissions to upgrade it to 64 bit,
> IS THERE A WORKAROUND to get this installed with 32 bit perl?
You can't use 64-bit Oracle libraries with 32-bit Perl. So you need either:
(1) 32-bit Oracle libraries, which tend to be in a "lib32" directory instead
of "lib" in the Oracle home.
But if I remember correctly, 32-bit Solaris support was removed from Oracle
10g. So you could use a previous version of Oracle (e.g. 9.2, or there seems
to be at least a 32-bit Instant Client for 10.1.0.3 at
http://www.oracle.com/technology/tech/oci/instantclient/inst antclient.html),
or,
(2) Recompile Perl to 64-bit to match, but you've said you can't do that.
--
Andy Hassall :: andy@andyh.co.uk :: http://www.andyh.co.uk
http://www.andyhsoftware.co.uk/space :: disk and FTP usage analysis tool
Re: Workaround needed. Re: Re: perl DBI 1.25 not connectting to Oracle 10g
am 09.01.2006 11:33:42 von hjp
--7qSK/uQB79J36Y4o
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable
On 2006-01-05 23:48:48 -0000, Sunil A V wrote:
> LD_RUN_PATH=3D"/opt/oracle/product/10.2.0.1.0_64/lib32:/opt/ oracle/produc=
t/10.2.0.1.0_64/rdbms/lib32"
> cc -G Oracle.o dbdimp.o oci8.o
> -L/opt/oracle/product/10.2.0.1.0_64/lib/
^^^^
> -L/opt/oracle/product/10.2.0.1.0_64/rdbms/lib/ -lclntsh =20
^^^^
> `cat /opt/oracle/product/10.2.0.1.0_64/lib/sysliblist`
> -R/opt/oracle/product/10.2.0.1.0_64/lib -laio -lposix4 -lkstat -lm=20
^^^^
> -lthread -lpthread -o blib/arch/auto/DBD/Oracle/Oracle.so =20
>=20
> ld: fatal: file /opt/oracle/product/10.2.0.1.0_64/lib//libclntsh.so: wron=
g ELF class: ELFCLASS64
Looks like you are linking against 64 bit libraries. Try replacing /lib
with /lib32 in the places I underlined above.
hp
--=20
_ | Peter J. Holzer | If I wanted to be "academically correct",
|_|_) | Sysadmin WSR | I'd be programming in Java.
| | | hjp@wsr.ac.at | I don't, and I'm not.
__/ | http://www.hjp.at/ | -- Jesse Erlbaum on dbi-users
--7qSK/uQB79J36Y4o
Content-Type: application/pgp-signature
Content-Disposition: inline
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.4 (GNU/Linux)
iQDQAwUBQ8I8BlLjemazOuKpAQGI/QXTB3RpkGU35ADIsHyvdrNet8HHlUqG DIJc
Bfas1e0A52edKIfPHcuK9v6y0QkiUyobXjhWGhTNwpzY20B34DpSPGYm5VkV mY9o
dH7+R1m5FC6ypPfao0JB3fX5C9R7qX5u6ggfwboR8OxnXl/ZpXuLzMTTEgVX D/m4
5mhmPQi8htgr15zk4eDyALf3oY/BaqCOoL7JaiyDdqpQOVLvkAw+Vj4nUO46 Kn+j
cPgfHcjYB0b3tT20DGPvaydTuQ==
=h+2U
-----END PGP SIGNATURE-----
--7qSK/uQB79J36Y4o--