How deadlocks are created in SQL Server
HTML-код
- Опубликовано: 7 фев 2025
- Deadlocks occur when two processes both hold locks on resources, and also try to take locks on resources from the other process. Watch Microsoft Certified IT Professional Jon Seigel show you how this scenario comes about using T-SQL code, and learn how to read the resulting deadlock graph in SQL Server Profiler.
Blog post for this video:
voluntarydba.co...
Visit my channel for more database administration videos:
/ voluntarydba
Subscribe to get notified about my latest videos:
www.youtube.co...
Read additional content on my blog:
voluntarydba.com
Follow on Twitter:
/ voluntarydba
Like on Facebook:
/ voluntarydba
Thanks for the feedback, although I can't really change it in this video now. I used a new microphone in the latest video and the sound quality is much better.
great video
Excellent ... could you please explain about the sql archicture in detail as in index vedio
Hi Rajesh, what do you mean by "sql architecture"? Sorry, I don't understand.
Good demo but you could have mentioned your specific case is related to the technical limitation of "read committed" transaction mode. SQL server is modern enough and using "Read committed with snapshot isolation" would prevent such specific deadlock situation from occuring. You would still have been able to make a demo of deadlocks. Coming from the Oracle world where MVCC (Multi Version concurrency control) is the de facto standard, i find it hard to understand why so many developpers keep running the "Read committed" default mode When Oracle and postgresql have been using the best possible implementation of read committed which preserves integrity and relaxes such useless constraints. Plus SQL server has MVCC since ages.
I think it's important to understand the basics of how things work before moving on to more complicated scenarios -- and it's not like locking and blocking goes away completely when snapshot isolation is turned on! I agree snapshot isolation is a great thing, certainly for new projects. But DBAs should still be prepared for many different situations, and it's often necessary to support legacy or vendor databases where changing those settings is either not an option or perceived (rightly or wrongly) as too risky.
Thanks a lot for your answer. I very much agree with your last statement. And in the end, i understand you've based your demo on the default sql server behaviour. Keep doing this good work :)
thank you 'it was very usefull
You're welcome. I'm glad you liked it!
its a good demo, but seriously, how hard is if for people to use a proper fucking microphone when they make a video.
+Njguitar242 When I made this video nearly 3.5 years ago, having almost no prior experience, I was using what I had available. I've since learned a lot about video making and audio recording, and the more recent videos are of a much higher quality. I agree the quality of the audio in this one is far below my current standards; however, it's onerous to fix after the fact.
One thing you can try is enabling Closed Captions -- I take great care to include hand-edited captions (not the crappy auto-generated ones) for all my videos as the audience includes many non-native-English speakers.
If you tried that and still have questions about the concepts presented in the video, please let me know, and I'll do my best to answer them.
the sound suxk