Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion Groups
Database Servers
DB2InformixIngresMS SQLOraclePervasive.SQLPostgreSQLProgressSybase
Desktop Databases
FileMakerFoxProMS AccessParadox
General
General DB TopicsDatabase Theory
Related Topics
Java Development.NET DevelopmentVB DevelopmentMore Topics ...

Database Forum / DB2 Topics / July 2006

Tip: Looking for answers? Try searching our database.

Locking problem

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Syn - 31 Jul 2006 14:39 GMT
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
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.