Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

SQL Server 2008 'sp_syspolicy_purge_history' Function [closed]

What does this built-in function do? What is the "history" that it is deleting?

like image 923
Lloyd Banks Avatar asked Oct 04 '12 17:10

Lloyd Banks


1 Answers

The sp_syspolicy_purge_history is used by Policy Based Management in SQL server to clear out the policy evaluation history.

Extract from SQLServerPedia

SQL Server 2008 introduced a new feature called Policy Based Management. A Policy can be something like xp_cmdshell should not be enabled on an instance. When a policy runs it stores the results in MSDB. Over a period of time, this may will cause unnecessary data getting piled up in MSDB. *The job syspolicy_purge_history prunes the data older than the the days defined in HistoryRetentionInDays property of Policy Management*.

like image 51
vmvadivel Avatar answered Sep 20 '22 23:09

vmvadivel