Share via


How to: View and Copy a Policy-Based Management Facet State to a File

A Policy-Based Management facet is a set of logical properties that are related to an area of management interest. SQL Server includes several predefined facets. For example, the Surface Area Configuration facet defines, as properties, the features that are off by default.

When you manage many similar SQL Server environments, you can configure a facet in one instance of SQL Server, copy the state of the facet to a file, and then import that file into another instance of SQL Server as a policy. When the state has been converted to a policy, the policy can be applied to other instances of SQL Server, instance objects, databases, or database objects.

This topic describes how to copy the state of a facet to an XML file. For more information about how to import the state of a facet from an XML file into an instance of SQL Server as a policy, see How to: Export and Import a Policy-Based Management Policy.

To view the state of a facet

  1. In Object Explorer, right-click an instance of SQL Server, instance object, database, or database object, and then click Facets.

  2. In the View Facets dialog box, select a facet in the Facet box to view the properties of the facet.

To copy a facet state to an XML file

  1. On the View Facets dialog box, click Export Current State as Policy.

  2. On the Export as Policy dialog box, type the path and name of the file; or use the Browse (...) button to locate the file, and then type the name of the XML file.

  3. Click OK.

Security

Requires membership in the PolicyAdministratorRole role in the msdb database.