Hello all,

I am having difficulty connecting to Oracle with DBI.  Here is the
background info.  I am running Windows 2000 client and server.  I am able to
connect fine to the oracle database via sqlplus.  A tnsping also comes back
with the proper info.  The oracle database also shows up fine when I list
the available datasources via the statement :  my @dataSources =
DBI->data_sources( $driver ); 

Here is the offending code:

use DBI;

DBI->trace(1);
my $dbh = DBI->connect("dbi:Oracle:MYDB", "Username", "Password", 
        { PrintError=>0,
          RaiseError=>0
         })      
        or die "Cannot connect to oracle: $DBI::err -- $DBI::errstr\n";


and here is the result:

    DBI 1.14-nothread dispatch trace level set to 1
    -> DBI->connect(dbi:Oracle:MYDB, Consumer, ****, HASH(0x1a7f0dc))
    -> DBI->install_driver(Oracle) for perl=5.006001 pid=1564 ruid=0 euid=0
       install_driver: DBD::Oracle loaded (version 1.06)
    <- install_driver= DBI::dr=HASH(0x1ba7484)
2   <- debug= 1 at Oracle.pm line 90.
Trying to fetch ORACLE_HOME and ORACLE_SID from the registry.
Use of uninitialized value in concatenation (.) or string at
C:/Perl/site/lib/DBD/Oracle.pm line 125.
Found  @ c:\oracle\ora9.
Loading c:\oracle\ora9/network/admin/tnsnames.ora
Found MYDB.
    <- connect= undef at DBI.pm line 408.
    <- errstr= '.dA.?A°w (DBD: login failed, check your config, e.g.
ORACLE_HOME/bin on your PATH etc)' at DBI.pm line 409.
       DBI->connect(MYDB) failed: êdA??A°w (DBD: login failed, check your
config, e.g. ORACLE_HOME/bin on your PATH etc)
Cannot connect to oracle: 0 -- êdA??A°w (DBD: login failed, check your
config, e.g. ORACLE_HOME/bin on your PATH etc)
    <- DESTROY= undef at unknown location!
    <- disconnect_all= '' at DBI.pm line 450.
    <- DESTROY= undef during global destruction.


I have tried setting the following variables to no avail ORACLE_HOME and
TWO_TASK.  Any help would be appreciated.

JF




**********************************************************************
This email and any files transmitted with it are confidential and
intended solely for the use of the individual or entity to whom they
are addressed. If you have received this email in error please notify
the system manager.

This footnote also confirms that this email message has been swept by
MIMEsweeper for the presence of computer viruses.

www.mimesweeper.com
**********************************************************************

Reply via email to