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.