Skip to content

Commit b73598c

Browse files
committed
updated draft
1 parent 865cf2b commit b73598c

1 file changed

Lines changed: 45 additions & 20 deletions

File tree

support/sql/database-engine/agent/error-1053-service-did-not-start-timely.md

Lines changed: 45 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ ms.reviewer: prmadhes, v-shaywood
88

99
# Error 1053: The service did not respond to the start or control request in a timely fashion
1010

11-
This article provides troubleshooting guidance for an issue where the [SQL Server Agent](/ssms/agent/sql-server-agent) fails to start and returns error 1053.
11+
This article provides troubleshooting guidance for an issue where the [SQL Server Agent](/ssms/agent/sql-server-agent) fails to start and returns error _1053_.
1212

1313
## Symptoms
1414

@@ -19,50 +19,75 @@ When this issue occurs, you see the following symptoms:
1919

2020
When the SQL Server Agent fails to start, it returns the following error message:
2121

22-
> Windows could not start the SQL Server Agent service on Local Computer. Error 1053: The service did not respond to the start or control request in a timely fashion.
22+
> Windows could not start the SQL Server Agent service on Local Computer.
23+
> Error 1053: The service did not respond to the start or control request in a timely fashion.
2324
2425
## Cause
2526

26-
This issue occurs when one or more registry keys found under `HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\EventLog` are stored as a `DWORD` type rather than the correct `REG_SZ` (string) type.
27+
This issue occurs when one or more registry keys under `HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\EventLog` use the `DWORD` type instead of the correct `REG_SZ` (string) type.
2728

28-
These incorrect registry keys cause the Windows Event Log service to fail, which prevents the SQL Server Agent from starting.
29+
These invalid registry keys prevent the Windows Event Log service from starting. Because the SQL Server Agent depends on the Windows Event Log service, when the Windows Event Log service is unavailable the SQL Server Agent also fails to start and returns error _1053_.
30+
31+
> [!IMPORTANT]
32+
> If the registry key `HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\EventLog` doesn't exist, no Event Log policies are configured for your system. In that case, the solution provided in this article doesn't apply.
2933
3034
## Solution
3135

