> -----Original Message-----
> From: Vartak, Yash V [mailto:[EMAIL PROTECTED]
> Sent: 14 October 2008 04:04
> To: [email protected]
> Subject: Error connecting to DB
> 
> Dist,
> 
> I am trying to connect to Oracle DB (9i) .. I can access the same DB
> using toad / Sql Navigator.
> 
> <code>
> 
> use strict;
> 
> 
>          use DBI;
> 
> 
>          my $dbh = DBI->connect( 'dbi:Oracle:dbName',
> 
> 
>                                  'userName',
> 
> 
>                                  'Password',
> 
> 
>                                ) || die "Database connection not made:
> $DBI::errstr";
> 
> 
> 
>          print "Past Bind\n";
> 
>         $dbh->disconnect;
> 
> 
> </code>
> 
> This gives me following error
> 
> D:\Prj11>perl db.pl
> 
> install_driver(Oracle) failed: Can't load
> 'C:/Perl/site/lib/auto/DBD/Oracle/Orac
> 
> le.dll' for module DBD::Oracle: load_file:The specified procedure
could
> not be f
> 
> ound at C:/Perl/lib/DynaLoader.pm line 230.
> 
>  at (eval 4) line 3
> 
> Compilation failed in require at (eval 4) line 3.
> 
> Perhaps a required shared library or dll isn't installed where
expected
> 
>  at db.pl line 3
> I Believe this is because  it cannot find  your  Oracle environment.

Your script need to have  access to the  oracle variables in the shell.
TOAD  find  out about oracle environment on its own and SQL Nav probably
does  much the same.

Check your  oracle installation,  but you will need  vars like the  ones
below.  They  are for may so  DYLD_LIBPATH  will be  LIBPATH on other
*nix  flavours.


ORACLE_HOME=/usr/local/oracle/instantclient10_
DYLD_LIBRARY_PATH=/usr/local/oracle/instantclient10_1:/usr/local/oracle/
instantclient10_1:
PATH=/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/oracle/inst
antclient10_1
SQLPATH=/usr/local/oracle/instantclient10_1
TNS_ADMIN=/usr/local/oracle/instantclient10_1


Stu




Information in this email including any attachments may be privileged, 
confidential and is intended exclusively for the addressee. The views expressed 
may not be official policy, but the personal views of the originator. If you 
have received it in error, please notify the sender by return e-mail and delete 
it from your system. You should not reproduce, distribute, store, retransmit, 
use or disclose its contents to anyone. Please note we reserve the right to 
monitor all e-mail communication through our internal and external networks. 
SKY and the SKY marks are trade marks of British Sky Broadcasting Group plc and 
are used under licence. British Sky Broadcasting Limited (Registration No. 
2906991), Sky Interactive Limited (Registration No. 3554332), Sky-In-Home 
Service Limited (Registration No. 2067075) and Sky Subscribers Services Limited 
(Registration No. 2340150) are direct or indirect subsidiaries of British Sky 
Broadcasting Group plc (Registration No. 2247735). All of the companies 
mentioned in this paragraph are incorporated in England and Wales and share the 
same registered office at Grant Way, Isleworth, Middlesex TW7 5QD.

Reply via email to