In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-04-12 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >
Share
Shulou(Shulou.com)05/31 Report--
This article shows you how to analyze the Sqlserver deadlock problem, which is concise and easy to understand, which will definitely brighten your eyes. I hope you can get something through the detailed introduction of this article.
The problem shows:
Sqlserver2014 deadlock
The Web frontend query reported an error:
Deadlock problem:
The problem is repeated to catch the deadlock:
The database opens deadlock trace and trace trace to capture deadlock scripts and execute SQL:
Dbcc traceon (1222Mai 1)
The deadlock script is recorded in errorlog.
Performing SQL can be crawled through trace tracking:
The SQL of the server process ID:67 can be fetched. However, the SQL of the server process ID:110 is not finished, so it is sacrificed and cannot be crawled. Only part of the SQL can be seen in the deadlock script.
Script for querying errorlog:
Exec xp_readerrorlog 0
Go
You can see that the red cross is the process sacrificed by the deadlock.
This deadlock is mainly a server process ID:67 and a server process ID:110
The server process ID:67 is an insert transaction that occupies the IX lock
The server process ID:110 is a select transaction that requires an S lock
Page contention was generated, resulting in a page lock. Finally, the server process ID:110 is sacrificed.
The current solution is to add with (nolock) to the query SQL in the select transaction of the server process ID:110.
The above content is how to analyze the Sqlserver deadlock problem. Have you learned the knowledge or skills? If you want to learn more skills or enrich your knowledge reserve, you are welcome to follow the industry information channel.
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 300
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.