http://www.perlmonks.org?node_id=602967

spivey3587 has asked for the wisdom of the Perl Monks concerning the following question:

Greetings Monks,

We recently upgraded DBD::Oracle to 1.16 (from 1.12) and since then it seems that $DBI::errstr is never set. This happens on any error such as a prepare, execute, or connection error. Has anyone heard of a bug with this specific version? I saw nothing in the version change log. I didn't personally do the upgrade, but I didn't read that there are special switches needed during installation to turn this on. We're running perl 5.6.2, DBI 1.35, and Oracle 10g in a pool of linux servers.

Code like this no longer produces the expected results saying that the column is invalid:

my $dbh = DBI->connect( "dbi:Oracle:$database", $user, $passwd, {AutoC +ommit => 0, RaiseError => 1, PrintError => 0}) || die "Can't connect +to database: $DBI::errstr"; my $qry = $dbh->prepare(q{ select BAD__column from users where id=1254 +3256 }) or die "Prepare bad: $DBI::errstr"; ------OUTPUT------ Use of uninitialized value in concatenation (.) or string at ./dbitest +.pl line 15. Prepare bad: at ./dbitest.pl line 15. ------END--------

I see lots of indicators that $DBI::errstr is undef, mainly the -w switch output about using an uninit'd value. I've also seen errstr=undef when I turn DBI->trace on. Has anyone heard of this issue or know of a work-around? I've tried every trapping mechanism I know of, but none work indicating that it must be a lower-level issue with our DBD::Oracle upgrade (and because it works fine on other machines that were left on DBD 1.12).

Thanks! -Darin