Please correct me if I am wrong
1. no 2 processes can have exclusive lock on same object (by object,
same row or same table)
2. on deadlock incident between 2 processes only one of them will be
cancelled by db2 to let the other finish.
Now, can there be an instance where 2 processes have 'EXCLUSIVE LOCK'
on same table, and are waiting on the same 'EXCLUSIVE LOCK' held by
the other agent to be relinquished. They both are cancelled by db2
using the 911 sqlstate.
It has been continuously happening to me, and it perplexes me.
This happenes because I use the 'lock table <table_namein exclusive
mode' statement in a stored procedure, and I call that SP in three
applications at the same instance. Can this happen? I also got event
monitor output, and am analysing the same.
People write my 'problem ticket' off, saying this is a normal deadlock
issue. But I don't think so. Please help. 3 2777
People write my 'problem ticket' off, saying this is a normal deadlock
issue. But I don't think so. Please help.
People? If you are talking about support, are you aware that you can
escalate to the duty manager if you don't like the answer you're getting?
What you describe should not happen. It is more likely that your
information is incomplete, than that there is a defect.. But on enever
knows.
Cheers
Serge
--
Serge Rielau
DB2 Solutions Development
IBM Toronto Lab
Arun Srinivasan wrote:
Please correct me if I am wrong
1. no 2 processes can have exclusive lock on same object (by object,
same row or same table)
2. on deadlock incident between 2 processes only one of them will be
cancelled by db2 to let the other finish.
Now, can there be an instance where 2 processes have 'EXCLUSIVE LOCK'
on same table, and are waiting on the same 'EXCLUSIVE LOCK' held by
the other agent to be relinquished. They both are cancelled by db2
using the 911 sqlstate.
It has been continuously happening to me, and it perplexes me.
This happenes because I use the 'lock table <table_namein exclusive
mode' statement in a stored procedure, and I call that SP in three
applications at the same instance. Can this happen? I also got event
monitor output, and am analysing the same.
From this brief description we should be able to answer your question?
--
Knut Stolze
DB2 z/OS Utilities Development
IBM Germany
Arun Srinivasan wrote:
Please correct me if I am wrong
1. no 2 processes can have exclusive lock on same object (by object,
same row or same table)
2. on deadlock incident between 2 processes only one of them will be
cancelled by db2 to let the other finish.
Now, can there be an instance where 2 processes have 'EXCLUSIVE LOCK'
on same table, and are waiting on the same 'EXCLUSIVE LOCK' held by
the other agent to be relinquished. They both are cancelled by db2
using the 911 sqlstate.
It has been continuously happening to me, and it perplexes me.
What reason code is DB2 returning to each agent?
I don't think it's possible to get SQL0911N RC=2 (deadlock) from both
agents.
However, if you are getting SQL0911N RC=68 (lock timeout) from one
agent and SQL0911N RC=2 (deadlock) from the other agent, this could
happen - theoretically - if LOCKTIMEOUT is set to the same value as
DLCHKTIME. I think it would be highly unlikely (both agents would
have to request the other's locks within microseconds of each other). This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics |
by: Steve Thorpe |
last post by:
Hi
I have a deadlock situation and I am trying to debug my Trace Log. How do I
find out what is the cause ?
I can see from the trace I have an exclusive lock on a RID, but how can I
find out what/where 'RID: 7:1:431830:13 ' is ?
Regards
|
by: Anita |
last post by:
Hi All,
Can multiple updates on one table using single
query generate deadlock ?
For example, at the same time, there are 2 users
run 2 queries as follows :
User1 runs :
update tab1 set tab1.v = tab1.v + 1
from tab1 inner join tab2 on tab1.no = tab2.no
|
by: Andrew Mayo |
last post by:
Here's a really weird one for any SQL Server gurus out there...
We have observed (SQL Server 2000) scenarios where a stored procedure
which
(a) begins a transaction
(b) inserts some rows into a table
(c) re-queries another table using a subquery which references the
inserted table (correlated or not)
|
by: Javauser |
last post by:
Hi there
we are getting the following db2 error on executeBatch() method that
inserts n rows on a table (where n is between 50 and 200).
SQL0911N The current transaction has been
rolled back because of a deadlock or timeout. Reason code "2".
SQLSTATE=40001
errorCode : 911
|
by: Nigel Robbins |
last post by:
Hi There,
I'm getting a deadlock when I have two clients running the following statement.
DELETE FROM intermediate.file_os_details WHERE file_uid = ? AND obj_uid
There is a compound index on file_uid / obj_uid.
The isolation level is UR and I have set DB2_RR_TO_RS=YES.
Any thoughts why I'm getting the deadlock ?
| |
by: Rohit Raghuwanshi |
last post by:
Hello all,
we are running a delphi application with DB2 V8.01 which is causing
deadlocks when rows are being inserted into a table. Attaching the
Event Monitor Log (DEADLOCKS WITH DETAILS) here. From the log it looks
like the problem happens when 2 threads insert 1 record each in the
same table and then try to aquire a NS (Next Key Share)
lock on the record inserterd by the other thread.
Thanks
Rohit
|
by: Todd McNeill |
last post by:
Hi-
We ran into some very strange deadlocks this AM, and I was hoping to
get some insight. We were running a REORGCHK on a database, and
started getting deadlocks. What is curious is that according to the
deadlock event monitor, the deadlock was between the REORGCHK process
and another client attempting a SQL execution, and the Prepare was
requesting an Exclusive lock. Is that normal? Maybe I'm reading the
monitor output...
|
by: Sumanth |
last post by:
Hi ,
I am trying to acquire a lock on a table A in exclusive mode, and this
statement gives an error indicating a deadlock or timeout
has been detected. The lock timeout value is set to 0 which I understand
is to wait for however long it takes to acquire a lock.
Also there are other processes that have acquired row level exclusive
locks on the table A when this error happened.Is DB2
throwing this error as a pre-emptive measure.
|
by: shark |
last post by:
Hi all. i am facing a deadlock problem .i have included the -t1204 and
-T3605 trace flags and have got the following o/p pu tin sqls server
logs.
2006-06-01 17:49:21.84 spid4
2006-06-01 17:49:21.84 spid4 Wait-for graph
2006-06-01 17:49:21.84 spid4
2006-06-01 17:49:21.84 spid4 ...
2006-06-01 17:49:26.92 spid4 ResType:LockOwner Stype:'OR' Mode: S
|
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look !
Part I. Meaning of...
|
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it.
First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
| |
by: Oralloy |
last post by:
Hello folks,
I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>".
The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed.
This is as boiled down as I can make it.
Here is my compilation command:
g++-12 -std=c++20 -Wnarrowing bit_field.cpp
Here is the code in...
|
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth.
The Art of Business Website Design
Your website is...
|
by: Hystou |
last post by:
Overview:
Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
|
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
|
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 last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols.
I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
|
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 we have to send another system
| |
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 can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...
| |