Table of Contents

Class PolicyBasedManagementSchema.DataContext

Namespace
LinqToDB.Tools.DataProvider.SqlServer.Schemas
Assembly
linq2db.Tools.dll
public class PolicyBasedManagementSchema.DataContext
Inheritance
PolicyBasedManagementSchema.DataContext
Extension Methods

Constructors

DataContext(IDataContext)

public DataContext(IDataContext dataContext)

Parameters

dataContext IDataContext

Properties

Conditions

syspolicy_conditions (Transact-SQL)

Applies to: √ SQL Server (all supported versions)

Displays one row for each Policy-Based Management condition in the instance of SQL Server. syspolicy_conditions belongs to the dbo schema in the msdb database. The following table describes the columns in the syspolicy_conditions view.


See dbo.syspolicy_conditions.

public ITable<PolicyBasedManagementSchema.Condition> Conditions { get; }

Property Value

ITable<PolicyBasedManagementSchema.Condition>

Policies

syspolicy_policies (Transact-SQL)

Applies to: √ SQL Server (all supported versions)

Displays one row for each Policy-Based Management policy in the instance of SQL Server. syspolicy_policies belongs to the dbo schema in the msdb database. The following table describes the columns in the syspolicy_policies view.


See dbo.syspolicy_policies.

public ITable<PolicyBasedManagementSchema.Policy> Policies { get; }

Property Value

ITable<PolicyBasedManagementSchema.Policy>

PolicyCategories

syspolicy_policy_categories (Transact-SQL)

Applies to: √ SQL Server (all supported versions)

Displays one row for each Policy-Based Management policy category in the instance of SQL Server. Policy categories help you organize policies when you have many policies. The following table describes the columns in the syspolicy_policy_groups view.


See dbo.syspolicy_policy_categories.

public ITable<PolicyBasedManagementSchema.PolicyCategory> PolicyCategories { get; }

Property Value

ITable<PolicyBasedManagementSchema.PolicyCategory>

PolicyCategorySubscriptions

syspolicy_policy_category_subscriptions (Transact-SQL)

Applies to: √ SQL Server (all supported versions)

Displays one row for each Policy-Based Management subscription in the instance of SQL Server. Each row describes a target and policy category pair. The following table describes the columns in the syspolicy_policy_group_subscriptions view.


See dbo.syspolicy_policy_category_subscriptions.

public ITable<PolicyBasedManagementSchema.PolicyCategorySubscription> PolicyCategorySubscriptions { get; }

Property Value

ITable<PolicyBasedManagementSchema.PolicyCategorySubscription>

PolicyExecutionHistories

syspolicy_policy_execution_history (Transact-SQL)

Applies to: √ SQL Server (all supported versions)

Displays the time when policies were executed, the result of each execution, and details about errors if any occurred. The following table describes the columns in the syspolicy_policy_execution_history view.


See dbo.syspolicy_policy_execution_history.

public ITable<PolicyBasedManagementSchema.PolicyExecutionHistory> PolicyExecutionHistories { get; }

Property Value

ITable<PolicyBasedManagementSchema.PolicyExecutionHistory>

PolicyExecutionHistoryDetails

syspolicy_policy_execution_history_details (Transact-SQL)

Applies to: √ SQL Server (all supported versions)

Displays the condition expressions that were executed, the targets of the expressions, the result of each execution, and details about errors if any occurred. The following table describes the columns in the syspolicy_execution_history_details view.


See dbo.syspolicy_policy_execution_history_details.

public ITable<PolicyBasedManagementSchema.PolicyExecutionHistoryDetail> PolicyExecutionHistoryDetails { get; }

Property Value

ITable<PolicyBasedManagementSchema.PolicyExecutionHistoryDetail>

SystemHealthStates

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.

public ITable<PolicyBasedManagementSchema.SystemHealthState> SystemHealthStates { get; }

Property Value

ITable<PolicyBasedManagementSchema.SystemHealthState>