mssql 2000 current processes
select
p.spid, p.program_name, p.status, p.waittime, p.lastwaittype, p.login_time, p.cpu, dbid, cmd,
--(select top 1 text from ::fn_get_sql(p.sql_handle)) as sql
sql_handle
from master.dbo.sysprocesses p
order by p.waittime desc