Events
Mar 31, 11 PM - Apr 2, 11 PM
The biggest SQL, Fabric and Power BI learning event. March 31 – April 2. Use code FABINSIDER to save $400.
Register todayThis browser is no longer supported.
Upgrade to Microsoft Edge to take advantage of the latest features, security updates, and technical support.
Applies to:
SQL Server
Azure SQL Managed Instance
Returns the current output buffer in hexadecimal and ASCII format for the specified session_id.
Transact-SQL syntax conventions
DBCC OUTPUTBUFFER ( session_id [ , request_id ] )
[ WITH NO_INFOMSGS ]
The session ID associated with each active primary connection.
The exact request (batch) to search for within the current session.
The following query returns request_id:
SELECT request_id
FROM sys.dm_exec_requests
WHERE session_id = @@spid;
Allows for options to be specified.
Suppresses all informational messages that have severity levels from 0 through 10.
DBCC OUTPUTBUFFER
displays the results sent to the specified client (session_id). For processes that don't contain output streams, an error message is returned.
To show the statement executed that returned the results displayed by DBCC OUTPUTBUFFER
, execute DBCC INPUTBUFFER
.
DBCC OUTPUTBUFFER
returns the following (values may vary):
Output Buffer
------------------------------------------------------------------------
01fb8028: 04 00 01 5f 00 00 00 00 e3 1b 00 01 06 6d 00 61 ..._.........m.a
01fb8038: 00 73 00 74 00 65 00 72 00 06 6d 00 61 00 73 00 .s.t.e.r..m.a.s.
'...'
01fb8218: 04 17 00 00 00 00 00 d1 04 18 00 00 00 00 00 d1 ................
01fb8228: .
(33 row(s) affected)
DBCC execution completed. If DBCC printed error messages, contact your system administrator.
Requires membership in the sysadmin fixed server role.
The following example returns current output buffer information for an assumed session ID of 52
.
DBCC OUTPUTBUFFER (52);
Events
Mar 31, 11 PM - Apr 2, 11 PM
The biggest SQL, Fabric and Power BI learning event. March 31 – April 2. Use code FABINSIDER to save $400.
Register today