View previous topic :: View next topic
|
Author |
Message |
ckrishna
New User
Joined: 22 May 2010 Posts: 1 Location: Banglore
|
|
|
|
Hi,
Can you please tell me how DB2 commit happens in batch and online programs (how it differs in both cases)? Please suggest me an article to learn about commit logic.
I thought of reading more about commit logic, when I came across a situation: Program A calls Program B to insert a row into a table one bye one. Program B inserts one row and goes back to Program A. So when the commit actually happens - 1) when program B return after inserting a single row or 2) when program A returns after entire update process. Both program A and B are batch programs. The forum has a similar post which says option 1 will be true. Please tell if you have any more idea in this.
Thanks,
Krishna |
|
Back to top |
|
|
Kalexin
New User
Joined: 26 May 2010 Posts: 2 Location: San Jose, CA
|
|
Back to top |
|
|
dick scherrer
Moderator Emeritus
Joined: 23 Nov 2006 Posts: 19244 Location: Inside the Matrix
|
|
|
|
Hello,
Quote: |
I thought of reading more about commit logic |
Yes, you should.
Quote: |
The forum has a similar post which says option 1 will be true. Please tell if you have any more idea in this. |
My idea is that you should never simply trust something you read in a forum . . .
COMMIT is rather straight forward. Things not yet committed may be rolled back. Having said that, you now need to read about the various ways COMMIT / ROLLBACK might happen. Running some of your own experiments is also a good way to see these behaviors first-hand.
If you try some experiments and something "strange" happens, post what you did and what happened. Someone will be able to clarify. |
|
Back to top |
|
|
|