select spid,db_name(dbid),cmd<br />from master..sysprocesses<br />where cmd like 'cmd%'<br />[where dbid=db_id("資料庫名稱")]<!-- more -->