A cursor for-loop is a open-fetch-close construct, but
like all cursors on PL/SQL, Oracle does not *really*
close them when it encounters the close call.  This is
an efficiency measure to speed things up in the hope
that you will reuse them.

hth
connor

 --- JOSHY MON M C <[EMAIL PROTECTED]> wrote: >
resending the mail. Kindly ignore my prev mail with
> wrong subject.
> 
> Hi All,
> 
> I ve a stored proceure and with the following cursor
> defined. And after
> running the procedure, i see that No of open cursors
>  incresing. I checked
> it querying v$open_cursor like this. ( SELECT
> sql_text from v$open_cursor). 
> 
> CURSOR all_rules (l_ticket_type_id NUMBER) IS
>     SELECT rule_id , workflow_id FROM rule  
>       WHERE ticket_type_id =  l_ticket_type_id 
>       AND ews_flag=1
>       AND active_flag=1;
> 
> -- Cusror is processed as below..
> FOR term_rec IN all_terms( p_rule_id ) LOOP
>       -- do processing        
> END LOOP;
> 
> Since I m using CURSOR for stemennet its closed
> automaticaly. right?. But it
> doentnt seem closing as mentioned above ( when
> querried v$open_cursor). pls
> reply
> 
> PS:
> 
> Also in the stored procedure I use some SELECT
> statements, that too is shown
> when I query open_cursor as above. Do you know why
> no of open cursors
> increasing?
> 
> Thanks in advance
> Joshy
> -- 
> Please see the official ORACLE-L FAQ:
> http://www.orafaq.com
> -- 
> Author: JOSHY MON M C
>   INET: [EMAIL PROTECTED]
> 
> Fat City Network Services    -- 858-538-5051
> http://www.fatcity.com
> San Diego, California        -- Mailing list and web
> hosting services
>
---------------------------------------------------------------------
> To REMOVE yourself from this mailing list, send an
> E-Mail message
> to: [EMAIL PROTECTED] (note EXACT spelling of
> 'ListGuru') and in
> the message BODY, include a line containing: UNSUB
> ORACLE-L
> (or the name of mailing list you want to be removed
> from).  You may
> also send the HELP command for other information
> (like subscribing). 

=====
Connor McDonald
http://www.oracledba.co.uk
http://www.oaktable.net

"Remember amateurs built the ark - Professionals built the Titanic"

__________________________________________________
Do You Yahoo!?
Everything you'll ever need on one web page
from News and Sport to Email and Music Charts
http://uk.my.yahoo.com
-- 
Please see the official ORACLE-L FAQ: http://www.orafaq.com
-- 
Author: =?iso-8859-1?q?Connor=20McDonald?=
  INET: [EMAIL PROTECTED]

Fat City Network Services    -- 858-538-5051 http://www.fatcity.com
San Diego, California        -- Mailing list and web hosting services
---------------------------------------------------------------------
To REMOVE yourself from this mailing list, send an E-Mail message
to: [EMAIL PROTECTED] (note EXACT spelling of 'ListGuru') and in
the message BODY, include a line containing: UNSUB ORACLE-L
(or the name of mailing list you want to be removed from).  You may
also send the HELP command for other information (like subscribing).

Reply via email to