Perform an On-Demand Evaluation by Using Registered Servers
Applies To: SQL Server 2016
You can perform an on-demand evaluation of best practices policies against one or more instances of SQL Server by using Registered Servers. You can use either local server groups or a central management server.
You can perform an on-demand evaluation of best practices policies against server group members that are running SQL Server 2005 or a later version of SQL Server. However, you may receive an exception error if there are some properties that are referred to by a policy that are not supported in SQL Server 2005 or SQL Server 2000.
To perform this task, you must have configured one or more server registrations in Registered Servers. For more information, see the following topics:
To evaluate best practices policies against a server group
In SQL Server Management Studio, on the View menu, click Registered Servers.
Expand Database Engine, and then expand either Local Server Groups, or Central Management Servers, depending on your configuration.
Do either of the following:
To evaluate the policies against all servers that are managed by the local server group or the central management server, right-click the local server group name or the central management server name, and then click Evaluate Policies.
When you evaluate policies through a central management server, the policies are not evaluated against the central management server itself.
To evaluate the policies against a specific server or server group, expand Local Server Groups or the central management server name, right-click the server or server group that you want to evaluate policies against, and then click Evaluate Policies.
In the Evaluate Policies dialog box, next to the Source box, click the ellipsis (…) button.
In the Select Source dialog box, you can select either Files or Server as the source of the policy files to evaluate. If you click Server, you can perform an on-demand evaluation of any best practices policies that were previously imported into Policy-Based Management on a local or remote server. In this tutorial, you will click Files, and then select the individual policy files that you want to evaluate. To do this, follow these steps:
Next to Files, click the ellipsis (…) button.
Select one or more .xml policy files to evaluate, and then click Open.
The list of selected files appears in the Files box.
In the Select Source dialog box, click OK.
If the Loading Policies dialog box appears, click Close.
The policies that you selected are listed on the Policy Selection page. Be aware that a warning icon next to a policy indicates that the policy contains scripts.
Click Evaluate to evaluate the policies.
For some policy failures, Policy-Based Management enables you to immediately enforce policy compliance on the target. For such failures, a check box will appear next to the failed policy. If you select the check box, or click the row with the failed policy, check boxes appear in the Target details pane next to the target instances that failed the evaluation. If any of the check boxes are selected, the Apply button becomes available. When you click Apply, the noncompliant setting will be automatically updated on the target instances that you selected.
Make sure that you fully understand the policy setting before automatically updating a target instance. We recommend that after you select one or more check boxes, you click Script, and choose an output location so that you can review the underlying Transact-SQL code before you apply the changes.
To view detailed results for a policy, click the policy in the Results table. The Target details table shows the details for each instance.