SQL SERVER 2005 – How to get processes of database

Posted by Joggee | SQL Server 2005 | Wednesday 12 September 2007 12:06 pm

To get all the processes of the database. 

select spid, status, blocked, open_tran, waitresource, waittype, waittime, cmd, lastwaittype, cpu, physical_io,

memusage, last_batch=convert(varchar(26), last_batch,121),

login_time=convert(varchar(26), login_time,121),net_address,

net_library, dbid, ecid, kpid, hostname, hostprocess,

loginame, program_name, nt_domain, nt_username, uid, sid,

sql_handle, stmt_start, stmt_end

from master.dbo.sysprocesses

where blocked!=0 or waittype != 0×0000

 result

2 Comments »

  1. Comment by saleem — October 24, 2007 @ 6:39 pm

    hi thanks for your nice contributions. you have really guided thanks for the solution keep it up

  2. Comment by saleem — October 24, 2007 @ 6:53 pm

    thats nice dear

RSS feed for comments on this post. TrackBack URI

Leave a comment