December 12, 2008 at 6:44 pm
What set of SELECT statements would provide the same results as DBCC INPUTBUFFER(@@spid)?
Thanks!
December 13, 2008 at 2:46 am
You can query sys.dm_exec_sql_text and pass it a sql_handle (which you can get from sys.dm_exec_requests and several other DMVs)
It's not exactly the same output as inputbuffer. Inputbuffer will show the call to a procedure, exec_sql_text will show the code of that procedure.
Gail Shaw
Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability
December 23, 2008 at 3:17 pm
Would you be able to provide a specific code example?
Thanks!
December 23, 2008 at 11:41 pm
Check in Books Online, under sys,dm_exec_sql_text. There are examples there.
Gail Shaw
Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability
Viewing 4 posts - 1 through 3 (of 3 total)
You must be logged in to reply to this topic. Login to reply