Table of Contents

Class PolicyBasedManagementSchema.SystemHealthState

Namespace
LinqToDB.Tools.DataProvider.SqlServer.Schemas
Assembly
linq2db.Tools.dll

syspolicy_system_health_state (Transact-SQL)

Applies to: √ SQL Server (all supported versions)

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.


See dbo.syspolicy_system_health_state.

[Table(Database = "msdb", Schema = "dbo", Name = "syspolicy_system_health_state", IsView = true)]
public class PolicyBasedManagementSchema.SystemHealthState
Inheritance
PolicyBasedManagementSchema.SystemHealthState
Extension Methods

Properties

HealthStateID

Identifier of the policy health state record.

[Column("health_state_id")]
[NotNull]
public long HealthStateID { get; set; }

Property Value

long

LastRunDate

Date and time the policy was last run.

[Column("last_run_date")]
[NotNull]
public DateTime LastRunDate { get; set; }

Property Value

DateTime

PolicyID

Identifier of the policy.

[Column("policy_id")]
[NotNull]
public int PolicyID { get; set; }

Property Value

int

Result

Health state of this target with regard to the policy:

0 = Failure

1 = Success

[Column("result")]
[NotNull]
public bool Result { get; set; }

Property Value

bool

TargetQueryExpression

The epxression that defines the target against which the policy is evaluated.

[Column("target_query_expression")]
[NotNull]
public string TargetQueryExpression { get; set; }

Property Value

string

TargetQueryExpressionWithID

The target expression, with values assigned to identity variables, that defines the target against which the policy is evaluated.

[Column("target_query_expression_with_id")]
[NotNull]
public string TargetQueryExpressionWithID { get; set; }

Property Value

string