IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

Deadlock in DB2


IBM Mainframe Forums -> Mainframe Interview Questions
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
nareshdacha

New User


Joined: 12 Jan 2010
Posts: 66
Location: US

PostPosted: Tue Jul 27, 2010 11:46 am
Reply with quote

This question was asked in interview.
Deadlock occured for the table EMP (-911). If we use CS (cursor stability) can we remove the deadlock ? If so how can we remove deadlock ?.
I know that while binding we can give CS parameter to avoid deadlocks but after deadlock happens i dont know how to remove the deadlock? Please explain how to remove deadlock.
I have searched the forum but am confused, hence i posted this question....
Back to top
View user's profile Send private message
dick scherrer

Moderator Emeritus


Joined: 23 Nov 2006
Posts: 19244
Location: Inside the Matrix

PostPosted: Tue Jul 27, 2010 7:15 pm
Reply with quote

Hello,

You don't remove a deadlock - it is automatically removed. When a deadlock (sometimes known as a "fatal embrace" is detected, the task causing the the deadlock is terminated.
Back to top
View user's profile Send private message
dbzTHEdinosauer

Global Moderator


Joined: 20 Oct 2006
Posts: 6966
Location: porcelain throne

PostPosted: Tue Jul 27, 2010 7:29 pm
Reply with quote

considering the lack of experience and knowledge of the TS,
i think it is important to modify the statement.
Quote:
the task causing the the deadlock is terminated

to
Quote:
the DB2 task (not the task requesting db2 to process the sql) causing the the deadlock is terminated
Back to top
View user's profile Send private message
dick scherrer

Moderator Emeritus


Joined: 23 Nov 2006
Posts: 19244
Location: Inside the Matrix

PostPosted: Tue Jul 27, 2010 8:58 pm
Reply with quote

Hi Dick,

Yup, good point - i should have said the same icon_smile.gif

d
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic View Bookmarks
All times are GMT + 6 Hours
Forum Index -> Mainframe Interview Questions

 


Similar Topics
Topic Forum Replies
No new posts DB2 deadlock DB2 2
No new posts -913/-911 Deadlock during UPDATE stat... DB2 5
No new posts Can a select query participate in a d... DB2 1
No new posts Related to Deadlock issue DB2 2
No new posts table scan can cause deadlock over RID? DB2 10
Search our Forums:

Back to Top