Solved

The service did not start due to a logon failure.

Posted on 2011-03-06
16
3,514 Views
Last Modified: 2012-06-27
I created a domain user as the logon user in SQL server configuration manager. The user works when I type the password in the Windows MSQL service, but not in the SQL configuration manager services. Evertime the computer rebbts I have to reenter the password in the Windows MSQL services and start the service.

Here is the error when I reboot

EVENT ID: 7001
The SQL Server Agent (MSSQLSERVER) service depends on the SQL Server (MSSQLSERVER) service which failed to start because of the following error:
The service did not start due to a logon failure.

Like I said if I reenter the password in services it works and then I just start the service

Can anyone help please?
0
Comment
Question by:rjackmanwyn
  • 8
  • 5
  • 3
16 Comments
 
LVL 18

Expert Comment

by:Matthew Kelly
Comment Utility
You may have already done this, but does the domain account have the "Log On As Service" permission?

See the "Windows Domain Account Permissions" section for permissions required for SQL to run under a domain account: http://msdn.microsoft.com/en-us/library/ms191543.aspx

Step to add the Log on as service permission: http://technet.microsoft.com/en-us/library/cc739424(WS.10).aspx


0
 
LVL 18

Expert Comment

by:Matthew Kelly
Comment Utility
Also see this: http://technet.microsoft.com/en-us/library/ms143504.aspx

"Always use SQL Server tools such as SQL Server Configuration Manager to change the account used by the SQL Server or SQL Server Agent services, or to change the password for the account. In addition to changing the account name, SQL Server Configuration Manager performs additional configuration such as setting permissions in the Windows Registry so that the new account can read the SQL Server settings. Other tools such as the Windows Services Control Manager can change the account name but do not change associated settings. If the service cannot access the SQL Server portion of the registry, the service may not start properly."
0
 

Author Comment

by:rjackmanwyn
Comment Utility
If I change the login password for the user in SQL configuation is does not let me. I can only change it in Windows services then go back and change it in SQL config. But when I restart it doesn't hold it. I have read that this is a Microsoft bug, but haven't read a real good work around.
0
 
LVL 18

Expert Comment

by:Matthew Kelly
Comment Utility
Does it give you an error when you try to change the login password for the user in SQL configuration?

That may be your problem, perhaps the account doesn't have all of the required permissions to be able to run the service. Without setting it through the configuration, it won't get set in other required places.
0
 

Author Comment

by:rjackmanwyn
Comment Utility
But once I set it through Windows it I can go back in SQL config and set it. What permissions does it need?
0
 
LVL 18

Expert Comment

by:Matthew Kelly
Comment Utility
It needs at least the five permissions listed here: http://msdn.microsoft.com/en-us/library/ms191543.aspx

If this isn't a production machine, or you are OK just testing this, you could add the domain account to the local administrators group. That isn't a secure way of running the service, as if the sql server was hacked the hacker would have local admin rights, but just to eliminate permissions as the reason.

After setting the account as local admin, reboot and try setting password through sql config.

0
 

Author Comment

by:rjackmanwyn
Comment Utility
OK I gave it domain admin in and it worked. I will look at the permissions in your link and try it with them. Thank You
0
 

Author Comment

by:rjackmanwyn
Comment Utility
I take it back. When I restarted the second time it lost the credentials in SQL again. If I try to set the password through sql config it doesn't error, but when I try to start the service sql config I get a "the request failed or the service did not respond in a timely fashion" error
0
What Should I Do With This Threat Intelligence?

Are you wondering if you actually need threat intelligence? The answer is yes. We explain the basics for creating useful threat intelligence.

 
LVL 18

Accepted Solution

by:
Matthew Kelly earned 500 total points
Comment Utility
The Application event log will usually have more information as to why the service failed to respond.
0
 

Author Comment

by:rjackmanwyn
Comment Utility
I changed the username and password back to administrator in the Windows services and then changed it to what I wanted in the sql config and it took it. I will see if I have any problems again. Here is the error I have always gotten in the applications event log. Thanks

EVENT ID: 7001
The SQL Server Agent (MSSQLSERVER) service depends on the SQL Server (MSSQLSERVER) service which failed to start because of the following error:
The service did not start due to a logon failure.
0
 

Author Closing Comment

by:rjackmanwyn
Comment Utility
Thanks Matthew

It worked for about 4 reboots, but began having the problem again. Your info was very helpfull, but I think I have other problems. I will close this so thank you
0
 

Expert Comment

by:Jayhawk05
Comment Utility
I have been running into the same issue.  Open the server manager window (right click on computer --> Manage).  On the left navigation panel, go to Local Users and Groups and open Groups (see screenshot).  There you'll see several groups for SQL server accounts.  Try adding your respective sql accounts to each of these groups.  I did that and everything came back up on reboot (only tried once though). Server Manager Window
0
 

Author Comment

by:rjackmanwyn
Comment Utility
Thanks Jayhawk

I have a 2003 server and I don't see server manager. I did add that account in administrator Tools/services, but that didn't work.
0
 

Expert Comment

by:Jayhawk05
Comment Utility
Go to START --> Right click on MY COMPUTER --> MANAGE.  It's called "Computer Management" in Server 2003.  In the left pane you'll see System Tools --> Local Users and Groups --> Groups.  You'll see the group accounts there. (I verified on our Server 2003 machine.)  
0
 

Author Comment

by:rjackmanwyn
Comment Utility
Thanks jayhawk

I will restart it tonght and see what happens. Is there a way to give you points for this if it is closed?
0
 

Expert Comment

by:Jayhawk05
Comment Utility
I'm not worried about the points.  Mostly, I'm just hoping it fixes both of our problems!
0

Featured Post

IT, Stop Being Called Into Every Meeting

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

Join & Write a Comment

In this article we will get to know that how can we recover deleted data if it happens accidently. We really can recover deleted rows if we know the time when data is deleted by using the transaction log.
Ever wondered why sometimes your SQL Server is slow or unresponsive with connections spiking up but by the time you go in, all is well? The following article will show you how to install and configure a SQL job that will send you email alerts includ…
This video shows how to set up a shell script to accept a positional parameter when called, pass that to a SQL script, accept the output from the statement back and then manipulate it in the Shell.
Via a live example, show how to shrink a transaction log file down to a reasonable size.

763 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

10 Experts available now in Live!

Get 1:1 Help Now