| Author |
Topic |
|
fabianus76
Posting Yak Master
191 Posts |
Posted - 2006-07-10 : 13:12:25
|
| Hello guys, I would like to know if deadlocks are possible with transactions?Regards,Fabianmy favorit hoster is ASPnix : www.aspnix.com ! |
|
|
tkizer
Almighty SQL Goddess
38200 Posts |
Posted - 2006-07-10 : 13:15:41
|
| Yes.Tara Kizeraka tduggan |
 |
|
|
fabianus76
Posting Yak Master
191 Posts |
Posted - 2006-07-10 : 13:24:10
|
| Hallo Tara, thank you for your reply! How SQL-Server (2005) does address this issue?Regards,Fabianmy favorit hoster is ASPnix : www.aspnix.com ! |
 |
|
|
tkizer
Almighty SQL Goddess
38200 Posts |
Posted - 2006-07-10 : 13:33:07
|
| You have to code for it. It isn't a bug.Tara Kizeraka tduggan |
 |
|
|
madhivanan
Premature Yak Congratulator
22864 Posts |
Posted - 2006-07-11 : 02:15:57
|
| http://sql-server-performance.com/deadlocks.aspMadhivananFailing to plan is Planning to fail |
 |
|
|
fabianus76
Posting Yak Master
191 Posts |
Posted - 2006-07-11 : 03:50:25
|
| Hello Madhivanan, thank you very much for this very helpfull article. So in fact SQL-Server does manage deadlocks as I supposed in the way that it rolls back one of the transactions to free the way. That's what I hoped it would do!Thank you very much for your help!Regards,Fabianmy favorit hoster is ASPnix : www.aspnix.com ! |
 |
|
|
fabianus76
Posting Yak Master
191 Posts |
Posted - 2006-07-11 : 07:06:48
|
| In fact I would like to know if 100% of deadlock cases are detected and managed by SQL-Server.my favorit hoster is ASPnix : www.aspnix.com ! |
 |
|
|
tkizer
Almighty SQL Goddess
38200 Posts |
Posted - 2006-07-11 : 12:50:27
|
quote: Originally posted by fabianus76 In fact I would like to know if 100% of deadlock cases are detected and managed by SQL-Server.my favorit hoster is ASPnix : www.aspnix.com !
There is no way for both transactions to complete when a deadlock situation occurs. So SQL Server has to decide which one to rollback. It picks one. There are ways to avoid deadlocking though which is what I thought you were asking.Tara Kizeraka tduggan |
 |
|
|
fabianus76
Posting Yak Master
191 Posts |
Posted - 2006-07-11 : 13:03:05
|
| Hello Tara, thank you for your answer. In fact my last question is to know if SQL-Server solves 100% of the deadlock situations (when they occure) or are there some situations that are to complex and where SQL-Server does not solve the issue by roling back one of the two transactions?Thank you for helping me so often ! Regards,Fabianmy favorit hoster is ASPnix : www.aspnix.com ! |
 |
|
|
tkizer
Almighty SQL Goddess
38200 Posts |
Posted - 2006-07-11 : 13:06:22
|
quote: Originally posted by fabianus76 Hello Tara, thank you for your answer. In fact my last question is to know if SQL-Server solves 100% of the deadlock situations (when they occure) or are there some situations that are to complex and where SQL-Server does not solve the issue by roling back one of the two transactions?Thank you for helping me so often ! Regards,Fabianmy favorit hoster is ASPnix : www.aspnix.com !
SQL Server handles the deadlock situation. You shouldn't rely on this though not because it isn't reliable but because a transaction gets rolled back. You should make sure to code your transactions so that deadlocks don't occur.Tara Kizeraka tduggan |
 |
|
|
fabianus76
Posting Yak Master
191 Posts |
Posted - 2006-07-11 : 13:18:07
|
| got it!Thank you, Fabianmy favorit hoster is ASPnix : www.aspnix.com ! |
 |
|
|
|