0

I've a process that is open since 2 days ago and is executing a select as last command, but this session got stuck in runnable status.

I checked inputbuffer several times and everytime it shows the same query I will share you the result of sp_who2 and please note that last batch is for 2 days ago:

enter image description here

I checked query plan and didn't find any unusual things and it takes 1 second to show result but it's still in my active expensive query in activity monitor

enter image description here

other point is I ran profiler for this SPID since yesterday and here is the result :

enter image description here

this process lock some objects on my db and it blocks and rebuilding index on this tables

enter image description here

now what should I do ? should I kill it without finding root cause?

sp_WhoIsActive result enter image description here enter image description here enter image description here

the result of EXEC sp_WhoIsActive @find_block_leaders = 1, @sort_order = '[blocked_session_count] DESC', @get_locks =1 enter image description here enter image description here enter image description here

  • 1
    Please download sp_whoisactive( whoisactive.com) from Mr. Adam Machanic and share the result as sp_who2 is thread-based and not process based. – Learning_DBAdmin Dec 2 at 11:24
  • Thanks for you answer , the result is added – masoud Dec 2 at 12:17
  • That looks like quite a lot of CPU usage. Does the CPU usage change when you execute sp_whoisactive multiple times? You might get more information by using the @get_plans option for sp_whoisactive - sp_whoisactive: "Planning" for Success – Scott Hodgin Dec 2 at 12:32
  • Yes CPU usage is increasing – masoud Dec 2 at 12:36
  • 1
    sure , i added new result – masoud Dec 2 at 13:12

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.