By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
443,918 Members | 1,923 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 443,918 IT Pros & Developers. It's quick & easy.

DB2 triggers & Cascading deletes

P: 2
We've got a cascading delete being used in DB2. I've built new triggers under the parent/child tables in this cascading delete relationship.

So when they delete the parent, and the cascade activity occurs, I had expected that the delete trigger on the child would always fire before the delete trigger on the parent. But I was wrong! They are firing parent-first child-second!

This is causing me some concern because the sequence of the output from these triggers (an insert into a transaction table) is suggesting the wrong order for the delete sequence of events, which are then to be applied to our remote (Oracle) platform.

The only solution we like right now, is to add a similar cascading delete to the Oracle database. But before we do so, I thought I'd put the question out here to see if maybe there is a way to tell DB2 triggers to fire in child-parent order, instead of parent-child order?

Pete
Nov 17 '08 #1
Share this question for a faster answer!
Share on Google+

Post your reply

Sign in to post your reply or Sign up for a free account.