Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 4840
  • Last Modified:

create table #tmpDBCCinputbuffer

I am trying to figure out what the hell this is.  It's running constanly when I view the activity monitor in SQL 2005 against a SQL 2000 db

create table #tmpDBCCinputbuffer ([Event Type] nvarchar(512), [Parameters] int, [Event Info] nvarchar(512))
insert into #tmpDBCCinputbuffer exec ('DBCC INPUTBUFFER(310)')
select [Event Info] from #tmpDBCCinputbuffer

is this something the system needs in SQL 2005 or SQL 2000?  When I try to kill the process it tells me I cannot kill my own process
0
dba123
Asked:
dba123
2 Solutions
 
Aneesh RetnakaranDatabase AdministratorCommented:
DBCC INPUTBUFFER, checks the input buffer for a particular system process ID (SPID).  The Enterprise Manager invokes it every time you select Current Activity, Process Info and double-click a particular process to see the most recent T-SQL commands this process submitted.
0
 
LowfatspreadCommented:
are you running the sql spy product?
0
 
ptjcbCommented:
I use fn_get_sql in 2005 to do the same thing. Until SQL Server 2000, sp3 you had to use DBCC INPUTBUFFER to see what code was executing. The limitation was that it could only display the first 255 characters, and only displays the first command executed. The new function, fn_get_sql() can be used to pinpoint which line of code is being currently executed The function will return info based on the sql_handle colum of master..sysprocesses. If the spid is not active when it is queried the handle will be 0 by default and you will not be able to return the inputbuffer. DBCC INPUTBUFFER returns the inputbuffer whether it is active or not.

0

Featured Post

Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now