SQL Server DBCC Commands: DBCC INPUTBUFFER
DBCC INPUTBUFFER is a DBCC command in Microsoft SQL Server that can be used to retrieve the last batch of Transact-SQL statements submitted through a specific connection to the database engine. It can be useful for troubleshooting problems with long-running queries, identifying the cause of deadlocks, or simply examining the T-SQL code being executed on the server. To use DBCC …