Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl Monk, Perl Meditation
 
PerlMonks  

Re: DBI - cursors left open in Oracle

by seesik (Initiate)
on Sep 08, 2001 at 23:05 UTC ( [id://111201]=note: print w/replies, xml ) Need Help??


in reply to DBI - cursors left open in Oracle

first off, what dbd::oracle version are you using? i had some trouble w/ 1.03 and cursor refs, but nothing on 1.06.

secondly, are you using pl/sql cursors, or just the statement handle cursor? can we see your query, and can you tell us what your database's open_cursors/max_open_cursors init param is (check v$parameter)?

remember, $sth->finish does NOT DESTROY the handle. it just sets the handle's Active attribute to false. you could try undef'ing the handle explicitly just to see if it get's gc'd.

lastly, if you're on a production machine, i'd advise getting off of 8.1.5x altogether; either downgrade to 8.0.5 or up to 8.1.7 (skip 8.1.6 and 9.0.1).there have been a few times now that i've seen 8.1.5's SMON freak out and chew up 99% cpu time just trying to allocate extents. not that this has anything to do w/ your cursor issue...

Replies are listed 'Best First'.
Re: Re: DBI - cursors left open in Oracle
by Anonymous Monk on Sep 09, 2001 at 00:43 UTC
    I don't have anything new to add other than to reiterate what seesik mentioned based on my experience. Consider it a second opinion ;-)

    Upgrade to 8.1.7. Your mother would tell you that it's good for you. And undef every handle after you've finished with it.

    Hope this helps!

Re: Re: DBI - cursors left open in Oracle
by Stegalex (Chaplain) on Sep 09, 2001 at 21:15 UTC
    DBD::Oracle version 1.06

    This particular cursor is a statemtent handle cursor of the form:

    $sql = "select 'x', 'y' from dual";
    $sth=$dbh->prepare(qq{$sql});
    $sth->execute;
    ($x, $y) = $sth->fetchrow_array;
    $sth->finish;

    open_cursors parameter is 50
    there does not seem to be a max_open_cursors param defined

    Thanks for any and all comments!

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://111201]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others surveying the Monastery: (3)
As of 2024-04-19 05:45 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found