Trigger UOW

Brett Walters

Trigger UOW

Is there any way to make DB2 (ver 6.1) treat the following process as a UNIT OF WORK?

Action on Table *> Kicks off Trigger *>
Trigger calls DB2 SP *> Associated COBOL program updates different Table

We have tried the "NO CASCADE BEFORE" option on the trigger, but this option does not allow the triggered action to contain updates.

As far as I can tell, we must use the "AFTER" option, which seems to treat anything after the triggering action as a separate UOW.

Any info would be greatly appreciated.

Thanks,

Brett

.........................................
Brett Walters
Lead Database Analyst
UGI Utilities, Inc.
225 Morgantown Rd.
Reading, PA 19611-1949
610-736-5518
[login to unmask email]



This e-mail is intended for the use of the recipient(s) named above. This message may not be distributed by an intended recipient without the express written authorization of the sender. This message may be an attorney-client communication and as such privileged and confidential. If you are not an intended recipient, you may not review, copy or distribute this message. If you have received this communication in error, please notify us immediately by e-mail and delete the original message and destroy all copies.


---------------------------------------------------------------------------------
Welcome to the IDUG DB2-L list. To unsubscribe, go to the archives and home page at http://www.idugdb2-l.org/archives/db2-l.html. From that page select "Join or Leave the list". If you will be out of the office, send the SET DB2-L NO MAIL command to [login to unmask email] The IDUG List Admins can be reached at [login to unmask email] Find out the latest on IDUG conferences at http://conferences.idug.org/index.cfm

Phil Grainger

Re: Trigger UOW
(in response to Brett Walters)
Hi Brett

Anything you do from a Trigger body is part of the SAME unit of work as the UOW that caused the trigger to fire.

If this is not what you are seeing then there may be a problem


Phil Grainger
Computer Associates
Product Manager, DB2
Tel: +44 (0)161 928 9334
Fax: +44 (0)161 941 3775
Mobile: +44 (0)7970 125 752
[login to unmask email]

-----Original Message-----
From: DB2 Data Base Discussion List [mailto:[login to unmask email]On Behalf Of Brett Walters
Sent: 30 December 2003 23:23
To: [login to unmask email]
Subject: Trigger UOW



Is there any way to make DB2 (ver 6.1) treat the following process as a UNIT OF WORK?

Action on Table -> Kicks off Trigger ->
Trigger calls DB2 SP -> Associated COBOL program updates different Table

We have tried the "NO CASCADE BEFORE" option on the trigger, but this option does not allow the triggered action to contain updates.

As far as I can tell, we must use the "AFTER" option, which seems to treat anything after the triggering action as a separate UOW.

Any info would be greatly appreciated.

Thanks,

Brett

.........................................
Brett Walters
Lead Database Analyst
UGI Utilities, Inc.
225 Morgantown Rd.
Reading, PA 19611-1949
610-736-5518
[login to unmask email]



_____

This e-mail is intended for the use of the recipient(s) named above. This message may not be distributed by an intended recipient without the express written authorization of the sender. This message may be an attorney-client communication and as such privileged and confidential. If you are not an intended recipient, you may not review, copy or distribute this message. If you have received this communication in error, please notify us immediately by e-mail and delete the original message and destroy all copies.




--------------------------------------------------------------------------------- Welcome to the IDUG DB2-L list. To unsubscribe, go to the archives and home page at http://www.idugdb2-l.org/archives/db2-l.html. From that page select "Join or Leave the list". If you will be out of the office, send the SET DB2-L NO MAIL command to [login to unmask email] The IDUG List Admins can be reached at [login to unmask email] Find out the latest on IDUG conferences at http://conferences.idug.org/index.cfm


---------------------------------------------------------------------------------
Welcome to the IDUG DB2-L list. To unsubscribe, go to the archives and home page at http://www.idugdb2-l.org/archives/db2-l.html. From that page select "Join or Leave the list". If you will be out of the office, send the SET DB2-L NO MAIL command to [login to unmask email] The IDUG List Admins can be reached at [login to unmask email] Find out the latest on IDUG conferences at http://conferences.idug.org/index.cfm