# Nested Cursors in Data Grid

**URL:** <https://forums.toadworld.com/t/nested-cursors-in-data-grid/11101>\
**Category:** Toad for Oracle & DevOps Toolkit\
**Created:** [March 30, 2012, 3:59pm UTC](https://forums.toadworld.com/t/nested-cursors-in-data-grid/11101 "2012-03-30T15:59:34Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![zephyruswest\_328](https://avatars.discourse-cdn.com/v4/letter/z/96bed5/32.png) [@zephyruswest\_328](https://forums.toadworld.com/u/zephyruswest_328)\
**Post date:** [March 30, 2012, 3:59pm UTC](https://forums.toadworld.com/t/nested-cursors-in-data-grid/11101/1 "2012-03-30T15:59:34Z")

</div>

Here is the problem we’ve run into:

If you run a select statement with a nested cursor, something like

select  
da.\*,  
cursor (select ‘Zeph’ from dual)  
from  
dba\_objects da;

The column containing the cursor executes the ‘open cursor’ for every row (never closing them). Our open\_cursors parameter in oracle is set to 1000, so when this result set gets very close to 1000, it blows up giving the ‘ORA-01000: maximum open cursors exceeded.’ error.

Running the same SQL via SQL\*Plus would work just fine, because it doesn’t automatically open the nested cursor (leaving it open). Also, our Java team (correctly) closes the nested cursor after they fetch from it each time.

Is there a setting in TOAD to basically ‘open’ these on-demand?

TOAD version 10.5.1.3 here… Any help is appreciated!
