Policy-Based Management Scenarios

The Policy-Based Management can help you manage an instance of SQL Server. The following sections describe scenarios in which Policy-Based Management can help administrators.

Scenario 1: Impose the Surface Area Configuration Settings of One Database Instance to Another

  1. In SQL Server Management Studio, connect to an instance of the SQL Server Database Engine by using Object Explorer.

  2. View the state of the Surface Area management facet, and then extract the state of this facet as a policy and store it a file. For more information, see How to: View and Copy a Policy-Based Management Facet State to a File.

  3. On another instance of the SQL Server Database Engine, select the policy file, and then by evaluating the policy, determine whether the Database Engine meets the policy. For more information, see How to: Evaluate a Policy-Based Management Policy.

  4. Change the server state to comply with the policy by applying the policy to violating targets. For more information, see How to: Evaluate a Policy-Based Management Policy.

Scenario 2: Create an Enforcing Naming Convention Policy

  1. Create a naming convention condition on the Multipart Name facet, and name the condition Naming Convention.

  2. Create a policy regarding name prefixes by using the Naming Convention condition with On change: prevent evaluation mode. Use the target filter to apply this policy to selected object types. For more information, see How to: Create, View, Modify, and Delete a Policy-Based Management Condition.

  3. Evaluate the policy against a database. For more information, see How to: Evaluate a Policy-Based Management Policy.

  4. Apply changes to the targets in the instance that violate the policy. For more information, see How to: Evaluate a Policy-Based Management Policy.

  5. To test the policy, try to add a table to the database that has a name that violates the naming condition.

Scenario 3: Support Scalability by Exporting and Importing Policies

  1. Deploy a Policy-Based Management policy on one instance of the Database Engine.

  2. Export the policy from the instance of the Database Engine as an XML file. For more information, see How to: Export and Import a Policy-Based Management Policy.

  3. Import the policy from the XML file into another instance of the Database Engine.

  4. Evaluate the policy on the second server.

Scenario 4: Support Scalability by Applying Policies to a Server Group

  1. Deploy a Policy-Based Management policy on one instance of the Database Engine.

  2. Export the policy from the instance of the Database Engine as an XML file. For more information, see How to: Export and Import a Policy-Based Management Policy.

  3. Create a local server group, or a Central Management Server group, that contains several instances of SQL Server. For more information, see How to: Create a Central Management Server and Server Group (SQL Server Management Studio).

  4. Open the Evaluate dialog box from the server group, select the exported policy and then evaluate the policy against all the instances of SQL Server in the server group. Apply changes to the targets that do not comply with the policy. For more information, see How to: Evaluate a Policy-Based Management Policy.