This is a discussion on DBCC INPUTBUFFER results into table within the SQL Server forums, part of the Microsoft SQL Server category; --> Does anyone know if there is a simple way to get the results of a DBCC INPUTBUFFER() request into ...
| |||||||
| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
| ||||
| Does anyone know if there is a simple way to get the results of a DBCC INPUTBUFFER() request into a table? I have a process for monitoring activity that will give me the results of sp_who2 into a temp table, and want to scroll through the active connections and get the input buffers into another table for review: Insert into #TmpWho exec sp_who2 'active' Something like that with the dbcc command. I am using SQL 2000 SP4. Thanks, Tom |
| |||
| > Does anyone know if there is a simple way to get the results of a DBCC > INPUTBUFFER() request into a table? I have a process for monitoring > activity that will give me the results of sp_who2 into a temp table, > and want to scroll through the active connections and get the input > buffers into another table for review: > Insert into #TmpWho exec sp_who2 'active' CREATE TABLE #Inputbuffer( EventType NVARCHAR(30) NULL, Parameters INT NULL, EventInfo NVARCHAR(255) NULL ) GO INSERT #Inputbuffer EXEC('DBCC INPUTBUFFER(<YourSpid>)') GO SELECT * FROM #Inputbuffer -- Tom http://kbupdate.info/ | http://suppline.com/ |
| |||
| tomas.zalesak (tomas.zalesak@gmail.com) writes: > CREATE TABLE #Inputbuffer( > EventType NVARCHAR(30) NULL, > Parameters INT NULL, > EventInfo NVARCHAR(255) NULL > ) > GO > > INSERT #Inputbuffer > EXEC('DBCC INPUTBUFFER(<YourSpid>)') > GO > > SELECT * FROM #Inputbuffer Adding WITH NO_INFOMSGS to the DBCC command makes it less noisy. -- Erland Sommarskog, SQL Server MVP, esquel@sommarskog.se Books Online for SQL Server 2005 at http://www.microsoft.com/technet/pro...ads/books.mspx Books Online for SQL Server 2000 at http://www.microsoft.com/sql/prodinf...ons/books.mspx |
| ||||
| Incredibly easy, thanks so much for the help! <SNIPPED> - Tom "When I was a boy of 14, my father was so ignorant I could hardly stand to have the old man around. But when I got to be 21, I was astonished at how much the old man had learned in seven years." - Mark Twain |