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

I'm seeking enlightment on the following wierd problem. I'm using DBI 1.14 vs. Oracle 8.1.7 database. After disconnecting from the database i get a core dump, if the script ends. If the script runs a while after the disconnect everything seems perfect. This leads to a core dump in 50 to 70 %
#! /soft/perl5/bin/perl require DBI; $dbh = DBI->connect( "dbi:Oracle:", "v3fadm", "v3fadm", { RaiseError => 1, AutoCommit => 0 } ); $dbh->disconnect;
This works perfect
#! /soft/perl5/bin/perl require DBI; $dbh = DBI->connect( "dbi:Oracle:", "v3fadm", "v3fadm", { RaiseError => 1, AutoCommit => 0 } ); $dbh->disconnect; sleep 1000;
The only difference is the sleep 1000 at the end of the script. If there were some other statements which take some time, it would do the same. The sleep 1000 seems to be some kind of work-around, at least keeps the manager from kicking my butt, but is somewhat unsatisfying.

Replies are listed 'Best First'.
Re: core dump after DBI-disconnect
by OM_Zen (Scribe) on Jan 28, 2003 at 18:35 UTC
    Hi ,

    use strict; use DBI; my $dbh = DBI->connect( "dbi:Oracle:<B> The Schema Name</B>", "v3fadm", "v3fadm", { RaiseError => 1, AutoCommit => 0 } ) || die "the parameters for connect doe +s not let user in : $dbh->errstr \n"; <B> my $disconnect = $dbh->disconnect();</B>


    you have to use strict; use DBI instead of require and print the error if it does not connect and then the $dbh->disconnect has a return variable a scalar .
Re: core dump after DBI-disconnect
by hardburn (Abbot) on Jan 28, 2003 at 17:11 UTC

    Use use instead of require. And use strict, too. These might make your problem magically go away (no guarentees, though).

Re: core dump after DBI-disconnect
by Anonymous Monk on Jan 28, 2003 at 19:06 UTC
    What DBD::Oracle version are you using? Have you tried upgrading DBI and DBD::Oracle? DBI is currently at 1.32, DBD::Oracle at 1.12. This bug might have already been fixed.
Re: core dump after DBI-disconnect
by iguanodon (Priest) on Jan 28, 2003 at 18:25 UTC
    I'd consider upgrading your DBI module, 1.14 is pretty old. And if your DBI is that old, how about your DBD::Oracle? Is that compatible with Oracle 8.1.7?

Re: core dump after DBI-disconnect
by Anonymous Monk on Jan 31, 2003 at 15:15 UTC
    DBD is 1.06. I'll give an upgrade a try. Use strict didn't make a difference, at least not with the used DBI/DBD version.