Re: Oracle Longs - Malloc Problem

From: Jacqui Caren <Jacqui.Caren_at_ig.co.uk>
Date: 1998/11/19
Message-ID: <F2oJK5.K9q_at_ig.co.uk>#1/1


In article <362BA51E.2C39105D_at_anitesystems.be>, Paul O'Driscoll <paul.odriscoll_at_anitesystems.be> wrote:
>Does anyone have any experience selecting LONGS
>from an Oracle database with PERL.

Yes - do it all the time.

>I get a malloc panic error !!

Really, well done that man! :-)

Well assuming this is some form of guessing game;

my first guess is that you are running HP-UX. The fix is to upgrade HP-UX, install a clean perl, DBI and DBD::Oracle, or even go buy Solaris or Linux ;-)

The second guess is that you are running Solaris and have gcc. In this case make sure that you are not using the gcc linker (gld?) as this has some nasty effects.

Sorry, thats all the guess-time I have free :-)

Seriously, try the dbi-users mailing list, but before emailing these kind folks try providing some information about

 platform hardware
 platform operation system and patches

 version of Oracle server
 version of PRO*C
 ...

 version of perl (perl -V)
 version of DBI
 version of DBD::Oracle

 a small (10 line) test case with DBI_DEBUG set to 2. i.e.

  use DBI;
  my $dbh= DBI->connect('dbi:Oracle:tnsname','user','pass',{

        RaiseErrors=> 1, AutoCommit => 1 });
  ...

  $dbh->debug(2);
  my $sth = $dbh->prepare('select long_field from table');   $sth->execute();
  my $val;
  while (($val) = $sth->fetchrow_array()) {

         print length($val)."\n";
  }
  $sth->finish();
  $dbh->disconnect();

Also before asking, make sure that the version you are using is up to date. There is nothing worse telling the world you have a problem you cant fix then finding out a freely available upgrade (obvious answer #1) fixes it.

Of course, you could contact TPC - thay way you get people such as Tim Bunce (Mr DBI and DBD::Oracle) helping you, but remember that it is a *commerical* service - you pay to use it...

Hope this helps...
Jacqui

-- 
Email: Jacqui.Caren_at_ig.co.uk  http://www.ig.co.uk/
Fax  : +44 1483 419 419       http://www.perlclinic.com/
Phone: +44 1483 424 424       http://www.perl.co.uk/
Paul Ingram Group Ltd,140A High Street,Godalming GU7 1AB United Kingdom
Received on Thu Nov 19 1998 - 00:00:00 CET

Original text of this message