Oracle DBD runtime error
am 29.01.2007 23:55:34 von TMaragakis
------_=_NextPart_001_01C743F8.5F5F3118
Content-Type: text/plain;
charset="us-ascii"
Content-Transfer-Encoding: quoted-printable
I just installed DBI and Oracle DBD.
=20
I can run the following program without error as root:
=20
#!/bin/perl -w
=20
use DBI;
use DBD::Oracle;
=20
my $dbh=3DDBI->connect("dbi:Oracle:DWHDEVR1","scott","tiger");
=20
$dbh->disconnect();
=20
But when I try to run it under my own user ID I get the following error:
=20
Can't load
'/usr/perl5/site_perl/5.8.4/sun4-solaris-64int/auto/DBD/Orac le/Oracle
..so' for module DBD::Oracle: ld.so.1: perl: fatal:
/software/app/oracle/product/
10.1.0/db_1/lib32/libclntsh.so.10.1: Permission denied at
/usr/perl5/5.8.4/lib/s
un4-solaris-64int/DynaLoader.pm line 230.
at ./test.pl line 4
Compilation failed in require at ./test.pl line 4.
BEGIN failed--compilation aborted at ./test.pl line 4.
=20
It looks like a permissions problem but I cannot figure out where.
=20
The Oracle version is 10.1 on Solaris 10.
=20
Thanks,
=20
Terry Maragakis
------_=_NextPart_001_01C743F8.5F5F3118--
RE: Oracle DBD runtime error
am 30.01.2007 00:04:17 von matthew.ramadanovic
I don't know about 10 but on 9.2.0.4 you need to make sure to set up
your environment correctly. I usually have to set all of the following
variables with values like so :
LD_LIBRARY_PATH=3D/export/home/oracle/product/9.2.0/lib:/exp ort/home/orac=
l
e/product/9.2.0/lib32:/export/home/oracle/product/9.2.0/ctx/ lib
ORACLE_BASE=3D/export/home/oracle
ORACLE_HOME=3D/export/home/oracle/product/9.2.0
ORACLE_SID=3Dxxxx
NLS_LANG=3Damerican_america.we8iso8859p1 (normally only on windows)
Are any of these vastly different between a working and non working user
profile?
-M
-----Original Message-----
From: Terry Maragakis [mailto:TMaragakis@affinitymobile.com]=20
Sent: Monday, January 29, 2007 5:56 PM
To: dbi-users@perl.org
Subject: Oracle DBD runtime error
I just installed DBI and Oracle DBD.
=20
I can run the following program without error as root:
=20
#!/bin/sh
echo DEFANGED.74
exit
#!/bin/perl -w
=20
use DBI;
use DBD::Oracle;
=20
my $dbh=3DDBI->connect("dbi:Oracle:DWHDEVR1","scott","tiger");
=20
$dbh->disconnect();
=20
But when I try to run it under my own user ID I get the following error:
=20
Can't load
'/usr/perl5/site_perl/5.8.4/sun4-solaris-64int/auto/DBD/Orac le/Oracle
..so' for module DBD::Oracle: ld.so.1: perl: fatal:
/software/app/oracle/product/
10.1.0/db_1/lib32/libclntsh.so.10.1: Permission denied at
/usr/perl5/5.8.4/lib/s
un4-solaris-64int/DynaLoader.pm line 230.
at ./test.pl line 4
Compilation failed in require at ./test.pl line 4.
BEGIN failed--compilation aborted at ./test.pl line 4.
=20
It looks like a permissions problem but I cannot figure out where.
=20
The Oracle version is 10.1 on Solaris 10.
=20
Thanks,
=20
Terry Maragakis
RE: Oracle DBD runtime error
am 30.01.2007 15:46:52 von Philip.Garrett
Terry Maragakis wrote:
> I just installed DBI and Oracle DBD.
Did you also *just* install the Oracle client? Are you able to run
sqlplus
without problems?
Try this with your own user ID:
sqlplus scott/tiger@DWHDEVR1
> I can run the following program without error as root:
>=20
> #!/bin/perl -w
>=20
> use DBI;
> use DBD::Oracle;
> my $dbh=3DDBI->connect("dbi:Oracle:DWHDEVR1","scott","tiger");
> $dbh->disconnect();
>=20
> But when I try to run it under my own user ID I get the
> following error:
>=20
> Can't load '/usr/perl5/site_perl/5.8.4/sun4-solaris-
> 64int/auto/DBD/Oracle/Oracle.so' for module DBD::Oracle: ld.so.1:
> perl: fatal:
> /software/app/oracle/product/10.1.0/db_1/lib32/libclntsh.so. 10.1:
> Permission denied at /usr/perl5/5.8.4/lib/sun4-solaris-
> 64int/DynaLoader.pm line 230. at ./test.pl line 4 Compilation failed
> in require at ./test.pl line 4. BEGIN failed--compilation aborted at
> ./test.pl line 4.
>=20
> It looks like a permissions problem but I cannot figure out where.
My guess is that the Oracle installer set the permissions on the Oracle
client
needlessly strict.
With your own user ID, try to cd into
/software/app/oracle/product/10.1.0/db_1/lib32, one directory at a time
until you are stopped by permissions, e.g.:
me@local:~> cd /software
me@local:/software> cd app
me@local:/software/app> cd oracle
me@local:/software/app/oracle> cd product
me@local:/software/app/oracle/product> cd 10.1.0
me@local:/software/app/oracle/product/10.1.0> cd db_1
-bash: cd: db_1: Permission denied
If you don't run into problems there, check the permissions on
libclntsh.so.10.1 itself. Maybe it's missing the o+r bit.
Regards,
Philip