I changed the script as you suggested
#!/opt/perl5.6.1/bin/perl -w
use strict;
use DBI;
my $dbh = DBI->connect( 'dbi:Oracle:p1db',
'partner1',
'p1admin',
{
RaiseError => 1,
AutoCommit => 0
}
) || die "Database connection not made: $DBI::errstr";
$dbh->disconnect();
The Error is still the same .
install_driver(Oracle) failed: Can't load
'/opt/perl5.6.1/lib/site_perl/5.6.1/PA-RISC2.0/auto/DBD/Oracle/Oracle.sl'
for module DBD::Oracle: No such file or dire
ctory at /opt/perl5.6.1/lib/5.6.1/PA-RISC2.0/DynaLoader.pm line 206.
at (eval 1) line 3
Compilation failed in require at (eval 1) line 3.
Perhaps a required shared library or dll isn't installed where expected
Before Running the script I set up all the env valiables
export ORACLE_HOME=/archive/newdisk/oracle9i
export SHLIB_PATH=/opt/perl5.6.1/lib:$ORACLE_HOME/lib:/usr/lib
export LD_LIBRARY_PATH=$ORACLE_HOME/lib:$ORACLE_HOME/Apache/Apache/libexec
export PERL5LIB=/opt/perl5.6.1/lib/site_perl/5.6.1:/opt/perl5.6.1/lib/5.6.1:
/opt/perl5.6.1/lib/5.6.1/PA-RISC2.0:/opt/perl5.6.1/lib/site_perl/5.6.1/PA-RI
SC2.0
The File Oracle.sl is present in that directory
boi307@/opt/perl5.6.1/lib/site_perl/5.6.1/PA-RISC2.0/auto/DBD/Oracle% ll
total 12976
-rwxr-xr-x 1 bin bin 0 Feb 1 2002 Oracle.bs
-rwxr-xr-x 1 bin bin 2402 May 2 2000 Oracle.h
-rwxr-xr-x 1 bin bin 6602752 Feb 1 2002 Oracle.sl
-rwxr-xr-x 1 bin bin 9868 Aug 30 2001 dbdimp.h
-rwxr-xr-x 1 bin bin 15733 Feb 1 2002 mk.pm
-rwxr-xr-x 1 bin bin 11204 Aug 30 2001 ocitrace.h
Next went to ORACLE_HOME/lib and did ll *oc* and got these results
boi307@/archive/newdisk/oracle9i/lib% ll *oc*
lrwxrwxr-x 1 oracle dba 14 Aug 6 12:50 libocci.sl ->
libocci.sl.9.0
-rwxr-xr-x 1 oracle dba 953832 Apr 27 11:12 libocci.sl.9.0
-rw-r--r-- 1 oracle dba 4549378 Apr 27 07:36 libocci9.a
-rw-r--r-- 1 oracle dba 211302 Apr 26 04:01 libocijdbc9.a
-rwxr-xr-x 1 oracle dba 155248 Apr 27 12:50 libocijdbc9.sl
-rwxr-xr-x 1 oracle dba 188120 Apr 27 12:50 libocijdbc9_g.sl
-rw-r--r-- 1 oracle dba 211302 Apr 26 04:01 libocijdbcst9.a
So I am not sure how to find exactly which shared library it is looking for
?
Thanks
Sanjay
-----Original Message-----
From: Michael A Chase [mailto:[EMAIL PROTECTED]]
Sent: Sunday, August 18, 2002 9:20 AM
To: WAZA, SANJAY (Non-HP-PaloAlto, ex1); [EMAIL PROTECTED]
Subject: Re: DBI Error
On Sat, 17 Aug 2002 23:09:30 -0400 "WAZA,SANJAY (Non-HP-PaloAlto,ex1)"
<[EMAIL PROTECTED]> wrote:
> I am running this simple script on HP UX 11.0 (64 BIT) . The database is
> Oracle 9.2.0
>
> #!/opt/perl5.6.1/bin/perl
#!/opt/perl5.6.1/bin/perl -w
> use DBI;
# -w and 'use strict;' show you small problems before they become big ones
use strict;
> print "hello\n" ;
> $dbh = DBI->connect(mydb,scott,tiger,'Oracle') ;
# You _really_ need to check for errors.
# run `perldoc DBI` to see the newer (5 years old) connect() syntax
my $dbh = DBI -> connect( "dbi:Oracle:mydb", "scott", "tiger",
{ "PrintError" => 0, "RaiseError => 1, "AutoCommit" => 0 } );
> I am getting this error
> install_driver(Oracle) failed: Can't load
> '/opt/perl5.6.1/lib/site_perl/5.6.1/PA-RISC2.0/auto/DBD/Oracle/Oracle.sl'
> for module DBD::Oracle: No such file or dire
> ctory at /opt/perl5.6.1/lib/5.6.1/PA-RISC2.0/DynaLoader.pm line 206.
> at (eval 1) line 3
> Compilation failed in require at (eval 1) line 3.
> Perhaps a required shared library or dll isn't installed where expected
Did you read the error message?
If Oracle.sl is in the directory mentioned, then one of the shared
libraries it calls could not be found, probably OCI.sl or something similar
which is normally in $ORACLE_HOME/lib .
Shared libraries are usually located via LD_LIBRARY_PATH which _MUST_ be
set before the Perl interpreter starts. Oracle.sl is an exception since it
must be in a known location relative to DBD/Oracle.pm. Another environment
variable that should be set before the script starts is ORACLE_HOME.
--
Mac :})
** I normally forward private questions to the appropriate mail list. **
Ask Smarter: http://www.tuxedo.org/~esr/faqs/smart-questions.html
Give a hobbit a fish and he eats fish for a day.
Give a hobbit a ring and he eats fish for an age.