THE SQL Server Blog Spot on the Web

Welcome to SQLblog.com - The SQL Server blog spot on the web Sign in | |
in Search

Greg Low (The Bit Bucket: IDisposable)

Ramblings of Greg Low (SQL Server MVP, MCM and Microsoft RD) - SQL Down Under

SQL Server Service won’t start after changing service account - service-specific error %%-2146885628

Yesterday I was at a site where they decided to change the service account for the SQL Server services on a set of systems. After changing the service accounts, SQL Server restarted just fine on all machines except one.

I had used the SQL Server Configuration Manager to make the changes (important to not just use the Services applet in Administrative Tools) but I got the typical error telling me that the service wouldn’t start in a timely fashion. The server was running SQL Server 2008 R2 SP2.

Looking in the system event log produced the following errors:

The SQL Server (MSSQLSERVER) service terminated with service-specific error %%-2146885628.

A fatal error occurred when attempting to access the SSL server credential private key. The error code returned from the cryptographic module is 0x8009030d. The internal error state is 10001.

I spent a while looking for info on the last error and found a site where they discussed that it was generated when the service account could not read the machine keys that were stored in the  C:\ProgramData\Microsoft\Crypto\RSA\MachineKeys folder. The article then discussed how to add read permissions for the keys one by one.

It suddenly dawned on me that it was probably a problem with the permissions on the folder instead. Checking the permissions on that folder made me realize that the local Administrators account should have the ability to read it. The service account was meant to be a member of the local Administrators account but had not been added to that group on this machine.

Adding the service account to the local Administrators group on the machine (note: not the domain administrators account) fixed the issue and the service started again, until I could get the correct account permissions set in the morning when other staff came back. (In the comments I've added a list of what's actually required).

Hope this helps someone else. (And helps me the next time I see this and have forgotten what it was J)

Published Thursday, May 30, 2013 11:49 AM by Greg Low

Comment Notification

If you would like to receive an email when updates are made to this post, please register here

Subscribe to this post's comments using RSS

Comments

 

Dan said:

but what was the actual root cause, we can fix lots with local admin, but dare say break a lot of policies in the process

May 29, 2013 8:53 PM
 

Greg Low said:

Too true Dan. This was a case of getting back functioning (no-one else around) until I could get the account updated in the morning. The minimum required for a SQL Server service account is:

Log on as a service (SeServiceLogonRight)

Replace a process-level token (SeAssignPrimaryTokenPrivilege)

Bypass traverse checking (SeChangeNotifyPrivilege)

Adjust memory quotas for a process (SeIncreaseQuotaPrivilege)

Permission to start SQL Server Active Directory Helper

Permission to start SQL Writer

Permission to read the Event Log service

Permission to read the Remote Procedure Call service

May 29, 2013 9:10 PM
 

Dave said:

Helped me on Saturday after MS security updates were installed.  After reboot SQL would not start.

Thanks Mate!

March 24, 2014 1:58 PM
 

Ward said:

Thank you. Solved it by adding NetworkService to local administrator group.

March 18, 2015 10:33 AM
 

Saish said:

Thanks

November 30, 2015 6:40 PM
 

Mahesh said:

Thank you very much, it worked for me.

December 18, 2015 7:47 AM
 

Varun Gautam said:

Thanks !!! It worked for me just by adding NetworkService to the local administrator GROUP.

January 15, 2016 1:56 AM
 

Greg Low said:

That will get you working Varun but note the list above of which permissions you should actually be assigning.

January 15, 2016 4:53 AM
 

JP Mac said:

We're in a situation where we have to remove all accounts from Local Admins except what is absolutely required.  SQL Server can live without, but it takes work.  In my experience with this very scenario, I ran ProcMon on the server where SQL would not start and found exactly which cert file it wanted to access.  I then granted our SQL service domain account Full Control to that file only.  SQL then started successfully.

February 29, 2016 3:46 PM
 

Greg Low said:

Best option is to use the SQL Server Configuration Manager to set the required permissions.

There is a list of what's actually required here: https://msdn.microsoft.com/en-AU/library/ms143504.aspx

February 29, 2016 3:51 PM
 

JP Mac said:

Yes, I know that you should use SSCM when you are CHANGING to a different account or the password because it will set all of the appropriate permissions for SQL to run properly.  However, if you read through that KB, it does not cover the SSL certs that SQL may use.  And we were not changing our accounts or our passwords; we were removing the existing SQL Server service domain account from Local Administrators.  That requires re-permissions all down the line.  So just as an FYI for anyone else who may find themselves in a similar situation...

March 1, 2016 11:11 AM
 

Ellen said:

How can I give SQL Servicedomai accoutn foolowing permission ?

Permission to start SQL Writer

Permission to read the Event Log service

Permission to read the Remote Procedure Call service

I have heard during setu sql will grant but it has not happend since after installed SQl I checke the policy for og on as a service (SeServiceLogonRight)

Replace a process-level token (SeAssignPrimaryTokenPrivilege)

Bypass traverse checking (SeChangeNotifyPrivilege)

Adjust memory quotas for a process (SeIncreaseQuotaPrivilege) and the user wasnt there

June 15, 2016 1:26 PM

Leave a Comment

(required) 
(required) 
Submit

This Blog

Syndication

Tags

No tags have been created or used yet.

Archives

Privacy Statement