I think you can turn that one off by using WARN
 
http://search.cpan.org/~timb/DBI-1.616/DBI.pm#Warn
 
if memory serves me correctly it is a true 'warn()'  and not a PrintWarn.
 
It is very deep in the code.  I think in Driver.xst.
 
It is at the DBI side of things and has nothing to to with DBD::Oracle
 
Not sure if this will work in  DBI 1.30 though as I do not have that code base 
arount to look at.
 
Hope this helps
 
cheers
John
 

> Subject: Re: Turn off "Issuing rollback..." warning for AutoCommit.
> From: da...@kineticode.com
> Date: Wed, 24 Aug 2011 09:52:22 -0700
> CC: dbi-users@perl.org
> To: tigerpeng2...@yahoo.com
> 
> On Aug 24, 2011, at 7:51 AM, tiger peng wrote:
> 
> > I am subclassing DBI for authenticating purpose by overwriting connection.
> > 
> > I try to turn off warning message "Issuing rollback() for database handle 
> > being DESTROY'd without explicit disconnect()" by explicitly issuing 
> > rollback, disconnect and set AutoCommit to 0 without success. Could you 
> > please provide any solution and/or suggestion? My environment is quite old 
> > (Perl/5.80; DBI/1.30; DBD::Oracle/1.12).
> 
> Well first of all, upgrade Perl and those modules, if at all possible. That 
> DBI is NINE YEARS OLD!
> 
> As for the warning, what I generally do is disconnect in an END block right 
> after I connect, like so:
> 
> my $dbh = DBI->connect('dbi:Oracle:...');
> 
> END { $dbh->disconnect if $dbh }
> 
> I also recommend against having AutoCommit set to 0, as that means you have a 
> transaction open all the time. You should just use transactions when you have 
> reason to use them, that is for database writes.
> 
> Best,
> 
> David
> 
                                          

Reply via email to