标签:des style blog color os 数据 div log
对目前的数据库的运行状况有一个基本的了解
SELECT TOP ( 10 ) 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 APPLY sys.dm_exec_sql_text(sql_handle) AS b INNER JOIN master..sysdatabases AS c ON a.dbid = c.dbid AND a.status <> ‘sleeping‘ --and a.blocked>0 ORDER BY cpu DESC
查询目前运行状态-CPU等情况,布布扣,bubuko.com
标签:des style blog color os 数据 div log
原文地址:http://www.cnblogs.com/dingqin0525/p/3919401.html