MVSFORUMS.com Forum Index MVSFORUMS.com
A Community of and for MVS Professionals
 
 FAQFAQ   SearchSearch   Quick Manuals   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

NO of cursors in a pgm

 
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> Database
View previous topic :: View next topic  
Author Message
rajkumarfit
Beginner


Joined: 19 Dec 2005
Posts: 8
Topics: 5

PostPosted: Tue Apr 04, 2006 9:53 am    Post subject: NO of cursors in a pgm Reply with quote

Hi all

Is there any limit for number of cursors to be opened in DB2?


Rajkumar
Back to top
View user's profile Send private message Send e-mail Yahoo Messenger
kolusu
Site Admin
Site Admin


Joined: 26 Nov 2002
Posts: 12378
Topics: 75
Location: San Jose

PostPosted: Tue Apr 04, 2006 10:41 am    Post subject: Reply with quote

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
View user's profile Send private message Send e-mail Visit poster's website
rajkumarfit
Beginner


Joined: 19 Dec 2005
Posts: 8
Topics: 5

PostPosted: Wed Apr 05, 2006 4:20 am    Post subject: Reply with quote

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
View user's profile Send private message Send e-mail Yahoo Messenger
kolusu
Site Admin
Site Admin


Joined: 26 Nov 2002
Posts: 12378
Topics: 75
Location: San Jose

PostPosted: Wed Apr 05, 2006 4:31 am    Post subject: Reply with quote

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
View user's profile Send private message Send e-mail Visit poster's website
Manas Biswal
Intermediate


Joined: 29 Nov 2002
Posts: 382
Topics: 27
Location: Chennai, India

PostPosted: Thu Apr 06, 2006 9:27 am    Post subject: Reply with quote

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
View user's profile Send private message Send e-mail Yahoo Messenger
schintala
Beginner


Joined: 18 May 2005
Posts: 108
Topics: 31
Location: USA

PostPosted: Fri Apr 07, 2006 9:36 am    Post subject: Reply with quote

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
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> Database All times are GMT - 5 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


MVSFORUMS
Powered by phpBB © 2001, 2005 phpBB Group