db connection trouble



Hello DBI folks.

I have a problem with DBD::Oracle connection, description follows:

Perl script creates connection to an Oracle server and works with db
like db proxy (daemon). Sometimes script reconnects. Everything is
fine, but if script do nothing about 2 hours it stucks.

---------------------------------------------------------------------

parts of script:

use strict;
use DBI;
use DBD::Oracle;
use Socket;

....

sub db_connect{

$DBH = DBI->connect('dbi:Oracle:'.$DBSID, $DBUSER,
$DBPASS,{AutoCommit=>1,RaiseError=>0})

}

.....

sub db_reconnect{
undef $DBH;
if(&db_connect()){
return 1;
}
else{
return 0;
}
}
---------------------------------------------------------------------

Trace of normal reconnect and unnormal reconnects are in attachments.

Thanks in advance.

--
WBR, Eugene Krivdyuk

Attachment: normal_reconnect.log
Description: Binary data

Attachment: unnormal_reconnect.log
Description: Binary data



Relevant Pages

  • problem connecting pipes in Expect.pm
    ... Here is a script I'm working on to connect to various lpars ... lpar, but then the script does not connect the user's stdin ... sub findlpar { ... # wait for connection prompt ...
    (comp.lang.perl.misc)
  • problem connecting pipes in Expect.pm
    ... Here is a script I'm working on to connect to various lpars ... lpar, but then the script does not connect the user's stdin ... sub findlpar { ... # wait for connection prompt ...
    (comp.lang.perl.modules)
  • Scripting: Zipping files and checking Network Share
    ... I am trying to write a script that performs a few specific ... Copy source files to destination only if they do not exsist on the ... out how to have it loop until a successful connection is made - and send out ... Sub CopySource() ...
    (microsoft.public.scripting.vbscript)
  • Re: dialup solution (as seconary connection / iptables )
    ... ip-down is launched by pppd only after the PPP link no longer available ... first with MINICOM or is PAP and script not mutualy exclusive? ... do have to "make the connection first with MINICOM." ... If you use the Linux box and route the news IP address to it on each ...
    (comp.os.linux.networking)
  • Re: Scripting: Zipping files and checking Network Share
    ... I am trying to write a script that performs a few specific ... Copy source files to destination only if they do not exsist on the ... out how to have it loop until a successful connection is made - and send ... Sub CopySource() ...
    (microsoft.public.scripting.vbscript)