View previous topic :: View next topic |
Author |
Message |
rajkumarfit Beginner
Joined: 19 Dec 2005 Posts: 8 Topics: 5
|
Posted: Tue Apr 04, 2006 9:53 am Post subject: NO of cursors in a pgm |
|
|
Hi all
Is there any limit for number of cursors to be opened in DB2?
Rajkumar |
|
Back to top |
|
 |
kolusu Site Admin

Joined: 26 Nov 2002 Posts: 12378 Topics: 75 Location: San Jose
|
Posted: Tue Apr 04, 2006 10:41 am Post subject: |
|
|
rajkumarfit,
It depends on the THREAD/SESSION Limits defined in your system. Ask your DBA to find the out the thread limits.
Hope this helps...
Cheers
Kolusu _________________ Kolusu
www.linkedin.com/in/kolusu |
|
Back to top |
|
 |
rajkumarfit Beginner
Joined: 19 Dec 2005 Posts: 8 Topics: 5
|
Posted: Wed Apr 05, 2006 4:20 am Post subject: |
|
|
hi Kolusu
thanks for ur reply. but i want to know the No: of Cursors can be opened simultaneously in a pgm. |
|
Back to top |
|
 |
kolusu Site Admin

Joined: 26 Nov 2002 Posts: 12378 Topics: 75 Location: San Jose
|
Posted: Wed Apr 05, 2006 4:31 am Post subject: |
|
|
Quote: |
thanks for ur reply. but i want to know the No: of Cursors can be opened simultaneously in a pgm.
|
rajkumarfit,
Every Sql execueted in the pgm is a thread to DB2. So the no: of cursors you can open depends on the THREAD limit defined in your system by your DBA which is explained in my earlier post.
Kolusu _________________ Kolusu
www.linkedin.com/in/kolusu |
|
Back to top |
|
 |
Manas Biswal Intermediate

Joined: 29 Nov 2002 Posts: 382 Topics: 27 Location: Chennai, India
|
Posted: Thu Apr 06, 2006 9:27 am Post subject: |
|
|
kolusu,
An attachment thread to DB2 is established whenever there is a connection attempt to DB2 - From TSO/DSN, CICS, thru DDF etc. Every SQL executed from within the same program will not be a thread to DB2.
rajkumarfit,
As far as I know (I am not completely sure of this), there is no hard limit on the number of open cursors per thread or per application(in V7). The number of open cursors you can have depends on various storage limits set using DSNZPARM parameters. I won't go to the details here.
I remember reading somewhere that in v8, there is an explicit DSNZPARM parameter that specifies the maximum number of open cursors per thread.
HTH...Regards,
Manas _________________ There is no path to peace. Peace is the path.
- Mahatma Gandhi (1869-1948) |
|
Back to top |
|
 |
schintala Beginner
Joined: 18 May 2005 Posts: 108 Topics: 31 Location: USA
|
Posted: Fri Apr 07, 2006 9:36 am Post subject: |
|
|
You can delcare cursors as many as you want. It all depends on size of the Bufferpool. As Manas Biswal said nothing to do with DB2 threads and it purely depends on storage parameter. |
|
Back to top |
|
 |
|
|