IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

SQL Commit


IBM Mainframe Forums -> DB2
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
meenakshi_forum
Warnings : 1

Active User


Joined: 27 May 2008
Posts: 121
Location: India

PostPosted: Mon Apr 26, 2010 3:42 pm
Reply with quote

Hi,

Suppose there is a cursor which is expected to(this is just an assumption) to fetch 1000 records but after fetching every 2nd record the tracnscations are expected to be commited, then what would happen to the cursor?

Thanks!
Back to top
View user's profile Send private message
Escapa

Senior Member


Joined: 16 Feb 2007
Posts: 1399
Location: IL, USA

PostPosted: Mon Apr 26, 2010 3:47 pm
Reply with quote

The best would be "try yourself" and then if you are blank about why this is happening "so" post it here.
Back to top
View user's profile Send private message
Kjeld

Active User


Joined: 15 Dec 2009
Posts: 365
Location: Denmark

PostPosted: Mon Apr 26, 2010 4:04 pm
Reply with quote

Hint: It makes a difference if you define you cursor with WITH HOLD or not.
Back to top
View user's profile Send private message
dbzTHEdinosauer

Global Moderator


Joined: 20 Oct 2006
Posts: 6966
Location: porcelain throne

PostPosted: Mon Apr 26, 2010 4:05 pm
Reply with quote

look-up the WITH HOLD clause, in a db2 manual, or try google.
Back to top
View user's profile Send private message
sushanth bobby

Senior Member


Joined: 29 Jul 2008
Posts: 1020
Location: India

PostPosted: Mon Apr 26, 2010 6:59 pm
Reply with quote

meenakshi_forum, Hi

Why do you want to fetch a record and commit ?

Are you updating anything ?

Sushanth
Back to top
View user's profile Send private message
Kjeld

Active User


Joined: 15 Dec 2009
Posts: 365
Location: Denmark

PostPosted: Mon Apr 26, 2010 7:13 pm
Reply with quote

If you use checkpoint/restart logic your output dataset is part of the LUW. Besides you might want to release any locks held.
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic View Bookmarks
All times are GMT + 6 Hours
Forum Index -> DB2

 


Similar Topics
Topic Forum Replies
No new posts filter COMMIT/ROLLBACK statements DFSORT/ICETOOL 13
No new posts Commit limit for Delete query through... DB2 10
No new posts Commit a DB2 Table on Unix Server and... DB2 3
No new posts Need information on DB2 COMMIT DB2 9
No new posts DB2 Commit thru Xpediter DB2 4
Search our Forums:

Back to Top