大网数据广告活动
数据库与应用安全

Troubleshoot Repeated SQL Server Agent Service Failures

· 52CE 我爱测

Resolve repeated failures of the SQL Server Agent service. Follow step-by-step solutions to fix registry issues and improve stability.

This article provides troubleshooting guidance for an issue where the SQL Agent service repeatedly stops responding at regular intervals.

Symptoms

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:

[510] SQLAgent failed, dump generated in \<SQL_Instance_Log_Directory\>  
[LOG] Exception 29539 caught at line 233 of file sql\mpu\SqlAgent\src\autostrt.cpp. SQLServerAgent initiating self-termination.

Cause

These failures occur if the SQL Server Agent service doesn't retrieve the following registry subkey:

HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Microsoft SQL Server\<InstanceID>\SQLServerAgent\AutoRegistryRefresh

When the registry subkey retrieval fails, the SQL Server Agent service reports an exception in the log, and then it terminates itself.

Registry subkey retrieval can fail because of the following reasons:

  • Antivirus or endpoint protection software that interferes with registry access
  • Missing or misconfigured registry keys
  • Transient access failures in Windows registry

Solution

To resolve this issue, follow these steps.

Step 1: Verify the registry key

  1. Start Registry Editor (regedit.exe).
  2. Go to the following path: HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Microsoft SQL Server\<InstanceID>\SQLServerAgent.
  3. Check whether the AutoRegistryRefresh key exists.
  4. If the AutoRegistryRefresh key is missing, create a DWORD (32-bit) Value that's named AutoRegistryRefresh, and set its value to 1.

Step 2: Exclude SQL Server from antivirus scanning

Important: 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.

  1. Configure your antivirus or endpoint protection software to exclude the common SQL Server processes:
    • sqlservr.exe
    • sqlagent.exe
    • ReportingServicesService.exe
    • msmdsrv.exe
    • fdlauncher.exe
    • fdhost.exe
  2. Also, exclude the folder where SQL Server is installed. For example, C:\Program Files\Microsoft SQL Server\.

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.

Step 3: Check event logs and dump files

Check whether the logs or the most recent SQL Agent dump file contain any new errors:

  1. Review the SQL Server Agent logs that are located in: <SQL_Instance_Log_Directory>\SQLAGENT.OUT\.
  2. Review the Application and system logs in Event Viewer for related errors.
  3. Analyze the SQL Agent dump file. If multiple dump files are generated, focus on the most recent one.

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.

Step 4: Restart SQL Server Agent service

Restart the SQL Server Agent service in order for the changes to take full effect.

Step 5: Monitor stability

  1. Monitor the SQL Server Agent logs for any recurrence of the error.
  2. Verify that no new dump files are generated in the log folder.

Source: Microsoft Learn / IT Pro troubleshooting by Microsoft and contributors. Documentation licensed CC BY 4.0. Code samples are covered by the MIT License. Converted from Markdown, with links normalized and embedded media omitted.

资料来源与适用范围

资料来源
Microsoft Learn / IT Pro troubleshooting
适用范围
See source applicability · Source date 12/04/2025
内容语言
中文;命令、路径和错误标识保留技术原文
本地收录日期
2026-11-15
授权说明
CC BY 4.0 (documentation), MIT (code samples)

正文与所需资源由本站本地存储。查看来源及更新记录 ↗

请按适用版本和实际日志确认原因;本站没有对每一种系统或设备逐项执行文中的操作。