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

SQL Server Service Fails to Start Under a gMSA

· 52CE 我爱测

Resolve error 1069, Event ID 7041, or Event ID 7038 when SQL Server or SQL Server Agent fails to start under a group managed service account (gMSA).

Applies to:   SQL Server on Windows

Summary

This article helps you troubleshoot SQL Server and SQL Server Agent service startup failures, such as error 1069, Event ID 7041, and Event ID 7038, when the service runs under a group managed service account (gMSA). It covers managed password retrieval, the IsManagedAccount flag, domain connectivity, and failures that occur only during boot.

Before you start, review the prerequisites and run the quick validation checklist in Troubleshoot SQL Server setup, startup, and authentication failures with gMSAs.

Symptoms

  • SQL Server or SQL Server Agent fails to start and reports error 1069, "The service did not start due to a logon failure."
  • The System log contains Service Control Manager Event ID 7041 or Event ID 7038.
  • The service fails to start automatically after the host restarts, but it starts manually later.

Cause

Error 1069 with Event ID 7041 or Event ID 7038 isn't specific to gMSAs. Event ID 7041 indicates a missing logon right, and Event ID 7038 indicates an account, password, or domain-contact problem. When the service account is a gMSA, Event ID 7038 can also mean that the host can't retrieve the managed password, or that Service Control Manager isn't treating the account as managed.

Diagnose service startup failures

For the complete set of causes and resolutions for error 1069, including user-rights assignment, deny assignments, disabled or locked accounts, and services that can't contact the domain at boot, see Error 1069 occurs when you start SQL Server Service.

When the service account is a gMSA, check these conditions first:

  1. Confirm the configured service identity with sc.exe qc.
  2. Confirm that Test-ADServiceAccount returns True on the affected host, and on every possible owner node for a failover cluster instance (FCI).
  3. Confirm that the host computer account, or a group that contains it, is listed in PrincipalsAllowedToRetrieveManagedPassword.
  4. Confirm that sc.exe qmanagedaccount reports TRUE for the affected service. If it reports FALSE, follow the steps in gMSA IsManagedAccount flag is set improperly.
  5. Confirm domain-controller discovery, secure-channel health, and time synchronization with nltest and w32tm.

Correlate a boot-time-only failure

If the service fails to start automatically after the host restarts but starts manually later, compare the server boot, DNS, Netlogon, domain-discovery, and SQL Server startup timestamps against the failure time. A check that fails at boot and succeeds after the host is fully online confirms a startup-order problem rather than a gMSA configuration problem. For resolutions, including delayed start and the Netlogon service dependency, see The specified domain either does not exist or could not be contacted.

Resolve service startup failures

  • Correct the specific account, password retrieval, managed account, or domain condition identified by the evidence.
  • Use SQL Server Configuration Manager for all supported service-account changes. For more information, see Change the service startup account.
  • Restart the service and verify that Event ID 7038 or Event ID 7041 doesn't recur, including after a controlled restart of the host.

Note: For an FCI, retain cluster-managed startup instead of changing the Windows service start mode. See Troubleshoot SQL Server failover cluster instance failures with gMSAs.

Collect diagnostic data

If the service still doesn't start after you complete these steps, collect diagnostic data from the affected host for the same failure interval. For the gMSA-specific evidence and standard SQL Server logs to gather, see Collect diagnostic data in the gMSA troubleshooting overview. Use that data to continue the investigation or to open a support case.

Related content

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 09/29/2026
内容语言
中文;命令、路径和错误标识保留技术原文
本地收录日期
2026-11-15
授权说明
CC BY 4.0 (documentation), MIT (code samples)

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

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