Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.misc -> Re: Simple issue for a perl/Oracle guru?

Re: Simple issue for a perl/Oracle guru?

From: Chris Boyle <cboyle_at_no.spam.hargray.com>
Date: Wed, 6 Mar 2002 14:42:42 -0500
Message-ID: <a65rej$21nt$1@news3.infoave.net>


Not an expert by any means but did you remove the line for use DBD::Oracle when you posted the script or was it never there? Im a perl newbie also so i am not sure if it is needed but i thought that DBI required a DBD to function.

"Lee Crampton" <lee_at_avbrief.com> wrote in message news:0%qh8.109944$Ah1.15179171_at_news2-win.server.ntlworld.com...
> Any suggestions gratefully received.
> Thanks in advance.
> Lee
>
> I have a test perl script which does little more than create (in a loop)
new
> objects, each of which connects to the DB.
> The trouble is the script hangs after the second connection. I have
> simplified everything and cannot see what might be causing this issue even
> after viewing trace output.
>
> The process ends up hung like this:
>
> root 31307 0.0 0.3 1820 812 pts/0 S 15:49 0:00 make test
> root 31316 92.5 4.4 12904 11384 pts/0 R 15:49 0:27
> /usr/bin/perl -Iblib/arch -Iblib/lib -I/usr/lib/perl5/5.6
> oracle 31318 0.2 0.0 0 0 ? Z 15:49 0:00 [oracle
> <defunct>]
>
> Here's the loop:
> ------------------------------------------------
> for (my $i = 1; $i < 10; $i++)
> {
> my $logger = new DBlog ({ dbtype => $dbd, dbname => 'DBlog', dbtable
=>
> $tablename });
> # all other code removed
> }
> ------------------------------------------------
>
> I have reduced the perl module to the following:
> ------------------------------------------------
> package DBlog;
> use strict;
> use vars qw($VERSION @ISA @EXPORT @EXPORT_OK);
> use DBI;
> use Data::Dumper;
> use Avbrief::Util;
>
> require Exporter;
> require AutoLoader;
>
> @ISA = qw(Exporter AutoLoader);
> @EXPORT = qw();
> $VERSION = '0.01';
>
> sub new
> {
> my ($pkg, $data) = @_;
>
> $data->{dbh} = DBI->connect ($datasource, "SYSTEM", "MANAGER") or
> die "Could not connect:$DBI::errstr";
> return bless $data, $pkg;
> }
>
> sub DESTROY
> {
> my ($data) = @_;
> $data->{dbh}->disconnect ();
> }
> ------------------------------------------------
>
>
Received on Wed Mar 06 2002 - 13:42:42 CST

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US