本文说明了如何使用管理员主机和系统视图来跟踪 SQL Server PDW 设备中的警报。
跟踪设备警报
SQL Server PDW 会为需要关注的硬件和软件问题创建警报。 每个警报都包含问题的标题和说明。
SQL Server PDW 会在 sys.dm_pdw_component_health_alerts DMV 中记录警报。 系统可保留的警报限制为 10,000 个,并会在超出限制时删除最早的警报。
使用管理控制台查看警报
对于 PDW 区域和设备的结构区域,有一个警报选项卡。 发生故障转移后,故障转移事件包含在页面上的警报数中。 对于 PDW 区域和设备的结构区域,有一个页面。 每个“运行状况”页都有一个选项卡。要了解有关警报的详细信息,请选择“运行状况”页、“警报”选项卡,然后选择警报。
在警报页上:
若要查看警报历史记录,请选择查看警报历史记录链接。
若要查看警报组件及其当前属性值,请选择警报行。
若要查看引发警报的节点的详细信息,请选择节点名称。
使用系统视图查看警报
若要使用系统视图查看警报,请查询 sys.dm_pdw_component_health_active_alerts。 此 DMV 会显示尚未更正的警报。 有关会审警报和错误的帮助,请使用 sys.dm_pdw_errors DMV。
以下示例是查看当前警报的常见查询。
SELECT
aa.[pdw_node_id],
n.[name] AS [node_name],
g.[group_name] ,
c.[component_name] ,
aa.[component_instance_id] ,
a.[alert_name] ,
a.[state] ,
a.[severity] ,
aa.[current_value] ,
aa.[previous_value] ,
aa.[create_time] ,
a.[description]
FROM [sys].[dm_pdw_component_health_active_alerts] AS aa
INNER JOIN sys.dm_pdw_nodes AS n
ON aa.[pdw_node_id] = n.[pdw_node_id]
INNER JOIN [sys].[pdw_health_components] AS c
ON aa.[component_id] = c.[component_id]
INNER JOIN [sys].[pdw_health_component_groups] AS g
ON c.[group_id] = g.[group_id]
INNER JOIN [sys].[pdw_health_alerts] AS a
ON aa.[alert_id] = a.[alert_id] and aa.[component_id] = c.[component_id]
ORDER BY
a.alert_id ,
aa.[pdw_node_id];