syspolicy_conditions (Transact-SQL)


THIS TOPIC APPLIES TO:yesSQL Server (starting with 2008)noAzure SQL DatabasenoAzure SQL Data Warehouse noParallel Data Warehouse

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.

Column nameData typeDescription
condition_idintIdentifier of this condition. Each condition represents a collection of one or more condition expressions.
namesysnameName of the condition.
date_createddatetimeDate and time the condition was created.
descriptionnvarchar(max)Description of the condition. The description column is optional and can be NULL.
created_bysysnameLogin that created the condition.
modified_bysysnameLogin that most recently modified the condition. Is NULL if never modified.
date_modifieddatetimeDate and time the condition was created. Is NULL if never modified.
is_name_conditionsmallintSpecifies whether the condition is a naming condition.

0 = The condition expression does not contain the @Name variable.

1 = The condition expression contains the @Name variable.
facetnvarchar(max)Name of the facet that the condition is based on.
Expressionnvarchar(max)Expression of the facet states.
obj_namesysnameThe object name assigned to @Name if the condition expression contains this variable.

When you are troubleshooting Policy-Based Management, query the syspolicy_conditions view to determine who created or last changed the condition.

Requires membership in the PolicyAdministratorRole role in the msdb database.

Administer Servers by Using Policy-Based Management
Policy-Based Management Views (Transact-SQL)

Community Additions