Link to home
Start Free TrialLog in
Avatar of KommInv
KommInvFlag for Sweden

asked on

SQL Server/SQL Server Agent services will not start after server reboot

We host a SQL Server 2008 database server on Windows Server 2008 as a virtual server on VMWare.

After I have rebooted the server by shutting down the guest operating system, power off and then power on again some services fails to start automatically. The services in question are SQL Server and SQL Server Agent. When I start the SQL Server service manually it turns out that the password for the \SQL Server account is lost too. So I will have to set the correct password again and then start the service.

Has anyone experinced the same problem and, if so, is there any solution?

Avatar of Guy Hengel [angelIII / a3]
Guy Hengel [angelIII / a3]
Flag of Luxembourg image

what I made is this:
make sql server service dependent of the netlogon service
make the sql agent service dependant of the sql server service

this can be done with registry entries:
http://www.yellow-bricks.com/2009/02/12/vcenter-and-sql-service-dependencies/
Avatar of KommInv

ASKER

angellll:

Does this really fix that the SQL Server service doesn´t start automatically? The article seems to fix that the vCenter service doesn´t start correctly. Or do I misunderstand it? My problem is that the SQL Server service doesn´t start correctly.
Avatar of KommInv

ASKER

After briefly reviewing the Event Log after the latest reboot I came accross this error message:

"The MSSQL$XXX service was unable to log on as .\SQL_Server with the currently configured password due to the following error:
Logon failure: the user has not been granted the requested logon type at this computer.
 
Service: MSSQL$XXX
Domain and account: .\SQL_Server
 
This service account does not have the required user right "Log on as a service."
 
User Action
 
Assign 'Log on as a service' to the service account on this computer. You can use Local Security Settings (Secpol.msc) to do this. If this computer is a node in a cluster, check that this user right is assigned to the Cluster service account on all nodes in the cluster.
 
If you have already assigned this user right to the service account, and the user right appears to be removed, check with your domain administrator to find out if a Group Policy object associated with this node might be removing the right."

Does this has anything to do with my problem?
>Does this has anything to do with my problem?

yes. check the login used for the sql server service startup, and make sure that login has the permission "log on a a service"

>Does this really fix that the SQL Server service doesn´t start automatically?

I should have specified that the article linked shows how to make services dependend of each other, in the given case, it was to make some service dependant of SQL Server, in your case, it would be the other way round ...
.. and given the error you post, that shall not apply, actually
Which username have you associated with the SQL Services ?
Avatar of KommInv

ASKER

angellll:

"yes. check the login used for the sql server service startup, and make sure that login has the permission "'og on a a service'"

That is what the error message in the Event Log says too. But I have no idea how to add that permission. I looked in "Computer" --> "Manage" and viewed the "Properties" dialog of the account. I couldn´t find that option anywhere there.

aranraju:

We use the local SQL_Server account(displayed as .\SQL_Server).

Start -> Run -> secpol.msc
Local Security Settings would open
Navigate to Local Policies -> User Rights Assignment -> Log on as a Service -> Add User or Group.
Add the user and viola, its done.
Avatar of KommInv

ASKER

arunraju:

Just a (maybe)stupid question; can I do this in run-time - does it affect processes currently ran by the account I´m editing?
No, it won't affect anything. When you set local or group policies, they are either instantly applied (local) or applied at designated intervals as specified in group policy (anywhere from 45mins to 1hr). Some policies do require a reboot to take affect, but you are not prompted to do so. This setting should apply without needing a reboot.

Regards,
~coolsport00
I am certain that you won't lose anything but I suggest that you stop the services before applying the permission and restart them after modifying the permissions.
Avatar of KommInv

ASKER

Sorry to say, but I just checked and the local SQL_Server account is member of this group. I got a suggestion from a collegue to set the SQL Server service to start as "Automatic(delayed)" rather than "Automatic", reset the password on account level, remove the account from the service logon properties and then add it again. What do you think about that approach?
That is the most *safest* way to go about it. I concur with your collegue.

~coolsport00
Automatic (delayed) should hold good since Windows always would want to initiate the System Services first and then initiate the Application Services.
ASKER CERTIFIED SOLUTION
Avatar of KommInv
KommInv
Flag of Sweden image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Glad it's now working for you "KommInv".

~coolsport00