views:

635

answers:

2

There is a process that seems to be running all the time in SQL Server 2005 activity monitor. Double clicking on it produces the following query:

CREATE TABLE #tmpDBCCinputbuffer ([EVENT TYPE] NVARCHAR(512), [PARAMETERS] INT, [EVENT Info] NVARCHAR(512)) INSERT INTO #tmpDBCCinputbuffer EXEC ('DBCC INPUTBUFFER(58)') SELECT [EVENT Info] FROM #tmpDBCCinputbuffer

Any idea what it is? Is it dangerous?

A: 

http://msdn.microsoft.com/en-us/library/ms187730.aspx

Quote from SQL Server Developer Center

"DBCC INPUTBUFFER permissions default to members of the sysadmin fixed server role only, who can see any SPID. Other users can see any SPID they own. Permissions are not transferable." (http://msdn.microsoft.com/en-us/library/aa258826(SQL.80).aspx)

MarlonRibunal
+3  A: 

Ironically, its the query you use to see the last query run on a connection, which is what you are doing to see what all the connections' last queries were. Including the connection you use to look at all those connections.

where's the dizzy emoticon when you need it?

Neil N