Hello,
I have a parent table(x_orders) and a child table(x_orders_contents)
with a cascade delete on the child table. In a after delete trigger o
the x_orders_contents table I'm updating a field in the x_order
corresponding row. This works when I delete a row directly fro
x_orders_contents, but seems to cause a lock when I delete a row fro
the parent table and the delete RI constraint is used. Is there a wa
to find if the RI constraint is responsible for the deletion ? Als
some way to find if a row in a table is locked by delete statement ?
Thank
--
Sy
Jayesh Thakrar - 31 Jul 2006 17:56 GMT
Can you expand on what you mean by
"This works when I delete a row directly from x_orders_contents,
but seems to cause a lock when I delete a row from
the parent table and the delete RI constraint is used."
Are you saying that the delete works fine when you delete an individual
row directly from x_orders_contents, but you encounter a "deadlock"
when you delete an "x_orders" which causes a cascade delete due to the
RI?
What is your lock timeout period?
To check for deadlocks, you may want to use the deadlock monitor
(enabled by default on DB2 v8 - but only on catalog node in partitioned
database). You can even use snapshot and "list applications show
detail" to extract the locking information......
-- Jayesh
> Hello,
>
[quoted text clipped - 14 lines]
> Syn's Profile: http://www.dbtalk.net/m597
> View this thread: http://www.dbtalk.net/t322649