Policy-Based Management Storage

Policies are stored in the msdb database. After a policy or condition is changed, msdb should be backed up. For more information, see Back Up and Restore of System Databases (SQL Server).

Storing Policies

SQL Server 2017 includes policies that can be used to monitor an instance of SQL Server. By default, these policies are not installed on the Database Engine; however, they can be imported from the default installation location of C:\Program Files\Microsoft SQL Server\130\Tools\Policies\DatabaseEngine\1033.

You can directly create policies by using the File/New menu, and then saving them to a file. This enables you to create policies when you are not connected to an instance of the Database Engine.

Policy history for policies evaluated in the current instance of the Database Engine is maintained in msdb system tables. Policy history for policies applied to other instances of the Database Engine or applied to Reporting Services or Analysis Services is not retained.