Microsoft® SQL Server® 2012 Bible

(Ben Green) #1

544


Part V: Enterprise Data Management


You can see the current state of any object for all policies regardless of their Execution
mode by right-clicking on a policy and seeing the Enabled or Disabled options in the con-
text menu.

Within the View Policies dialog, you can see the history for any policy evaluation for the
object using the log viewer by clicking the view history link in the policy row. You can also
see the policy evaluation in the Windows event log and the SQL Server event log.

To view a history of policy execution query use the following:

SELECT * FROM msdb.dbo.syspolicy_policy_execution_history_details;

To view exception query use the following:

SELECT * FROM msdb.dbo.syspolicy_policy_execution_history;

PBM health is also well integrated into Management Studio’s object listings. The Object
Explorer Details page has an optional column to display the Policy Health of any object.

FIGURE 20-7
All the policies that can be run on-demand for an object can be selected and evaluated
using the Evaluate Polices dialog.

c20.indd 544c20.indd 544 7/30/2012 5:45:20 PM7/30/2012 5:45:20 PM


http://www.it-ebooks.info
Free download pdf