I have been troubleshooting an issue within a database that has some serious blocking issues.
I found the command DBCC INPUTBUFFER a while back that allows me to see the query run for that spid. I have used this to see what is running and causing the issue.
What I am confused about is that the query that DBCC INPUTBUFFER shows does not include the variables associated with the query. For example, if the query joined on the @ID of a table, the provided query by DBCC INPUTBUFFER does not show the @ID value.
I am just wondering if there is a way to see what variable is associated with the query. And/or if maybe this is not the norm and normally DBCC INPUTBUFFER should show you the variable associated with the query.
If it is the latter, then my problem probably rests in the fact that a variable is not being provided and it is just querying a set of rather enormous tables and taking an eternity.