You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: support/sql/database-engine/startup-shutdown/error-17156-event-log-service.md
+16-16Lines changed: 16 additions & 16 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,18 +1,18 @@
1
1
---
2
2
title: SQL Server Agent Startup Fails with Error 17156 Could Not Initiate the EventLog Service
3
-
description: Learn how to troubleshoot error 17156 "Could not initiate the EventLog Service" when starting SQL Server Agent.
3
+
description: Learn how to troubleshoot error 17156 "Could not initiate the EventLog Service" when you start SQL Server Agent.
4
4
ms.reviewer: v-shaywood
5
5
ms.date: 10/10/2025
6
6
ms.custom: sap:Startup, shutdown, restart issues (instance or database)\Cannot start SQL Server
7
7
---
8
8
9
9
# Error 17156 "Could not initiate the EventLog Service" when starting SQL Server Agent
10
10
11
-
This article provides troubleshooting guidance for error 17156 "Could not initiate the EventLog Service" that can occur when starting the SQL Server Agent. This error can appear after installing or upgrading to Windows Server 2022 or 2025, and will prevent the SQL Server Agent from starting.
11
+
This article provides troubleshooting guidance for error 17156, "Could not initiate the EventLog Service," that might occur when you start SQL Server Agent. This error can appear after you install or upgrade to Windows Server 2025 or 2022. It prevents SQL Server Agent from starting.
12
12
13
13
## Symptoms
14
14
15
-
After you install or upgrade SQL Server on Windows Server 2022 or 2025, the SQL Server Agent fails to start. When the startup process fails, it adds an entry to the SQL error log similar to the following example:
15
+
After you install or upgrade Microsoft SQL Server on Windows Server 2025 or 2022, SQL Server Agent doesn't start. When the startup process fails, it adds an entry to the SQL Server error log that resembles the following example:
16
16
17
17
```log
18
18
2025-10-02 08:24:32.26 Server Error: 17156, Severity: 16, State: 1.
@@ -25,39 +25,39 @@ Developer Edition (64-bit) on Windows Server 2025 Datacenter 10.0 <X64> (Build 2
25
25
26
26
## Cause
27
27
28
-
This error can occur when the SQL Server Agent doesn't have access to write to the Application event log. During startup, the SQL Server Agent attempts to register its own event source to the Application event log, but without write access, registering the event source fails. When SQL Server Agent fails to register the event source, the startup process terminates.
28
+
This error can occur if SQL Server Agent is blocked from writing to the Application event log. During startup, the SQL Server Agent tries to register its own event source to the Application event log. However, without write access, registration fails. If SQL Server Agent doesn't register the event source, the startup process terminates.
29
29
30
-
An incorrect configuration in the **Configure log access** group policy can prevent the SQL Server Agent from writing to the Application event log. If the **Configure log access** policy doesn't grant write access to the account used by the SQL Server Agent, the agent fails to start.
30
+
An incorrect configuration in the **Configure log access** group policy can prevent SQL Server Agent from writing to the Application event log. If the **Configure log access** policy doesn't grant write access to the account that's used by SQL Server Agent, the agent doesn't start.
31
31
32
-
This error can appear after installing or upgrading to Windows Server 2022 or 2025, because of a change to how the **Configure log access** policy is enforced. In Windows Server 2019 and previous versions, the **Configure log access** policy wasn't correctly enforced. The SQL Server Agent would be able to write to the Application event log even without being granted access via the group policy. In Windows Server 2022 and later versions, the **Configure log access** policy is correctly enforced. The SQL Server Agent can't write to the Application event log unless properly configured in the group policy.
32
+
This error can appear after you install or upgrade to Windows Server 2025 or 2022 because of a change in how the **Configure log access** policy is enforced. In Windows Server 2019 and earlier versions, the **Configure log access** policy wasn't enforced correctly: SQL Server Agent would be able to write to the Application event log even without being granted access through Group Policy. In Windows Server 2022 and later versions, the **Configure log access** policy is enforced correctly: SQL Server Agent can't write to the Application event log unless it's configured correctly in Group Policy.
33
33
34
34
## Solution
35
35
36
-
This error can be resolved by either disabling the **Configure log access**group policy or updating it to grant write access to the account used by the the SQL Server Agent.
36
+
To resolve this error, either disable the **Configure log access**Group Policy policy or update it to grant write access to the account that's used by SQL Server Agent.
37
37
38
-
First, locate the **Configure log access** policy settings:
38
+
1. Locate the **Configure log access** policy settings:
39
39
40
-
1. Open the Local Group Policy Editor.
40
+
1. Open the Local Group Policy Editor.
41
41
42
-
:::image type="content" source="./media/error-17156-event-log-service/group-policy-editor.png" alt-text="Screenshot of the Local Group Policy Editor":::
42
+
:::image type="content" source="./media/error-17156-event-log-service/group-policy-editor.png" alt-text="The Local Group Policy Editor window is shown.":::
:::image type="content" source="./media/error-17156-event-log-service/event-log-service-policies.png" alt-text="Screenshot of the Local Group Policy Editor with the Application folder selected":::
46
+
:::image type="content" source="./media/error-17156-event-log-service/event-log-service-policies.png" alt-text="The Local Group Policy Editor window showing the Application folder as selected.":::
47
47
48
48
1. Open the **Configure log access** setting.
49
49
50
-
:::image type="content" source="./media/error-17156-event-log-service/configure-log-access-setting.png" alt-text="Screenshot of the Configure log access settings window":::
To disable the policy, set its value to either **Disabled** or **Not Configured**.
53
53
54
-
:::image type="content" source="./media/error-17156-event-log-service/disable-log-access-policy.png" alt-text="Screenshot of the Configure log access settings window with the Disabled setting selected":::
54
+
:::image type="content" source="./media/error-17156-event-log-service/disable-log-access-policy.png" alt-text="The Configure log access settings window shows the Disabled setting as selected.":::
55
55
56
-
To update the policy, append the following to the Security Descriptor Definition Language (SDDL) string in the **Options** panel:
56
+
To update the policy, append the following text to the Security Descriptor Definition Language (SDDL) string in the **Options** panel:
57
57
58
58
> (A;;0x7;;;\<SQL-Server-Agent-Account-SID\>)
59
59
60
-
:::image type="content" source="./media/error-17156-event-log-service/update-log-access-policy.png" alt-text="Screenshot of the Configure log access settings window with the additional Security Descriptor Definition Language (SDDL) string appended in the Options panel":::
60
+
:::image type="content" source="./media/error-17156-event-log-service/update-log-access-policy.png" alt-text="The Configure log access settings window showing the additional Security Descriptor Definition Language (SDDL) string that's appended in the Options panel":::
0 commit comments