0

There is a delete query that has been running for an hour.

Just fired sp_who2 and it shows the status of the query as sleeping, even though it is running. Why sp_who2 shows the query status as sleeping?

Tab Alleman
  • 31,483
  • 7
  • 36
  • 52
user1254579
  • 3,901
  • 21
  • 65
  • 104

2 Answers2

3

you can try with:

dbcc inputbuffer(@Spid)

take the SPID with the sp_who2 and see exactly what the is running for that user.

FpontoDesenv
  • 162
  • 1
  • 13
2

A process is considered sleeping occasionally when its waits for some resources or being blocked by some other process.

Sonam
  • 3,406
  • 1
  • 12
  • 24
  • I am also facing same issue, Please suggest me, what could be the issue, Have a look on attached link - https://stackoverflow.com/questions/71156721/pyodbc-connection-going-to-sleep-mode – Suneel Kumar Feb 19 '22 at 12:09