September 25, 2006 at 9:24 pm
My hosting company allows us to see a list of sleeping transaction. I am wondering what is the sp or the command allowing to do this ?
Jean-Luc
www.corobori.com
September 26, 2006 at 8:10 am
select spid,
ecid,
status,
loginame=rtrim(loginame),
hostname,
dbname = case
when dbid = 0 then null
when dbid <> 0 then db_name(dbid)
end
, cmd
from master.dbo.sysprocesses
WHERE Status ='sleeping'
Prasad Bhogadi
www.inforaise.com
September 26, 2006 at 11:25 am
Almost there. What they are also showing is the SQL or stored procedure involved:
Exampox
SPIDLoginStatusCPU Time Last Run Event Info
106xxxxxx sleeping 2.8859/26/2006 10:11:11 AMSELECT TOP 100 PERCENT Ma_Id, Ma_Marca FROM tblMarcas WHERE (Ma_Nivel = 2) GROUP BY Ma_Id, Ma_Marca ORDER BY Ma_Marca
Jean-Luc
www.corobori.com
Viewing 3 posts - 1 through 2 (of 2 total)
You must be logged in to reply to this topic. Login to reply