View previous topic :: View next topic
|
Author |
Message |
Prajesh_v_p
Active User
Joined: 24 May 2006 Posts: 133 Location: India
|
|
|
|
Hi All,
I have a IMS BMP which reads a GSAM file and calls another set of programs which does a couple of table updates and inquiries. If any of the update failes, I need to do a roll back. Instead of doing an IMS roll back, I was trying a DB2 EXEC SQL rollback, to see if it is working. But it was not and Roll back was happening only when I did an IMS rollback.
Why the DB2 rollback is not working here. I thought It should still roll back the Current DB2 unit of work . Can anybody let me know If I miss something here?
Thanks |
|
Back to top |
|
|
martin9
Active User
Joined: 01 Mar 2006 Posts: 290 Location: Basel, Switzerland
|
|
|
|
Rollback with EXEC_SQL under IMS monitor is prohibited!
You have to use the IMS ROLB... this will pass any ROLLBACK to DB2,
but IMS is the synchronizer! (two-phase-commit)
Similar in CICS, you have to use EXEC_CICS_SYNCPOINT, there CICS is the synchronizer...
regards,
martin9 |
|
Back to top |
|
|
dick scherrer
Moderator Emeritus
Joined: 23 Nov 2006 Posts: 19244 Location: Inside the Matrix
|
|
|
|
Hello,
Quote: |
Can anybody let me know If I miss something here?
|
Yes, you are missing a major concept.
A transaction or "logical unit of work" (LUW) has a beginning and an end. Once begun, the LUW must be completely committed or completely backed out. It would be very poor design (and quite dangerous) for the system to permit what you attempted - rolling back part of the work while keeping another part. |
|
Back to top |
|
|
Prajesh_v_p
Active User
Joined: 24 May 2006 Posts: 133 Location: India
|
|
Back to top |
|
|
dick scherrer
Moderator Emeritus
Joined: 23 Nov 2006 Posts: 19244 Location: Inside the Matrix
|
|
|
|
Hello,
Two-phase commit is meant for distributed processes rather than a local process that happens to use 2 different data services. |
|
Back to top |
|
|
Prajesh_v_p
Active User
Joined: 24 May 2006 Posts: 133 Location: India
|
|
|
|
Dick,
I was reffering to the below statement in the link. If I am right, I think here the coordinator is IMS and DB2 is a participant, hence only IMS can issue a rollback. Please correct me if I am wrong.
"When DB2 is the participant, it follows the decision of the coordinator, whether the coordinator is another DB2 or another DBMS"
Thanks.. |
|
Back to top |
|
|
dick scherrer
Moderator Emeritus
Joined: 23 Nov 2006 Posts: 19244 Location: Inside the Matrix
|
|
Back to top |
|
|
|