develooper Front page | perl.dbi.users | Postings from February 2001

Re: Oracle DBD: space leak and max open cursors errors

Thread Previous | Thread Next
From:
Eli
Date:
February 21, 2001 06:37
Subject:
Re: Oracle DBD: space leak and max open cursors errors
Message ID:
3A93D277.BFF30A7C@celera.com

I guess I wasn't completely clear. This process is a long running server
process that will do thousands of statements, so just increasing the max
number of open cursors isn't the correct solution. What I need to do is
figure out how to release the open cursors that DBI is creating during
the binding or execution of the inout param. I don't really know OCI, so
even a suggestion of what needs to be called where would be useful. 

Thanks for the help

-Eli


Eli wrote:
> 
> I'm getting:
> 
> DBD::Oracle::db disconnect failed: ORA-00600: internal error code,
> arguments: [729], [360], [space leak], [], [], [], [], [] (DBD ERROR:
> OCISessionEnd)
> 
> This is after calling a stored procedure which returns some data through
> a inout parameter around 50 times. The disconnect is in our error
> handeling. The error that sends us to disconnect is:
> 
>  DBD::Oracle::st execute failed: ORA-01000: maximum open cursors
> exceeded
> 
> Our DBI code inside the loop looks like:
> 
>   my $procedure = q{
>       BEGIN
>         RAP.GET_NEXT_JOB(:id, :cmd, :bsub);
>       END;
>   };
>   my $sth = $dbh->prepare_cached( $procedure ) || confess "Can't
> prepare";
> 
>   $sth->bind_param_inout(":id", $identifier, 20, DBI::SQL_INTEGER);
>   $sth->bind_param_inout(":cmd", $command, 512, DBI::SQL_VARCHAR);
>   $sth->bind_param_inout(":bsub", $bsub, 512, DBI::SQL_VARCHAR);
> 
>   $sth->execute;
> 
> We tried putting a $sth->finish after the execute, but that doesn't
> change anything. It seems to be something to do with the inout param
> because we do something very similar with only in params and never have
> the problem.
> 
> Any ideas or suggestions?
> 
> thanks
> 
> -Eli

Thread Previous | Thread Next


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About