How to: Work with Policy Categories
This topic shows you how to work with policy categories in Policy-Based Management. The procedures include the following:
How to create, update, and delete a policy category
How to assign a policy to category
How to configure category subscription
How to view policies and their categories
To create a policy category
In Object Explorer, expand Management, right-click Policy Management, and then click Manage Categories.
In the Manage Policy Categories dialog box, under Categories, click the empty row at the bottom of the table, and then type the name of a new category.
If you want to mandate subscriptions so that the policy applies to all databases, make sure that the Mandate Database Subscriptions check box is selected (the default). Otherwise, clear the check box so that individual databases can opt in or opt out of the policy.
When you are finished, click OK.
Note
You can also create a category when you assign a policy to a category. For more information, see the "Assign a policy to a category" procedure.
To update a policy category
In Object Explorer, expand Management, right-click Policy Management, and then click Manage Categories.
In the Manage Policy Categories dialog box, under Categories, click the category name that you want to update, and then type a new name.
Optionally, you can select or clear the Mandate Database Subscriptions check box.
When you are finished, click OK.
To delete a policy category
In Object Explorer, expand Management, right-click Policy Management, and then click Manage Categories.
In the Manage Policy Categories dialog box, under Categories, click the row that contains the category that you want to delete, and then press DELETE.
Important
You can only delete categories that contain no policies.
When you are finished, click OK.
To assign a policy to a category
In Object Explorer, expand Management, expand Policy Management, and then double-click a policy.
Click the Description page.
In the Category list, select the category that you want, or click New to create a new category. By default, the category subscription is mandated if you create a new policy.
To configure a database to subscribe to a category
In Object Explorer, expand Databases.
Locate the database that you want to configure, right-click the database, point to Policies, and then click Categories.
In the list of categories, select or clear the Subscribed check box.
Note
If the category subscription is mandated, the check box is unavailable, and appears dimmed. You must use the Policy Management node to set or clear mandated subscriptions. For more information, see the "To update a policy category" procedure.
To view policies and their categories
In Object Explorer, expand Management, expand Policy Management, and then click Policies.
On the View menu, click Object Explorer Details.
In the Object Explorer Details pane, the policies will be listed together with their categories. You can click the Categories column header to sort the policies by category. By using the Object Explorer Details view, you can select multiple policies, right-click the set, and then perform operations such as evaluate, export script, and delete.
Security
Requires membership in the PolicyAdministratorRole in the msdb database.