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
title: Troubleshoot Repeated SQL Agent Service Failures
3
-
description: Learn how to troubleshoot and resolve repeated crashes of the SQL Agent service. Follow step-by-step solutions to fix registry issues and improve stability.
2
+
title: Troubleshoot Repeated SQL Server Agent Service Failures
3
+
description: Resolve repeated failures of the SQL Server Agent service. Follow step-by-step solutions to fix registry issues and improve stability.
4
4
ms.date: 12/04/2025
5
5
ms.custom: sap:SQL Agent (Jobs, Alerts, Operators)\SQL Agent Service is unable to start, stops or restarts unexpectedly
6
6
ms.reviewer: prmadhes, v-shaywood
7
7
---
8
8
9
-
# SQL Agent service crashes intermittently
9
+
# SQL Agent service fails intermittently
10
10
11
-
This article provides troubleshooting guidance for an issue where the SQL Agent service repeatedly crashes on a regular interval.
11
+
This article provides troubleshooting guidance for an issue where the SQL Agent service repeatedly stops responding at regular intervals.
12
12
13
13
## Symptoms
14
14
15
-
The SQL Agent service crashes intermittently on a SQL Server Always On Cluster. When the SQL Agent service crashes, the following error message is added to the SQL Agent log:
15
+
The SQL Server Agent service fails intermittently on a SQL Server Always On Cluster. When the service fails, the following error message is added to the SQL Server Agent log:
16
16
17
17
```log
18
18
[510] SQLAgent failed, dump generated in \<SQL_Instance_Log_Directory\>
@@ -21,60 +21,60 @@ The SQL Agent service crashes intermittently on a SQL Server Always On Cluster.
21
21
22
22
## Cause
23
23
24
-
These crashes occur when the SQL Agent service fails to retrieve the following registry key:
24
+
These failures occur if the SQL Server Agent service doesn't retrieve the following registry subkey:
When the registry key retrieval fails, the SQL Agent service reports an exception in the logthen terminates itself.
28
+
When the registry subkeykey retrieval fails, the SQL Server Agent service reports an exception in the log, and then it terminates itself.
29
29
30
-
Registry key retrieval can fail due to the following reasons:
30
+
Registry subkey retrieval can fail because of the following reasons:
31
31
32
-
- Antivirus or endpoint protection software interfering with registry access.
33
-
- Missing or misconfigured registry keys.
34
-
- Transient access failures in Windows registry.
32
+
- Antivirus or endpoint protection software that interferes with registry access
33
+
- Missing or misconfigured registry keys
34
+
- Transient access failures in Windows registry
35
35
36
36
## Solution
37
37
38
-
Use the following steps to resolve this issue:
38
+
To resolve this issue, follow these steps.
39
39
40
40
### Step 1: Verify the registry key
41
41
42
-
1.Open the Registry Editor (`regedit.exe`).
42
+
1.Start Registry Editor (`regedit.exe`).
43
43
1. Go to the following path: `HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Microsoft SQL Server\<InstanceID>\SQLServerAgent`.
44
-
1. Check if the `AutoRegistryRefresh` key exists.
45
-
1. If the `AutoRegistryRefresh` key is missing, create a new _DWORD (32-bit) Value_ named `AutoRegistryRefresh` and set its value to `1`.
44
+
1. Check whether the `AutoRegistryRefresh` key exists.
45
+
1. If the `AutoRegistryRefresh` key is missing, create a _DWORD (32-bit) Value_that's named `AutoRegistryRefresh`, and set its value to `1`.
46
46
47
47
### Step 2: Exclude SQL Server from antivirus scanning
48
48
49
49
> [!IMPORTANT]
50
50
> The process of adding an exclusion to your antivirus or endpoint protection software varies by publisher. Check with the publisher of your software for specific instructions.
51
51
52
52
1. Configure your antivirus or endpoint protection software to exclude the common SQL Server processes:
53
-
1.`sqlservr.exe`
54
-
1.`sqlagent.exe`
55
-
1.`ReportingServicesService.exe`
56
-
1.`msmdsrv.exe`
57
-
1.`fdlauncher.exe`
58
-
1.`fdhost.exe`
59
-
1. Also, exclude the directory where SQL Server is installed, for example `C:\Program Files\Microsoft SQL Server\`.
53
+
-`sqlservr.exe`
54
+
-`sqlagent.exe`
55
+
-`ReportingServicesService.exe`
56
+
-`msmdsrv.exe`
57
+
-`fdlauncher.exe`
58
+
-`fdhost.exe`
59
+
1. Also, exclude the folder where SQL Server is installed. For example,`C:\Program Files\Microsoft SQL Server\`.
60
60
61
-
For more info on configuring your antivirus or endpoint protection software to work with SQL Server, see [Configure antivirus software to work with SQL Server](/troubleshoot/sql/database-engine/security/antivirus-and-sql-server).
61
+
For more information about how to configure your antivirus or endpoint protection software to work together with SQL Server, see [Configure antivirus software to work with SQL Server](/troubleshoot/sql/database-engine/security/antivirus-and-sql-server).
62
62
63
-
### Step 3: Check event logs and dumps
63
+
### Step 3: Check event logs and dump files
64
64
65
-
Check if the logs or the most recent SQL Agent dump file contain any new errors:
65
+
Check whether the logs or the most recent SQL Agent dump file contain any new errors:
66
66
67
-
1. Review the SQL Agent logs located in: `<SQL_Instance_Log_Directory>\SQLAGENT.OUT\`.
68
-
1. Review the Application and System logs in Event Viewer for related errors.
69
-
1. Analyze the SQL Agent dump file (if multiple dumps are generated, focus on the most recent one).
67
+
1. Review the SQL Server Agent logs that are located in: `<SQL_Instance_Log_Directory>\SQLAGENT.OUT\`.
68
+
1. Review the Application and system logs in Event Viewer for related errors.
69
+
1. Analyze the SQL Agent dump file. If multiple dump files are generated, focus on the most recent one.
70
70
71
-
If there are no new errors, proceed to the next step. If there are new errors, repeat the previous stepsthen check the event logs and dumps again.
71
+
If no new errors are reported, go to the next step. If new errors exist, repeat the previous steps, and then check the event logs and dump files again.
72
72
73
-
### Step 4: Restart SQL Agent service
73
+
### Step 4: Restart SQL Server Agent service
74
74
75
-
Restart the SQL Agent service for the previous changes to take full effect.
75
+
Restart the SQL Server Agent service in order for the changes to take full effect.
76
76
77
77
### Step 5: Monitor stability
78
78
79
-
1. Monitor the SQL Agent logs for recurrence of the error.
80
-
1.Confirm that no new dumps are generated in the log folder.
79
+
1. Monitor the SQL Server Agent logs for any recurrence of the error.
80
+
1.Verify that no new dump files are generated in the log folder.
0 commit comments