21

My SQL Server instance's (SQL Server 2008 R2 Express) service has Startup Type = Automatic. The past couple of times I've restarted my computer the service has failed to start on its own, but it starts just fine when I manually start the service.

Event Viewer shows that the service fails to start because of a connection timeout. There are 2 entries regarding this timeout:

Entry 1

A timeout was reached (30000 milliseconds) while waiting for the SQL Server (SQLEXPRESS) service to connect.

Entry 2

The SQL Server (SQLEXPRESS) service failed to start due to the following error: The service did not respond to the start or control request in a timely fashion.

I checked the ERRORLOG files and there are no errors logged around the time of those Event Viewer entries.

Any ideas on the cause of this problem or how I can investigate further?

12

This issue happens because the SQL Server lost the logon id credentials or used an account without rights to start services.

For starting your services automatically, SQL Server needs an account with rights to start services during operating system start up.

To solve this issue you need to go Administrative Tools > Services > SQL Server(MSSQLSERVER or the name of your instances) > Right Click > Properties > Move to Log On > Set the Log On option using a Local System Account

If you have chosen this option, hit on Browse Button and find the Local Service Account or Network service Account there > Click in Apply.

Restart your computer and you will able to start your SQL Server.

1

Just a quick thought on something to look into, in a domain type environment, some operating systems allow you to logon to the server before full network connectivity is established. You may want to check for either local or domain level group policy settings to not allow logon or OS startup until full network connectivity is established.

Just in case you notice this when you log onto the server after reboots, it actually logs onto the OS with the cached credential before it can reach the domain controllers to authenticate (network connectivity not fully established) with the login credential if it's a domain credential the SQLExpress service account is running as.

Not sure if that's exactly applicable in your case but this is something to at least simply investigate and try to test at least just in case.

I found this in some article I saved long ago when I had a similar issue with an AD home directory (not via login script) to map home directory for a workstation PC:

The policy value for Computer Configuration -> Administrative Templates -> System -> Logon “Always Wait for the Network at Computer Startup and Logon” will be set to “Enabled”.

If the following registry value doesn’t exist or its value is not set to 1, then this is a finding:

Registry Hive: HKEY_LOCAL_MACHINE Subkey: \Software\Policies\Microsoft\Windows NT\CurrentVersion\Winlogon\ Value Name: SyncForegroundPolicy Type: REG_DWORD Value: 1

1

Have you tried logging on as the local Administrator?

I have been having this exact same problem with SQL 2014 Express on Windows 10. I wanted to create a new user that wasn't the built-in local Administrator so I created a new user, added it to the Administrators group, set that user to autologon upon boot et voila! SQL Server service fails to start automatically. I tried delayed start, tried Local Service, tried Network Service, tried the new administrator user, tried the Always Wait... group policy setting. Nothing worked.

Even uninstalled SQL Server 2014 Express, rebooted, manually removed all leftover files/folders and rebooted again and reinstalled under the new administrator user. Still no go.

Switched back to autologon as the built-in Administrator account et voila! SQL Server service is now starting automatically.

This is obviously a workaround for me so I am still researching.

** UPDATE **

Actually, my problem was rooted in the machine having been renamed previously. Once I changed the "OriginalMachineName" value in the registry, problem solved!

-1

I went to Local service and changed

SQL Server(MSSQLSERVER SQL Server Agent (MSSQLSERVER)

Set them to Automatic Delayed and Logon type to

Local System Account Tick ( Allow service to Interact with desktop)

And it starts automatically

-5

Well, there are a few things you can try. First, go to Control Panel > System and Security > Administrative Tools > Services > then find SQL Server or SQL Server VSS Writer in the Services (Local) list. Right-click it and select Properties, click the General tab and ensure that Startup type is set to 'Automatic'.

Now, the service may actually be failing for some reason. So what you can do is, click the Recovery tab, and select an option for First failure. Probably try to Restart the Service.

Next thing to do is to go to Event Viewer and check the Services list and check for any warnings or errors that may have been logged by the service (or Windows).

If all else fails, you can try using the Rebuild Master Utility. For details on that, see this MSDN page: https://social.msdn.microsoft.com/Forums/en-US/f713067f-3017-478b-a9ae-8049d80f9fdc/sql-server-is-not-starting-up?forum=sqldatabaseengine

  • 2
    What a terrible link to include - rebuild your Master DB is terrible advice - for 1 OP should have backups of the Master DB and relevant System DBs, for 2 he can start SQL Server manually, so the issue described in the link is not his problem. Keith - did you ever get to the bottom of this? – MHSQLDBA May 26 '15 at 11:39
  • why is this appalling answer still here? – Mitch Wheat May 10 '18 at 1:19
  • The word "probably" doesn't belong in any sort of answer here. – Jerry Dodge Jul 2 at 14:41

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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