1

I have a server running Server 2012 R2 with SQL Server 2012 installed. The SQL Server Agent works fine if it is running under Local System. I changed the SQL Agent service account to a domain account and the service will not start. Checking the event viewer the only error message available is the one below.

The SQL Server Agent (NEPO) service failed to start due to the following error: Access is denied.

If I add the domain account to the local admin group on the server the service starts normally. I don't want to leave that account as a local admin. I have also gone through and manually granted all the permissions Microsoft outlines in this article. Still getting the same error and not sure where to turn next.

5
  • Did you change the account using Configuration Manager? Commented Jul 7, 2017 at 14:54
  • @SqlWorldWide Yes, I changed the service account using the Configuration Manager. Another odd thing is happening there as well though. If I add the account without it being in the local admin group I get the following error WMI Provider Error: Access is denied. [0x80070005]. If I add the account with it being in the local admin group I don't get an error and everything works fine. Commented Jul 7, 2017 at 15:01
  • Try this and this. Commented Jul 7, 2017 at 15:08
  • @SqlWorldWide The first link is to this post. The second link I have come across already and tried. Commented Jul 7, 2017 at 15:12
  • My apology. Pretty much same thing. Here you go. blogs.msdn.microsoft.com/psssql/2009/01/21/… Commented Jul 7, 2017 at 15:24

2 Answers 2

2

I hope you are using Configuration Manager to change the Service account.Using the service.msc applet does not grant required permission

Refer the link : https://social.msdn.microsoft.com/Forums/sqlserver/en-US/975c86b9-3622-418a-8e19-6720a51d7549/access-denied-starting-sql-server-agent?forum=sqlgetstarted

Other way could be to add the Service account in SQL Server as sysadmin and then configure it to run under the required service account.

3
  • I have made the change using Configuration Manager. Commented Jul 7, 2017 at 15:04
  • Great! Then can you try adding the Service account into SQL Server as sysadmin and then try to change the service account from configuration manager. Commented Jul 7, 2017 at 15:15
  • I have already done that as well. As mentioned in my question I went through and manually granted all permissions Microsoft outlines for the SQL Server Agent service accounts. Commented Jul 7, 2017 at 15:16
1

The only way I was able to resolve the issue was to change the way SQL Server was being installed. During the install process the instance root directory was set to the same as the data root directory and the user database directory. I am able to reproduce this issue by running the install this way.

To resolve the issue I pointed the instance root directory to a folder outside of the data root directory and the user database directory.

The one thing that bothers me about this is that I do not know why the original install configuration is problematic. If anyone has any information on this or can point me in the right direction it would be much appreciated.

1
  • First, you should update the question with this information instead of submitting it as an answer. Second, do you use mount points as part of your server configuration? Commented Jul 12, 2017 at 18:17

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.