DBCC Commands to Return Process Information

The following two DBCC commands return process information:

Syntax

DBCC INPUTBUFFER (spid) 

DBCC OUTPUTBUFFER (spid)

The INPUTBUFFER and OUTPUTBUFFER commands enable a DBA to monitor process activity. The INPUTBUFFER command displays the command last executed by a process; the OUTPUTBUFFER command displays the corresponding result. Unfortunately, the information returned from the OUTPUTBUFFER command can be difficult to understand because it is displayed in hexadecimal and ASCII text.

NOTE

The INPUTBUFFER command returns the first 255 characters of syntax. If you need additional information beyond 255 characters, use the SQL Server Profiler.

TIP

Use the system procedure sp_who to determine the spid ...

Get Microsoft® SQL Server™ 2000 DBA Survival Guide, Second Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.