Re: How can I find out information about process based on spid?

From: Tom Moreau (tom_at_dont.spam.me.cips.ca)
Date: 09/10/04


Date: Fri, 10 Sep 2004 15:19:59 -0400

Check out DBCC INPUTBUFFER in the BOL.

-- 
Tom
---------------------------------------------------------------
Thomas A. Moreau, BSc, PhD, MCSE, MCDBA
SQL Server MVP
Columnist, SQL Server Professional
Toronto, ON Canada
www.pinnaclepublishing.com/sql
"peja" <anonymous@discussions.microsoft.com> wrote in message
news:9d6601c49768$c292cc90$a601280a@phx.gbl...
Hi,
sometimes I cannot connect to the server using enterprise
manager because server is too busy, but I'm able to
execute sp_who2 from query analyzer...
This stored procedure provides me with the list of spids
on the system, but it doesn't help me with what each of
these processes actually is. For example, I cannot see the
text of currently executed statement, like I'm able to see
using EM (Current Activity).
Is there any way (stored procedure with spid as a
parameter, or query against some system table) which
provides this info?
Thanks,
Peja


Relevant Pages

  • Re: slowing/halting stored procedure from ado.net
    ... calling the same stored procedure from SQL> Management ... > Studio goes without any slowdown, ... > There was/is no big job running on the sql server, ... >> Erratic performance of any query is usually due to something changing. ...
    (microsoft.public.dotnet.framework.adonet)
  • Re: Database Engine Tuning Advisor suggestion to replace syntax.
    ... Actually, what I said was "IF this code is running in a stored procedure", ... execution with the execution plan generated for the first execution. ... SQL Server does not have to compile the second statement." ... replace query 1 below with the syntax in query 2 below. ...
    (microsoft.public.sqlserver.tools)
  • Re: SQL Server - Filter
    ... Happy to use a stored procedure but prefer to use a View that can be linked ... >> the sql server tables from access you are pretty much defeating the idea ... > many fewer bugs if they'd just used Access queries for the most part. ... > to query data from the back-end. ...
    (comp.databases.ms-access)
  • Re: How to get list of EventClasses in MSSQLServer2000
    ... statement inside a stored procedure has completed.') ... SQL Server statement or stored procedure.') ... Plan','Displays the plan tree of the Transact-SQL statement executed.') ... Login','Occurs when a SQL Server login is added or removed; ...
    (microsoft.public.sqlserver.security)
  • Re: Database Engine Tuning Advisor suggestion to replace syntax.
    ... query in my query 2 example. ... Tibor Karaszi, SQL Server MVP ... Actually, what I said was "IF this code is running in a stored procedure", not "BECAUSE this ... statement in the second execution with the execution plan generated for the first execution. ...
    (microsoft.public.sqlserver.tools)

Loading