32-
1. Verify that the SQL Agent fails to start by attempting to start it with one of the following tools:
33-
1. [Service Control Manager (services.msc)](/windows/win32/services/about-services)
34-
1. [SQL Server Configuration Manager](/sql/tools/configuration-manager/sql-server-configuration-manager)
35-
1. [Command Prompt](/sql/database-engine/configure-windows/start-stop-pause-resume-restart-sql-server-services#command-prompt-window-using-net-commands)
36-
1. [PowerShell](/sql/database-engine/configure-windows/start-stop-pause-resume-restart-sql-server-services#powershell)
37-
1. Check the SQL Agent logs located in `%ProgramFiles%\Microsoft SQL Server\<Instance>\MSSQL\Log\SQLAGENT.OUT` after attempting to start the SQL Agent. If no new entries are added to the logs, this confirmation that the SQL Agent service fails before initialization.
38-
1. Attempt to start the Event Log service by using the following command:
36+
1. Verify that the SQL Server Agent fails to start by attempting to start it by using one of the following methods:
37+
* [Service Control Manager (services.msc)](/windows/win32/services/about-services)
38+
* [SQL Server Configuration Manager](/sql/tools/configuration-manager/sql-server-configuration-manager)
39+
* [Command Prompt](/sql/database-engine/configure-windows/start-stop-pause-resume-restart-sql-server-services#command-prompt-window-using-net-commands)
40+
41+
```cli
42+
NET START SQLSERVERAGENT
43+
```
44+
45+
* [PowerShell](/sql/database-engine/configure-windows/start-stop-pause-resume-restart-sql-server-services#powershell)
46+
47+
```powershell
48+
Start-Service SQLSERVERAGENT
49+
```
50+
51+
1. If the SQL Server Agent starts successfully, the problem is resolved. However, if the SQL Server Agent fails to start and returns error 1053, proceed to the next step.
52+
1. Check the SQL Agent logs located in `%ProgramFiles%\Microsoft SQL Server\<Instance>\MSSQL\Log\SQLAGENT.OUT` after attempting to start the SQL Agent. If no new entries are added to the logs, this condition confirms that the SQL Server Agent fails before initialization. Proceed to the next step.
53+
1. Attempt to start the Event Log service by running the following command in an elevated command prompt:
3954
4055
```cli
4156
NET START EVENTLOG
4257
```
4358
44-
If the Event Log service fails to start, no logs appear when you open the [Event Viewer](/host-integration-server/core/windows-event-viewer1).
45-
1. Check the Event Log folder (`C:\Windows\System32\winevt\Logs`) and verify that it contains log files. <!-- Check with SME what they should do if there are no log files -->
46-
1. Use the [System File Checker (SFC)](/troubleshoot/windows-server/installing-updates-features-roles/system-file-checker) to repair any corrupted system components by running the following command:
59+
If the Event Log service fails to start, no logs appear when you open the [Event Viewer](/host-integration-server/core/windows-event-viewer1). Proceed to the next step.
60+
1. Check the Event Log folder `C:\Windows\System32\winevt\Logs` for event log files:
61+
- If the folder contains `.evtx` log files, proceed to the next step.
62+
- If the folder doesn't contain log files, the Windows Event Log might be corrupted. To troubleshoot a corrupted Windows Event Log, see [How to delete corrupt Event Viewer Log files](~/windows-server/application-management/delete-corrupt-event-viewer-log-files.md).
63+
1. Use the [System File Checker (SFC)](/troubleshoot/windows-server/installing-updates-features-roles/system-file-checker) to repair any corrupted system components by running the following command from an elevated command prompt:
4764
4865
```cli
4966
sfc /scannow
5067
```
5168
52-
1. Identify any invalid registry keys under `HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\EventLog`. Look for keys of type `DWORD` instead of `REG_SZ`. <!-- Ask SME why we are identifying individual keys when we're going to delete all of them in a later step -->
53-
1. Create a backup of the existing registry keys before making any registry changes, run the following command:
69+
1. Create a backup of the existing registry keys before making any registry changes, use one of the following methods:
5470
55-
```cli
56-
reg export "HKLM\SOFTWARE\Policies\Microsoft\Windows\EventLog" "<Path_To_Store_Backup>/EventLog_Backup.reg"
57-
```
71+
- Open the [Registry Editor](~/windows-server/performance/windows-registry-advanced-users#use-the-windows-user-interface.md), then right-click the `HKLM\SOFTWARE\Policies\Microsoft\Windows\EventLog` key and select **Export**.
72+
73+
- From an elevated command prompt, run the following command:
74+
75+
```cli
76+
reg export "HKLM\SOFTWARE\Policies\Microsoft\Windows\EventLog" "<Path_To_Store_Backup>/EventLog_Backup.reg"
77+
```
78+
79+
1. Open the [Registry Editor](~/windows-server/performance/windows-registry-advanced-users#use-the-windows-user-interface.md) and navigate to `HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\EventLog`.
80+
1. Under the `HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\EventLog` key and all its subkeys:
81+
1. Identify and delete any registry values that are configured as a `DWORD` type.
82+
1. Recreate the deleted `DWORD` values by using the same name and the `REG_SZ` type.
5883
5984
1. Delete the problematic `HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\EventLog` key by running the following command:
6085
6186
```cli
6287
reg delete "HKLM\SOFTWARE\Policies\Microsoft\Windows\EventLog" /f
6388
```
6489
65-
1. Restart your device.
90+
1. Restart your device, so Windows can recreate the Event Log configuration by using default settings.
6691
1. After your device restarts, start the Windows Event Log service by running the following command:
6792
6893
```cli

0 commit comments

Comments
 (0)