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

Access is denied error and SQL Server doesn't start

· 52CE 我爱测

Provides resolutions for the problem where SQL Server fails to start with Access is denied error.

Applies to:   SQL Server

Symptoms

When you configure the Microsoft SQL Server service to run under an account that does not have sufficient privileges on the SQL Server installation folder, SQL Server does not start, and it returns an error message that resembles the following, depending on how you try to start the service:

  • By using the Services applet:

    Windows could not start the SQL Server (MSSQLSERVER) service on Local Computer.
    Error 5: Access is denied.

  • By using a command prompt:

    C:\Users\username>NET START MSSQLSERVER
    System error 5 has occurred.
    Access is denied.

Resolution

  1. Open the System log, and verify that you see an error message entry that resembles the following:

    Log Name:      System  
    Source:        Service Control Manager  
    Date:          <Datetime>  
    Event ID:      7000  
    Task Category: None  
    Level:         Error  
    Keywords:      Classic  
    User:          N/A  
    Computer:      <Server name>  
    Description:
    The SQL Server (MSSQLSERVER) service failed to start due to the following error:  
    Access is denied.
    
  2. Using either Microsoft SQL Server Configuration Manager or Service Control Manager, note the service account for SQL Server service.

  3. Go to the SQL Server installation folder (for example C:\Program Files\Microsoft SQL Server\MSSQL15.MSSQLSERVER\MSSQL\Binn) and do the following to check effective access of the SQL Service account:

    1. Right-click the file or folder, select Properties, and then select the Security tab.
    2. Select Advanced, select the Effective Access tab, and then select Select a User to either type in the SQL Service account or select from the list.
    3. Select View Effective access to understand and resolve the permissions issue. For example, if the Deny permission is added to the user or the group that the SQL Server service account is member of, remove the Deny permission and restart the SQL Server service.

    [!NOTE] You can also use Process Monitor tool to identify and isolate the permission issues. The following screenshot of an example output from Process Monitor shows the <DomainName>\sqlsrvlogin SQL Server service account generating an Access Denied error.

    :::image type="content" source="media/event-id-7000-access-denied/process-monitor.png" alt-text="Screenshot of an example output from Process Monitor." lightbox="media/event-id-7000-access-denied/process-monitor.png":::

Reference

Service Permissions

Source: Microsoft Learn / IT Pro troubleshooting by Microsoft and contributors (upstream author metadata: aartig13). 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 01/17/2025
内容语言
中文;命令、路径和错误标识保留技术原文
本地收录日期
2026-11-15
授权说明
CC BY 4.0 (documentation), MIT (code samples)

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

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