9

I've got a long running insert and periodically when I run SP_WHO2 it shows "CONDITIONAL" as the Command. What would that be indicating? When I searched for this I found most things saying something like, 'yep, you see that when you have a long running query...' What does it indicate is going on in the database?

Chris Townsend
  • 3,042
  • 27
  • 31

2 Answers2

8

Typically you will see this with some long-running operation such as while loops, very expensive IF queries, possibly even cursors depending on the options used. If you identify the query that it is associated with, you have a much better chance at figuring out what it is doing than relying on just sp_who2. Those output commands are very generic buckets and shouldn't be used to try and troubleshoot a query.

Aaron Bertrand
  • 272,866
  • 37
  • 466
  • 490
2

you can use DBCC INPUTBUFFER(SPID) to find the query

Example: DBCC INPUTBUFFER(102)

Marc Chemali
  • 109
  • 5
  • 13