473,508 Members | 2,247 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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 1656
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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

4
3211
by: Felix Natter | last post by:
hi, I would like to lock a record so that when one user is modifying a particular record, then it is locked for all other users. For this purpose, I have two fields in every table ("LockedBy...
3
5111
by: Ryan | last post by:
I have a problem with record locking / blocking within an application. The app is quite straight forward. Written in Delphi 5 using BDE to access a SQL 7 database (Win2K server). Every so often...
9
5052
by: john smile | last post by:
Hi All, I want to lock 2 tables on 2 servers using TABLOCKX hint. These tables function as semaphores in my application. It means when the tables are locked then other users will not be able to...
16
8898
by: Nid | last post by:
How do I do row-level locking on SQL Server? Thanks, Nid
3
2750
by: Wolfgang Bachmann | last post by:
We migrated a database from Version 5.1 to 8.1 and are experiencing massive locking problems. We migrated in the following steps: 0) Server 5.2, Clients 5.2: everithing was fine 1) Server 5.2,...
0
2081
by: brijeshmathew | last post by:
Hi I use Visual Basic 6, Service Pack 6, Microsoft ActiveX Data Objects 2.8 Library(msado15.dll) and access 2000 database using JET 4 OLE. I have an application that adds records simultaneously...
15
6140
by: z. f. | last post by:
Hi, i have an ASP.NET project that is using a (Class Library Project) VB.NET DLL. for some reason after running some pages on the web server, and trying to compile the Class Library DLL, it...
1
3121
by: Brian Maguire | last post by:
Can too many btree indexes cause page level locking? I read this... http://www.postgresql.org/docs/7.4/static/locking-indexes.html
6
4078
by: shaanxxx | last post by:
I have global variable which is being shared between threads (problem is not connected with thread). Without using any mutex i have do some operation global variable in *consistent* way. ...
9
2591
by: zmickle | last post by:
Experts and books all say that you can share an Access back end on a shared drive with the front end running on each host computer. I have a simple database that tracks student data and it is...
0
7229
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
7129
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
7398
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
7502
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
5637
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
1
5057
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
3208
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
1566
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...
0
428
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.