473,466 Members | 1,562 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

DBCC INPUTBUFFER results into table

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'

Something like that with the dbcc command.

I am using SQL 2000 SP4.

Thanks,

Tom

May 9 '07 #1
3 18870
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/

May 10 '07 #2
tomas.zalesak (to***********@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, es****@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
May 10 '07 #3
Tom
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

May 11 '07 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: John Morris | last post by:
I'm running a simple DBCC DBREINDEX ('myTable') and I receive the following error: "Server: Msg 169, Level 15, State 2, Line 2 A column has been specified more than once in the order by list....
2
by: David Schwartz | last post by:
We are having quite a time since moving a large database to a new server (actually built new server, renamed as old to make seamless for users, etc.) Import 104 million row database (5 column)...
2
by: SR | last post by:
Can someone please help me interpret this result set below and suggest on way I can speed up my table? What changes should I make? DBCC SHOWCONTIG scanning 'tblListing' table... Table:...
1
by: Kalvin | last post by:
I keep seeing this return from running a DBCC OpenTran: Transaction information for database 'Live_App'. Oldest active transaction: SPID (server process ID) : 92 UID (user ID) : 1 Name ...
13
by: Guillaume | last post by:
I have a table where I store around 1 million rows for 7 days. I run a DBCC SHOWCONTIG every week and I noticed that the number of Rows and the Average Free Bytes are stable but the number of...
2
by: jon_brookins | last post by:
I have a stored proc that identifies indexes that need to be defragmented ( LogicalFragmentation > 20% ) using DBCC SHOWCONTIG. This works fine and shows me all of the candidate indexes to be...
3
by: Raziq Shekha | last post by:
Hi Folks, SQL Server 2000 SP3 on Windows 2000. I have a database on which I ran the command : dbcc dbreindex ('tablename') go for all tables in the database. Then I compared the dbcc...
2
by: bab | last post by:
I ran "dbcc checkdb(MCMSdb) with no_infomsgs" and I get the following: Server: Msg 8946, Level 16, State 12, Line 2 Table error: Allocation page (1:274992) has invalid PFS_PAGE page header values....
0
rsrinivasan
by: rsrinivasan | last post by:
Hi all, I am using SQL server 2000. In this i have large table with index. In this i have inserted millions of record per day. So i want to defragment the index by the command "DBCC...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
1
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.