New DMF for retrieving input buffer in SQL Server
However, this has a few advantages over DBCC INPUTBUFFER.
- Directly returns a rowset.
- Can be conveniently used with sys.dm_exec_sessions or sys.dm_exec_requests by doing a CROSS APPLY.
- Can use a simple query to retrieve input buffer of multiple sessions without the need for a script and temp table.
Ajay Jagannathan ( @ajayMSFT)
Principal Program Manager