Class PolicyBasedManagementSchema.Policy
- Namespace
- LinqToDB.Tools.DataProvider.SqlServer.Schemas
- Assembly
- linq2db.Tools.dll
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.
[Table(Database = "msdb", Schema = "dbo", Name = "syspolicy_policies", IsView = true)]
public class PolicyBasedManagementSchema.Policy
- Inheritance
-
PolicyBasedManagementSchema.Policy
- Extension Methods
Properties
ConditionID
ID of the condition enforced or tested by this policy.
[Column("condition_id")]
[NotNull]
public int ConditionID { get; set; }
Property Value
CreatedBy
Login that created the policy.
[Column("created_by")]
[NotNull]
public string CreatedBy { get; set; }
Property Value
DateCreated
Date and time the policy was created.
[Column("date_created")]
[NotNull]
public DateTime DateCreated { get; set; }
Property Value
DateModified
Date and time the policy was created. Is NULL if never modified.
[Column("date_modified")]
[NotNull]
public DateTime DateModified { get; set; }
Property Value
Description
Description of the policy. The description column is optional and can be NULL.
[Column("description")]
[NotNull]
public string Description { get; set; }
Property Value
ExecutionMode
Evaluation mode for the policy. Possible values are as follows:
0 = On demand
This mode evaluates the policy when directly specified by the user.
1 = On change: prevent
This automated mode uses DDL triggers to prevent policy violations.
2 = On change: log only
This automated mode uses event notification to evaluate a policy when a relevant change occurs and logs policy violations.
4 = On schedule
This automated mode uses a SQL Server Agent job to periodically evaluate a policy. The mode logs policy violations.
Note: The value 3 is not a possible value.
[Column("execution_mode")]
[NotNull]
public int ExecutionMode { get; set; }
Property Value
HelpLink
The additional help hyperlink that is assigned to the policy by the policy creator.
[Column("help_link")]
[NotNull]
public string HelpLink { get; set; }
Property Value
HelpText
The hyperlink text that belongs to help_link.
[Column("help_text")]
[NotNull]
public string HelpText { get; set; }
Property Value
IsEnabled
Indicates whether the policy is currently enabled (1) or disabled (0).
[Column("is_enabled")]
[NotNull]
public bool IsEnabled { get; set; }
Property Value
JobID
When the execution_mode is On schedule, contains the ID of the SQL Server Agent job that runs the policy.
[Column("job_id")]
[NotNull]
public Guid JobID { get; set; }
Property Value
ModifiedBy
Login that most recently modified the policy. Is NULL if never modified.
[Column("modified_by")]
[NotNull]
public string ModifiedBy { get; set; }
Property Value
Name
Name of the policy.
[Column("name")]
[NotNull]
public string Name { get; set; }
Property Value
ObjectSetID
ID of the object set that the policy evaluates.
[Column("object_set_id")]
[NotNull]
public int ObjectSetID { get; set; }
Property Value
PolicyCategory
ID of the Policy-Based Management policy category that this policy belongs to. Is NULL if it is the default policy group.
[Column("policy_category")]
[NotNull]
public int PolicyCategory { get; set; }
Property Value
PolicyID
Identifier of the policy.
[Column("policy_id")]
[NotNull]
public int PolicyID { get; set; }
Property Value
RootConditionID
For internal use only.
[Column("root_condition_id")]
[NotNull]
public int RootConditionID { get; set; }
Property Value
ScheduleUID
When the execution_mode is On schedule, contains the ID of the schedule; otherwise, is NULL.
[Column("schedule_uid")]
[NotNull]
public Guid ScheduleUID { get; set; }