Unix Technical Forum

DBCC INPUTBUFFER results into table

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 ...


Go Back   Unix Technical Forum > Database Server Software > Microsoft SQL Server > SQL Server

FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 03-01-2008, 03:03 PM
Tom
 
Posts: n/a
Default DBCC INPUTBUFFER results into table

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

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #2 (permalink)  
Old 03-01-2008, 03:03 PM
tomas.zalesak
 
Posts: n/a
Default Re: DBCC INPUTBUFFER results into table

> 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/

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #3 (permalink)  
Old 03-01-2008, 03:03 PM
Erland Sommarskog
 
Posts: n/a
Default Re: DBCC INPUTBUFFER results into table

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
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #4 (permalink)  
Old 03-01-2008, 03:04 PM
Tom
 
Posts: n/a
Default Re: DBCC INPUTBUFFER results into table

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

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Forum Jump


All times are GMT. The time now is 01:31 PM.


Powered by vBulletin® Version 3.6.5
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.2.0
www.UnixAdminTalk.com