--- title: "syspolicy_policy_execution_history (Transact-SQL) | Microsoft Docs" ms.custom: "" ms.date: "03/06/2017" ms.prod: "sql-non-specified" ms.reviewer: "" ms.suite: "" ms.technology: - "database-engine" ms.tgt_pltfrm: "" ms.topic: "language-reference" f1_keywords: - "syspolicy_policy_execution_history_TSQL" - "syspolicy_policy_execution_history" dev_langs: - "TSQL" helpviewer_keywords: - "syspolicy_policy_execution_history view" ms.assetid: b13c44a7-6d49-4d50-abe1-e657fc52bb05 caps.latest.revision: 23 author: "JennieHubbard" ms.author: "jhubbard" manager: "jhubbard" --- # syspolicy_policy_execution_history (Transact-SQL) [!INCLUDE[tsql-appliesto-ss2008-xxxx-xxxx-xxx_md](../../includes/tsql-appliesto-ss2008-xxxx-xxxx-xxx-md.md)] Displays the time when policies were executed, the result of each execution, and details about errors if any occurred. The following table describes the columns in the syspolicy_policy_execution_history view. |Column name|Data type|Description| |-----------------|---------------|-----------------| |history_id|**bigint**|Identifier of this record. Each record indicates a policy and one time that it was initiated.| |policy_id|**int**|Identifier of the policy.| |start_date|**datetime**|Date and time this policy tried to run.| |end_date|**datetime**|Time this policy finished running.| |result|**bit**|Success or failure of the policy. 0 = Failure, 1 = Success.| |exception_message|**nvarchar(max)**|Message generated by the exception if one occurred.| |exception|**nvarchar(max)**|Description of the exception if one occurred.| ## Remarks The [syspolicy_policy_execution_history_details](../../relational-databases/system-catalog-views/syspolicy-policy-execution-history-details-transact-sql.md) view contains related details about the targets of the policy and the condition expressions tested. ## Permissions Requires membership in the PolicyAdministratorRole role in the msdb database. ## See Also [Administer Servers by Using Policy-Based Management](../../relational-databases/policy-based-management/administer-servers-by-using-policy-based-management.md) [Policy-Based Management Views (Transact-SQL)](../../relational-databases/system-catalog-views/policy-based-management-views-transact-sql.md)