Wednesday, June 22, 2016

Process Running for more than 10 minutes

Select sp.spid, sd.name, sp.waittime/(1000
* 60) as wait_time_mins ,
sp.cpu, sp.memusage, sp.login_time, sp.cmd, sp.program_name,
sp.nt_username, sp.loginame,
sp.hostname, sp.status, sp.waitresource,
sp.blocked from sysprocesses sp, sysdatabases sd
where sp.dbid = sd.dbid and sp.status = ‘runnable’ and
sp.waittime/(1000 * 60) >=
10

No comments:

Post a Comment