Share via


Perform an On-Demand Evaluation by Using Object Explorer

In this task, you will use Object Explorer to perform an on-demand evaluation of best practices policies for the SQL Server Database Engine on a single instance of SQL Server.

Note

You can also evaluate policies on a single instance through Registered Servers. For more information, see Perform an On-Demand Evaluation by Using Registered Servers.

Prerequisites

You must perform this procedure on a server that is running a SQL Server 2008 or a later version of SQL Server Management Studio.

Note

To perform an on-demand evaluation of best practices policies against instances that are running SQL Server 2005 or SQL Server 2000, you must use the procedure in the topic Perform an On-Demand Evaluation by Using Registered Servers.

To perform an on-demand evaluation by using Object Explorer

  1. Start Management Studio, and then connect to the Database Engine.

  2. In Object Explorer, expand Management, expand Policy Management, right-click Policies, and then click Evaluate.

    Note

    By default, the local instance is used as the source of the policies. If you have previously imported best practices policies, they will be listed, together with any other policies that you have created. You can select any of the imported best practices policies, and then click Evaluate. If you have not imported the best practices policies, continue with this procedure.

  3. In the Evaluate Policies dialog box, next to the Source box, click the ellipsis () button.

  4. 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:

    1. Click Files.

    2. Next to Files, click the ellipsis () button.

    3. In the Look in list, browse to the following folder, which contains the best practices policies:

      C:\Program Files\Microsoft SQL Server\100\Tools\Policies\DatabaseEngine\1033

      Note

      The file path may vary, depending on where you installed the SQL Server program files, and the language identifier.

    4. Select one or more .xml policy files to evaluate, and then click Open.

      The list of selected files appears in the Files box.

    5. In the Select Source dialog box, click OK.

    6. 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.

  5. Click Evaluate to evaluate the policies.

    In the Results table, the results for each policy are listed. A red "x" icon indicates that policy compliance failed.

  6. 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, the Apply button becomes available. When you click Apply, the noncompliant setting will be automatically updated on the target instance.

    Warning

    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.

  7. To view detailed results for a policy, click the policy in the Results table.