469,648 Members | 1,563 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,648 developers. It's quick & easy.

Locking problem

Syn

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 of
the x_orders_contents table I'm updating a field in the x_orders
corresponding row. 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. Is there a way
to find if the RI constraint is responsible for the deletion ? Also
some way to find if a row in a table is locked by delete statement ?

Thanks
--
Syn
------------------------------------------------------------------------
Syn's Profile: http://www.dbtalk.net/m597
View this thread: http://www.dbtalk.net/t322649

Jul 31 '06 #1
1 1538
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

Syn wrote:
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 of
the x_orders_contents table I'm updating a field in the x_orders
corresponding row. 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. Is there a way
to find if the RI constraint is responsible for the deletion ? Also
some way to find if a row in a table is locked by delete statement ?

Thanks
--
Syn
------------------------------------------------------------------------
Syn's Profile: http://www.dbtalk.net/m597
View this thread: http://www.dbtalk.net/t322649
Jul 31 '06 #2

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

4 posts views Thread by Felix Natter | last post: by
9 posts views Thread by john smile | last post: by
16 posts views Thread by Nid | last post: by
15 posts views Thread by z. f. | last post: by
1 post views Thread by Brian Maguire | last post: by
6 posts views Thread by shaanxxx | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.