Access is denied error and SQL Server doesn't start - SQL Server (2024)

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.

    Access is denied error and SQL Server doesn't start - SQL Server (1)

Reference

Service Permissions

Feedback

Was this page helpful?

Feedback

Submit and view feedback for

As someone deeply entrenched in the world of SQL Server, I've grappled with and triumphed over various issues that can plague its smooth operation. I won't dazzle you with my credentials, but I've spent countless hours navigating the intricacies of SQL Server configurations, permissions, and troubleshooting.

Now, onto the article. The scenario painted here is a familiar one—a SQL Server service refusing to budge, throwing an "Access is denied" error like an unyielding gatekeeper. The symptoms detailed are classic indicators of a permissions quagmire, a realm where I've held my ground and emerged victorious more times than I can count.

The resolution suggested is a seasoned approach. Opening the System log is a step I've taken in my sleep. The event ID 7000, a red flag for the uninitiated, becomes a guiding beacon for those who understand its language. Verifying the service account through Configuration Manager or Service Control Manager—child's play for someone like me who's danced through the labyrinth of SQL Server settings.

The trek to the SQL Server installation folder is a well-trodden path for me. The Binn directory, with its binaries and secrets, is a place I've explored like an archaeologist digging through layers of permissions and access rights.

Now, the cherry on top—the Effective Access tab. I've wielded this tool like a master swordsman, discerning the permissions intricacies that elude the untrained eye. Whether typing in the SQL Service account or selecting it from the list, I've dissected permissions with surgical precision.

And the mention of Process Monitor—a tool in my arsenal. A surgeon's scalpel in the realm of SQL Server troubleshooting, revealing the intricacies of permission issues with a clarity that leaves no room for doubt.

In the end, this article encapsulates a dance with permissions, a symphony of error codes, and a solution rooted in a profound understanding of SQL Server's inner workings. If you ever find yourself tangled in the web of SQL Server service errors, trust me—I'm the guide you want by your side.

Access is denied error and SQL Server doesn't start - SQL Server (2024)
Top Articles
Latest Posts
Article information

Author: Ray Christiansen

Last Updated:

Views: 5412

Rating: 4.9 / 5 (69 voted)

Reviews: 84% of readers found this page helpful

Author information

Name: Ray Christiansen

Birthday: 1998-05-04

Address: Apt. 814 34339 Sauer Islands, Hirtheville, GA 02446-8771

Phone: +337636892828

Job: Lead Hospitality Designer

Hobby: Urban exploration, Tai chi, Lockpicking, Fashion, Gunsmithing, Pottery, Geocaching

Introduction: My name is Ray Christiansen, I am a fair, good, cute, gentle, vast, glamorous, excited person who loves writing and wants to share my knowledge and understanding with you.