What does this built-in function do? What is the “history” that it is deleting?
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
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*.