Hello All,

I am trying to use DBI and DBD::Oracle to write a script that queries
all of the database instances on a given server to collect
initialization parameters and other statistical info.

The server I am working on has multiple releases of Oracle on it,
specifically 8.1.7.4 and 9.2.0.4.  I noticed today while doing some
testing that my DBI call to open a database query will fail depending on
which environmental variables I have set in my shell.

Here's the DBI call.. pretty basic stuff.

my $dbh = DBI->connect( 'dbi:Oracle:<SID>', 'system', <password>',
{RaiseError => 1, AutoCommit => 0}) || die DBI->errstr;

The database in question is an 8.1.7.4 database.  When I have the
8.1.7.4 ORACLE_HOME and other environmental variables set in my shell,
the query works without issue.  When I have the 9.2.0.4 variables set, I
get the following error:

DBI connect('<SID>','system',...) failed: (no error string) at
./test.pl line 40

This is a Sun server, so I keep master copies of the TNSNAMES.ORA file
in /var/opt/oracle with symlinks in both ORACLE_HOME/network/admin
directories.  Regardless of which set of variables I'm using, I can
tnsping and connect to databases of ether release.

Can anyone think of a quick reason why I would be seeing this?

I am using Perl 5.6.1 and the copy of DBI that was released this week.


Thanks,

Bart



Bart Kersteter

Senior DBA - Corporate Database
Assurant
576 Bielenberg Drive
Woodbury, MN 55125
[EMAIL PROTECTED]
(651) 361-5796


**************************************************************************************
This e-mail message and all attachments transmitted with it may contain legally 
privileged and/or confidential information intended solely for the use of the 
addressee(s). If the reader of this message is not the intended recipient, you are 
hereby notified that any reading, dissemination, distribution, copying, forwarding or 
other use of this message or its attachments is strictly prohibited. If you have 
received this message in error, please notify the sender immediately and delete this 
message and all copies and backups thereof.

Thank you.
**************************************************************************************

Reply via email to