Skip to Main Content

SQL & PL/SQL

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

ORA-1001 Invalid cursor

Narasimha GMay 1 2014 — edited May 1 2014

Hi Folks,

Facing a problem of ORA-1001 Invalid cursor while processing number of subscribers in a batch.  I am encountering this error for few subscribers only in a batch.

I am using a global constant inside my batch procedure to define max number of cursors allowed to open  (currently it is set to 20, gc_max_Cursor = 20).  And below is the sample logic to open, parse and close the cursor.

1: START

2: OPEN cursor

3:Check if the total_num_of_open_cursors > gc_max_cursor

     then

        close cursor;

    End if;

4: Parse cursor.

Looks like the cursor count is exceeding 20 and based on above coding block, cursor is getting closed before parsing it.

I am planning to increase gc_max_cursor value to 50.  Could you please let me know on below points?

1.  Will it have any performance impact?

2. Do I need to increase the parameter value open_cursors subsequently on increasing of gc_max_cursor?

Appreciate your time and help on this long email.

Best regards,

Narasimha.

Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on May 29 2014
Added on May 1 2014
4 comments
2,261 views