Solved

The service did not start due to a logon failure.

Posted on 2011-03-06
16
3,633 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
ID: 35047924
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
ID: 35047933
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
ID: 35048116
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
ID: 35048158
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
ID: 35048190
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
ID: 35048245
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
ID: 35048305
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
ID: 35048360
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
Zoho SalesIQ

Hassle-free live chat software re-imagined for business growth. 2 users, always free.

 
LVL 18

Accepted Solution

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

Author Comment

by:rjackmanwyn
ID: 35048514
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
ID: 35073762
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
ID: 35437736
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
ID: 35439938
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
ID: 35442134
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
ID: 35442784
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
ID: 35443004
I'm not worried about the points.  Mostly, I'm just hoping it fixes both of our problems!
0

Featured Post

Best Practices: Disaster Recovery Testing

Besides backup, any IT division should have a disaster recovery plan. You will find a few tips below relating to the development of such a plan and to what issues one should pay special attention in the course of backup planning.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Introduction SQL Server Integration Services can read XML files, that’s known by every BI developer.  (If you didn’t, don’t worry, I’m aiming this article at newcomers as well.) But how far can you go?  When does the XML Source component become …
Load balancing is the method of dividing the total amount of work performed by one computer between two or more computers. Its aim is to get more work done in the same amount of time, ensuring that all the users get served faster.
Familiarize people with the process of retrieving data from SQL Server using an Access pass-thru query. Microsoft Access is a very powerful client/server development tool. One of the ways that you can retrieve data from a SQL Server is by using a pa…
Using examples as well as descriptions, and references to Books Online, show the documentation available for datatypes, explain the available data types and show how data can be passed into and out of variables.

863 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

28 Experts available now in Live!

Get 1:1 Help Now