services.exe D:\MSSQL\MSSQL17.MSSQLSERVER\MSSQL\Binn\SQLAGENT.EXE ACCESS DENIED

Iain Barnetson 106 Reputation points
2026-07-26T15:48:06.9966667+00:00

I've been getting failed installs with SQL Server Developer Standard Edition on Windows 2025 Standard edition, error has been: 

services.exe	1000	QueryOpen	D:\MSSQL\MSSQL17.MSSQLSERVER\MSSQL\Binn\sqlceip.exe	ACCESS DENIED
services.exe	1000	QueryOpen	D:\MSSQL\MSSQL17.MSSQLSERVER\MSSQL\Binn\SQLAGENT.EXE	ACCESS DENIED

I ended up granting local admin rights to the service account I'm using for the SQL Server, whcih allowed the install to complete but still had the same error on sqlceip.exe. I'm logged in to the server the install is running on, as a Domain Admin.

The detail file from the setup bootstrap files shows these errors, see below. 

Any idea why this is happening?

 2026-07-26 13:54:31 Slp: Prompting user if they want to retry this action due to the following failure:
(01) 2026-07-26 13:54:31 Slp: ----------------------------------------
(01) 2026-07-26 13:54:31 Slp: The following is an exception stack listing the exceptions in outermost to innermost order
(01) 2026-07-26 13:54:31 Slp: Inner exceptions are being indented
(01) 2026-07-26 13:54:31 Slp: 
(01) 2026-07-26 13:54:31 Slp: Exception type: Microsoft.SqlServer.Configuration.Sco.ScoException
(01) 2026-07-26 13:54:31 Slp:     Message: 
(01) 2026-07-26 13:54:31 Slp:         Attempted to perform an unauthorized operation.
(01) 2026-07-26 13:54:31 Slp:     HResult : 0x84bb0001
(01) 2026-07-26 13:54:31 Slp:         FacilityCode : 1211 (4bb)
(01) 2026-07-26 13:54:31 Slp:         ErrorCode : 1 (0001)
(01) 2026-07-26 13:54:31 Slp:     Data: 
(01) 2026-07-26 13:54:31 Slp:       DisableRetry = true
(01) 2026-07-26 13:54:31 Slp:     Inner exception type: System.UnauthorizedAccessException
(01) 2026-07-26 13:54:31 Slp:         Message: 
(01) 2026-07-26 13:54:31 Slp:                 Attempted to perform an unauthorized operation.
(01) 2026-07-26 13:54:31 Slp:         HResult : 0x80070005
(01) 2026-07-26 13:54:31 Slp:         Stack: 
(01) 2026-07-26 13:54:31 Slp:                 at Microsoft.SqlServer.Configuration.Sco.Service.StartService(String[] startParams)
(01) 2026-07-26 13:54:31 Slp: ----------------------------------------
(01) 2026-07-26 13:54:33 Slp: User has chosen to retry this action
(01) 2026-07-26 13:54:33 Slp: Sco: Attempting to close service handle for service SQLSERVERAGENT
(01) 2026-07-26 13:54:33 Slp: Sco: Attempting to close SC Manager
(01) 2026-07-26 13:54:33 Slp: Sco: Attempting to open SC Manager
(01) 2026-07-26 13:54:33 Slp: Sco: Attempting to open service handle for service SQLSERVERAGENT
(01) 2026-07-26 13:54:33 Slp: Prompting user if they want to retry this action due to the following failure:
(01) 2026-07-26 13:54:33 Slp: ----------------------------------------
(01) 2026-07-26 13:54:33 Slp: The following is an exception stack listing the exceptions in outermost to innermost order
(01) 2026-07-26 13:54:33 Slp: Inner exceptions are being indented
(01) 2026-07-26 13:54:33 Slp: 
(01) 2026-07-26 13:54:33 Slp: Exception type: Microsoft.SqlServer.Configuration.Sco.ScoException
(01) 2026-07-26 13:54:33 Slp:     Message: 
(01) 2026-07-26 13:54:33 Slp:         Attempted to perform an unauthorized operation.
(01) 2026-07-26 13:54:33 Slp:     HResult : 0x84bb0001
(01) 2026-07-26 13:54:33 Slp:         FacilityCode : 1211 (4bb)
(01) 2026-07-26 13:54:33 Slp:         ErrorCode : 1 (0001)
(01) 2026-07-26 13:54:33 Slp:     Data: 
(01) 2026-07-26 13:54:33 Slp:       DisableRetry = true
(01) 2026-07-26 13:54:33 Slp:     Inner exception type: System.UnauthorizedAccessException
(01) 2026-07-26 13:54:33 Slp:         Message: 
(01) 2026-07-26 13:54:33 Slp:                 Attempted to perform an unauthorized operation.
(01) 2026-07-26 13:54:33 Slp:         HResult : 0x80070005
(01) 2026-07-26 13:54:33 Slp:         Stack: 
(01) 2026-07-26 13:54:33 Slp:                 at Microsoft.SqlServer.Configuration.Sco.Service.StartService(String[] startParams)
(01) 2026-07-26 13:54:33 Slp: ----------------------------------------
(01) 2026-07-26 13:54:33 Slp: User has chosen to retry this action
(01) 2026-07-26 13:54:33 Slp: Sco: Attempting to close service handle for service SQLSERVERAGENT
(01) 2026-07-26 13:54:33 Slp: Sco: Attempting to close SC Manager
(01) 2026-07-26 13:54:33 Slp: Sco: Attempting to open SC Manager
(01) 2026-07-26 13:54:33 Slp: Sco: Attempting to open service handle for service SQLSERVERAGENT
(01) 2026-07-26 13:54:33 Slp: Prompting user if they want to retry this action due to the following failure:
(01) 2026-07-26 13:54:33 Slp: ----------------------------------------
(01) 2026-07-26 13:54:33 Slp: The following is an exception stack listing the exceptions in outermost to innermost order
(01) 2026-07-26 13:54:33 Slp: Inner exceptions are being indented
(01) 2026-07-26 13:54:33 Slp: 
(01) 2026-07-26 13:54:33 Slp: Exception type: Microsoft.SqlServer.Configuration.Sco.ScoException
(01) 2026-07-26 13:54:33 Slp:     Message: 
(01) 2026-07-26 13:54:33 Slp:         Attempted to perform an unauthorized operation.
(01) 2026-07-26 13:54:33 Slp:     HResult : 0x84bb0001
(01) 2026-07-26 13:54:33 Slp:         FacilityCode : 1211 (4bb)
(01) 2026-07-26 13:54:33 Slp:         ErrorCode : 1 (0001)
(01) 2026-07-26 13:54:33 Slp:     Data: 
(01) 2026-07-26 13:54:33 Slp:       DisableRetry = true
(01) 2026-07-26 13:54:33 Slp:     Inner exception type: System.UnauthorizedAccessException
(01) 2026-07-26 13:54:33 Slp:         Message: 
(01) 2026-07-26 13:54:33 Slp:                 Attempted to perform an unauthorized operation.
(01) 2026-07-26 13:54:33 Slp:         HResult : 0x80070005
(01) 2026-07-26 13:54:33 Slp:         Stack: 
(01) 2026-07-26 13:54:33 Slp:                 at Microsoft.SqlServer.Configuration.Sco.Service.StartService(String[] startParams)
(01) 2026-07-26 13:54:33 Slp: ----------------------------------------
(01) 2026-07-26 13:54:34 Slp: User has chosen to cancel this action

 

