syspolicy_system_health_state (Transact-SQL)
Displays one row for each Policy-Based Management policy and target query expression combination. Use the syspolicy_system_health_state view to programmatically check the policy health of the server. The following table describes the columns in the syspolicy_system_health_state view.
|
Column name |
Data type |
Description |
|---|---|---|
|
health_state_id |
bigint |
Identifier of the policy health state record. |
|
policy_id |
int |
Identifier of the policy. |
|
last_run_date |
datetime |
Date and time the policy was last run. |
|
target_query_expression_with_id |
nvarchar(400) |
The target expression, with values assigned to identity variables, that defines the target against which the policy is evaluated. |
|
target_query_expression |
nvarchar(max) |
The epxression that defines the target against which the policy is evaluated. |
|
result |
bit |
Health state of this target with regard to the policy: 0 = Failure 1 = Success |
