View previous topic :: View next topic
|
Author |
Message |
ranjitbhingare
New User
Joined: 30 Nov 2005 Posts: 94 Location: PUNE
|
|
|
|
1. What is a deadlock ?
2. FROM EMP TABLE find the employees with Higest Pay, 2nd Higest Pay, 3rd Higest Pay and 4 th Highest Pay ?
Please help....
Thanks..... |
|
Back to top |
|
|
dick scherrer
Moderator Emeritus
Joined: 23 Nov 2006 Posts: 19244 Location: Inside the Matrix
|
|
|
|
Hello,
"Deadlock" is also known as "deadly-embrace".
This happens when:
pgma locks row1 in headertable
pgmb locks row33 in detailtable
pgma tries to lock row33 in detailtable but cannot and must wait as the row is already locked - (this is quite normal and happens often - the wait ends when pgmb releases control of detailtable/row33 and pgma continues).
However -
NOW pgmb tries to lock row1 in headertable - it also cannot and must wait - which causes the deadlock. If the database engine does not terminate one of the requests (typically pgmb - the request that completed the deadlock), they will never end.
Your second questions was answered discussed (today) in the DB2 forum. |
|
Back to top |
|
|
priyesh.agrawal
Senior Member
Joined: 28 Mar 2005 Posts: 1448 Location: Chicago, IL
|
|
|
|
ranjitbhingare wrote: |
2. FROM EMP TABLE find the employees with Higest Pay, 2nd Higest Pay, 3rd Higest Pay and 4 th Highest Pay ? |
SEE PREVIOUS POST |
|
Back to top |
|
|
EnjoyMF
New User
Joined: 27 May 2005 Posts: 88
|
|
|
|
HI priyesh.agrawal
But how to find the table names when there is a dead lock.
please tell me whether we can check using SPUFI, QMF
regards
Prasad |
|
Back to top |
|
|
|