SP_WHO2 conditional?

9.8k Views Asked by At

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?

2

There are 2 best solutions below

0
Aaron Bertrand On BEST ANSWER

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.

0
Marc Chemali On

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

Example: DBCC INPUTBUFFER(102)