对目前的数据库的运行状况有一个基本的了解 ) DB_NAME(a.dbid) AS dbname , loginame , spid , cpu , b.text , lastwaittype , waitresource , a.[status] , hostname AS WebServer , [program_name] AS AppName , [cmd] , 'cpu' AS Type --into #cpu FROM master..sysprocesses AS a CROSS…