On Wed, 2008-05-21 at 23:53 +1000, Ken Foskey wrote:
> I have a program that will run literally for days and days.  It monitors
> logs by file tail.  Problem is that I think the DBI is causing problems.
> It is constantly connecting and reconnecting to DB2 for every
> transaction.

The original did not make much sense reading it back.

I want to redesign the application to have an open connection
permanently.  Problem is that I don't trust it,  what happens if DB2 is
shutdown for instance.   I have to recover the connection.  Problem is I
cannot figure out how to check the connection is still OK without
calling something an have it fail.

What I would like to do is replace my connect subroutine with a grab a
cached DBI handle,  check it is still connected and if it is not
'actually' connected,  ie crashed,  then reconnect it an return the new
DBI handle.

Anyone know of a way to tell that a handle is still valid?

Ken


-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
http://learn.perl.org/


Reply via email to