none
SQLSERVER 2005 25% CPU RRS feed

  • 问题

  • SQL Server 一直占25% CPU,重启设备也没有效果。

    如果如下代码查询出来2行数据:

    SELECT TOP 10
     [session_id],
     [request_id],
     [start_time] AS '开始时间',
     [status] AS '状态',
     [command] AS '命令',
     dest.[text] AS 'sql语句', 
     DB_NAME([database_id]) AS '数据库名',
     [blocking_session_id] AS '正在阻塞其他会话的会话ID',
     der.[wait_type] AS '等待资源类型',
     [wait_time] AS '等待时间',
     [wait_resource] AS '等待的资源',
     [dows].[waiting_tasks_count] AS '当前正在进行等待的任务数',
     [reads] AS '物理读次数',
     [writes] AS '写次数',
     [logical_reads] AS '逻辑读次数',
     [row_count] AS '返回结果行数'
     FROM sys.[dm_exec_requests] AS der 
     INNER JOIN [sys].[dm_os_wait_stats] AS dows 
     ON der.[wait_type]=[dows].[wait_type]
     CROSS APPLY 
     sys.[dm_exec_sql_text](der.[sql_handle]) AS dest 
     WHERE [session_id]>50  
     ORDER BY [cpu_time] DESC

    请高手看一下需要怎么处理这些谢谢大家了先。


    2017年8月7日 2:37

全部回复