How to find out why the status of a spid is suspended? What resources the spid is waiting for?

后端 未结 3 1187
迷失自我
迷失自我 2020-12-23 09:29

I run EXEC sp_who2 78 and I get the following results:

\"results

3条回答
  •  无人及你
    2020-12-23 10:11

    I use sp_whoIsActive to look at this kind of information as it is a ready made free tool that gives you good information for troubleshooting slow queries:

    How to Use sp_WhoIsActive to Find Slow SQL Server Queries

    With this, you can get the query text, the plan it is using, the resource the query is waiting on, what is blocking it, what locks it is taking out and a whole lot more.

    Much easier than trying to roll your own.

提交回复
热议问题