Bewerken

Delen via


Evaluate a Policy-Based Management Policy from an Object

Applies to: SQL Server

This topic describes how to evaluate a policy from a server instance, database, or database object in SQL Server by using SQL Server Management Studio.

In This Topic

Before You Begin

Limitations and Restrictions

  • The execution mode is defined as part of the policy and cannot be changed in the Evaluate Policies dialog box.

  • The Evaluate Policies dialog box only shows policies appropriate for the database object.

Security

Permissions

Requires membership in the PolicyAdministratorRole role in the msdb database.

Using SQL Server Management Studio

To evaluate a policy from an object

  1. In Object Explorer, right-click a server instance, a database, or a database object, point to Policies, and select Evaluate.

  2. In the Evaluate Policies dialog box, select one or more policies and click Evaluate to run the policy in evaluation mode. This generates a compliance report for the target set but does not reconfigure SQL Server or enforce future compliance. For targets that do not comply with the selected policies and have properties that can be reconfigured by Policy-Based Management, you can enforce policy compliance by clicking Apply. For more information on the available options in the Evaluate Policies dialog box, see Evaluate Policies Dialog Box, Policy Selection Page, Evaluate Policies Dialog Box, Evaluation Results Page, and Results Detailed View Dialog Box.

  3. When finished, click Close.