Click here to monitor SSC
SQLServerCentral is supported by Redgate
 
Log in  ::  Register  ::  Not logged in
 
 
 

Get your favorite SSC scripts directly in SSMS with the free SQL Scripts addin. Search for scripts directly from SSMS, and instantly access any saved scripts in your SSC briefcase from the favorites tab.
Download now (direct download link)

View Input Buffers for all SPIDS

By Cade Bryant,

This procedure, sp_AllInputBuffers, uses dynamic T-SQL to generate and execute the DBCC INPUTBUFFER statement for each server process (except yours).  Perfect for performance troubleshooting situations, when you want to see what commands are being executed against your server.  Also, a great example of the power of dynamic T-SQL.

For the @exec parameter, pass 1 or leave it blank to execute the DBCC statements; pass 0 if you only want to view the statements being generated.

Total article views: 599 | Views in the last 30 days: 7
 
Related Articles
FORUM

Using Variables in EXECUTE statement

Using Variables in EXECUTE statement

BLOG

Execute T-SQL Statement Task

I spotted a new task in SSIS 2012 – Execute T-SQL Statement Task. It executes T-SQL statements, only...

BLOG

SSIS: Execute SQL task vs Execute T-SQL Statement task

In SSIS there are two tasks than can be used to execute SQL statements: Execute T-SQL Statement and ...

ARTICLE

What SQL Statements Are Currently Executing?

This article describes a utility that allows you to identify what SQL statements are currently execu...

FORUM

execution of sql statement on a linked server

problems execution of sql statement on a linked server

 
Contribute