dbTalk Databases Forums  

Unit of Work in Nested Stored Procedures

ibm.software.db2.os400 ibm.software.db2.os400


Discuss Unit of Work in Nested Stored Procedures in the ibm.software.db2.os400 forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
farconserv@sherbtel.net
 
Posts: n/a

Default Unit of Work in Nested Stored Procedures - 04-10-2009 , 01:07 PM






I have created some SQL Stored Procedures in a DB2 environment running on i5OS V5R4. I am nesting them to be able to perform a load of an ODS. The question I have is how to handle a Unit of Work for the whole process when I am calling multiple other stored procedures from the main one. In this situation does each procedure have it's own Unit of Work or can I get all of the called procedures to act in one master Unit of Work so that if any piece errors, I can roll the whole process back?

Thanks,
Douglas

Reply With Quote
  #2  
Old   
mwagoner@wildflavors.com
 
Posts: n/a

Default Re: Unit of Work in Nested Stored Procedures - 04-15-2009 , 07:18 AM






It depends on the OPTION COMMIT value specified on the procedure. You can make them all part of one big transaction or one or more of them independent of the others.

Reply With Quote
  #3  
Old   
farconserv@sherbtel.net
 
Posts: n/a

Default Re: Unit of Work in Nested Stored Procedures - 04-15-2009 , 11:03 AM



Where is a good source of documentation on these 'options' and how to use them? I have the SQL reference, but didn't see anything in there.

Thanks for the response.

Douglas

Reply With Quote
  #4  
Old   
mwagoner@wildflavors.com
 
Posts: n/a

Default Re: Unit of Work in Nested Stored Procedures - 04-16-2009 , 07:18 AM



I would start here

http://www.redbooks.ibm.com/redbooks...tml/wwhelp.htm

Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.