473,795 Members | 3,175 Online
Bytes | Software Development & Data Engineering Community
+ 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 18951
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(<Yo urSpid>)')
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(<Yo urSpid>)')
GO

SELECT * FROM #Inputbuffer
Adding WITH NO_INFOMSGS to the DBCC command makes it less noisy.
--
Erland Sommarskog, SQL Server MVP, es****@sommarsk og.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
4247
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. Columns in the order by list must be unique. DBCC execution completed. If DBCC printed error messages, contact your system administrator." I can successfully reindex other tables in this database. I thought
2
6839
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) into table (CD_Assets_bad2) from existing (CD_Assets): Account(varchar(8)) TransactionDate(datetime(8) Flow(varchar(1)) Category(varchar(7))
2
5644
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: 'tblListing' (1092914965); index ID: 1, database ID: 13 TABLE level scan performed. - Pages Scanned................................: 97044 - Extents Scanned..............................: 12177 - Extent Switches..............................: 13452 -...
1
6732
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 : DTCXact LSN : (12837:1924:1) Start time : Oct 4 2004 8:54:03:570AM
13
5134
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 Extents and the Average Record Size keeps increasing. Any idea how to explain this incrase? and how to stop it? Will DBCC DBREINDEX will help? Here is my data: Rows: 1166273 (same as last week) Extents: 147099 (+10% since last week)
2
2577
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 defragged. I am using DBCC DBREINDEX to rebuild the indexes. What I noticed yesterday is that it seems that DBREINDEX is not actually doing anything. I would check the target indexes, run DBREINDEX, then check again. The same list of indexes came...
3
8064
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 showcontig with all_index output from before and after the reindex and on the
2
6775
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. Type is 0. Check type, object ID and page ID on the page. What cane be done to correct this problem? Can this error prevent a user from connecting to the database?
0
990
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 INDEXDEFRAG". What value should i note whether this table shold be fragmented or not?
0
9672
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9519
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10436
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
10213
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
10000
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
9040
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
6780
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 then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5436
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 last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
3
2920
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.