SQL Server Database Engine

2 answers

Sort by: Most helpful
  1. Erland Sommarskog 136.4K Reputation points MVP Volunteer Moderator
    2026-07-27T09:33:44.63+00:00

    Again, this is quite obviously something in your environment. I asked if this was in a corporate context, because in that case your IT department might have set up some funny group policy or similar that you were unaware of. Since this is your home environment, you are your own IT department.

    The error suggests one of:

    • The install process does not have permission to start services.
    • The service account for the service does not have the permission to log on as a service.

    The text of the message makes me more think of the first alternative, but since the install service was able to start a few more services, and you were able to get these started by changing to a domain account, it has to be the second one.

    There does not seem to be a way to set the service accounts for the telemetry services, but it will always be NT Service\SSISTELEMETRY170 and NT Service\SQLTELEMETRY. But since these accounts now have been created, you could manually grant these accounts the required permissions.

    Normally, you should not have to do that, but this is something that SQL Server Setup takes care of. Why this did not happen in your case, I don't know.

    Was this answer helpful?

    1 person found this answer helpful.

  2. AI answer

    2026-07-26T15:48:36.03+00:00

    The failure matches a permissions problem on the SQL Server service account, not the interactive account running Setup. The documented symptom is that SQL Server services fail to start with Error 5: Access is denied when the configured SQL Server service account does not have sufficient privileges on the SQL Server installation folder.

    For this case, focus on the service account used by SQL Server Agent and verify its effective access on:

    • D:\MSSQL\MSSQL17.MSSQLSERVER\MSSQL\Binn\SQLAGENT.EXE
    • D:\MSSQL\MSSQL17.MSSQLSERVER\MSSQL\Binn\sqlceip.exe
    • the parent D:\MSSQL\MSSQL17.MSSQLSERVER\MSSQL\Binn folder

    Use this path to confirm and fix it:

    1. Open SQL Server Configuration Manager or Services and note the account configured for the SQL Server service and SQL Server Agent service.
    2. In File Explorer, right-click the SQL Server binary folder or the specific executable, select Properties > Security > Advanced.
    3. Open Effective Access.
    4. Select the SQL Server service account or SQL Server Agent service account.
    5. Select View Effective Access.
    6. If access is denied because of an explicit or inherited Deny entry, remove that Deny permission.
    7. Restart the SQL Server service or rerun Setup.

    Important: granting the service account local administrator rights is a workaround, not the targeted fix. The documented guidance is to resolve the file-system permission issue on the SQL Server installation folder and remove conflicting Deny permissions.

    There is also a separate documented setup failure where SQL Server Setup expects administrators to have read/write access on all subkeys under:

    • HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall

    If Setup still fails after fixing file permissions, check that registry path. If the relevant administrator or setup account lacks the required access there, grant the needed permissions. Risk: registry permission changes can affect system behavior, so change only the required keys and permissions.

    If the setup account has had default user rights removed by policy, Setup can also fail. In that case, add the setup account to these local security policies:

    • Backup Files and Directories
    • Debug Programs
    • Manage auditing and security log

    The fact that installation completed after adding local admin rights strongly indicates the root cause is missing access for the service account or setup account on the SQL binaries or required registry locations.


    AI-generated content may be incorrect. Read our transparency notes for more information.

    Was this answer helpful?

Your answer

Answers can be marked as 'Accepted' by the question author and 'Recommended' by moderators, which helps users know the answer solved the author's problem.