473,386 Members | 1,679 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,386 software developers and data experts.

how to detect a deadlock and how to clear it when it occours?

hi,

can any one help me in detecting a deadlock and to clear the deadlock
when it occours?

how to monitor the databases for deadlocks?

Jan 31 '07 #1
3 17322
"kavin" <ka*************@gmail.comwrote in message
news:11**********************@j27g2000cwj.googlegr oups.com...
hi,

can any one help me in detecting a deadlock and to clear the deadlock
when it occours?

how to monitor the databases for deadlocks?
By default, deadlocks (-911 RC 2) are detected and resolved (by DB2
cancelling one of the applications) every 10 seconds. You can set up a
deadlock event monitor to monitor them. If the database was created in
version 8.2 or later then a deadlock event monitor was created by default.

An infinite lock wait can be detected and resolved by running the following
parm to change the db config:
db2 update db cfg using locktimeout 30 for db-name

This will resolve a lock wait after 30 seconds and then cancel the
transaction (-911 RC 68).
Feb 1 '07 #2
DB2 has an automatic process that checks for deadlocks. It "perks" up every
10 secs. by default.
If a deadlock is detected, one member will be rolled back and the other will
proceed. Unless you want a 7 day dissertation, do not ask how DB2 chooses.

If you are running DB2 V8 and up then when you create a db, by default an
event monitor called DB2 DETAILDEADLOCK with an auto start option is
created.
This means that if deadlocks are encountered and resolved, they have been
identified and detailed in the output files of the event monitor. On my
Windoze home box, they are in:
d:\instname\node0000\SQL0001\db2event

Those files need to be formatted for intelligent reading and you use the
db2evmon tool to do so.

HTH' Pierre.

--
Pierre Saint-Jacques
SES Consultants Inc.
514-737-4515
"kavin" <ka*************@gmail.coma écrit dans le message de news:
11**********************@j27g2000cwj.googlegroups. com...
hi,

can any one help me in detecting a deadlock and to clear the deadlock
when it occours?

how to monitor the databases for deadlocks?
Feb 1 '07 #3
On Feb 1, 1:19 am, "kavin" <kavinilammur...@gmail.comwrote:
hi,

can any one help me in detecting a deadlock and to clear the deadlock
when it occours?

how to monitor the databases for deadlocks?
I have found the db2pdcfg utility to be incredible useful when
troubleshooting deadlocks. It produces a dump of all the agents in the
database and what database objects they are busy with when a deadlock
is detected by db2. By mining this information you can solve the
concurrency problems in your application.
db2pd is also useful.

Feb 2 '07 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: steven | last post by:
In both mysql version 4.0.16 and 4.1.8 I'm running into deadlock behavior that I don't understand: can anyone explain why the following happens? Heres a basic table definition that exhibits the...
1
by: New MSSQL DBA | last post by:
I have recently been assigned to take over several MSSQL environments and found some of the existing practice confusing. As most of my previous experiences are on Oracle and Unix platform so would...
2
by: Jenny Zhang | last post by:
I am running OSDL-dbt1 - an e-commerce workload (http://www.osdl.org/lab_activities/kernel_testing/osdl_database_test_suite/osdl_dbt-1/) against PostgreSQL: 7.3.3. During the test, I saw a lot of...
0
by: JP2006 | last post by:
I have a ASP page that is made up of several individual web controls. One of these controls is a button that when clicked will postback to the page with a querystring parameter. However this...
0
by: cwho.work | last post by:
Hi! We are using apache ibatis with our MySQL 5.0 database (using innodb tables), in our web application running on Tomcat 5. Recently we started getting a number of errors relating to...
4
tpgames
by: tpgames | last post by:
Here is the code for 1 question and answer, and the play again code. When I use a play again code, the answers do not erase. What code am I missing? Thanks! <tr><td class="line1" colspan="4">...
1
by: nagar | last post by:
Is there a way to detect if my application has been launched as minimized or maximized (this before showing the main form). Thank you. Andrea
1
by: Arif Mohammed | last post by:
Hi, iam using MySql 4.0.1 and jboss-4.0.4.GA Iam getting the following exception when there are more concurrent requests more than 50 in a second Caused by: org.xyz.MyClass: SQL...
1
by: DWiggin | last post by:
We are getting deadlock errors (sporadically) on a batch job we've created. This job runs against a SQL Server 2000 back-end. The first step of the batch job is to run a DDL script to drop...
3
by: john ciriello | last post by:
Hi, is there an easy way to detect when the mouse pointer enters a disabled button? For example I have a button I can see but it is greyed out. When the mouse moves over it I would like to be able...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
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
Oralloy
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,...
0
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...

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.