次の方法で共有


SQL 2008/R2 setup fails with "Wait on the database engine recovery handle failed"

When installing SQL Server 2008/2008 R2, you might come across a situation where the setup fails towards the end, when trying to start the SQL Server services.

You find this message in the summary.txt:-

Configuration error code: 0x4BDAF9BA@1306@24
Configuration error description: Wait on the Database Engine recovery handle failed. Check the SQL Server error log for potential causes.
Configuration log: C:Program FilesMicrosoft SQL Server100Setup BootstrapLog20110831_132727Detail.txt

In the detail.txt, you find these messages:-

2011-08-31 13:49:57 Slp: at Microsoft.SqlServer.Configuration.SqlConfigBase.SlpConfigAction.Execute(String actionId, TextWriter errorStream)
2011-08-31 13:49:57 Slp: Exception: Microsoft.SqlServer.Configuration.SqlEngine.SqlEngineConfigException.
2011-08-31 13:49:57 Slp: Source: Microsoft.SqlServer.Configuration.SqlServer_ConfigExtension.
2011-08-31 13:49:57 Slp: Message: Wait on the Database Engine recovery handle failed. Check the SQL Server error log for potential causes..
2011-08-31 13:49:57 Slp: Watson Bucket 1

Also, since the services are created, the errorlog is also updated. You will find these messages in the errorlog:-

2011-08-31 13:49:57.25 spid7s Starting up database 'mssqlsystemresource'.
2011-08-31 13:49:57.35 spid7s The resource database build version is 10.50.1600. This is an informational message only. No user action is required.
2011-08-31 13:49:57.49 spid7s Error: 15209, Severity: 16, State: 1.
2011-08-31 13:49:57.49 spid7s An error occurred during encryption.

The service will not come online if you try to start it from configuration manager or services console.

The root cause of this issue, in most cases, is that the profile of the user being used for the service account (in my case it was local system) is corrupted.

To resolve it, follow these steps:-

When the installation throws this error, click on OK and allow it to proceed. It will fail for Database Engine, but the SQL Server service should have been created. Check the Services console.

If the service is present, perform the following steps:-

1. Go to SQL Server Configuration manager, right click on the SQL Server service, and change the service account (if it is local system, give it a windows level account, and vice-versa). It might throw a WMI error but you will see the account getting updated anyway. If not, then use the Services console. Change the account for SQL Agent as well.

2. Next, try to start the service. It should come online.

3. However, you will not be able to log in to the SQL Server

4. Now stop the service and start it from the command prompt using -m -c -T3608 parameters.

5. Now try logging in to the server using admin connection from sqlcmd (sqlcmd admin:<server name><instance name> ...)

6. Once logged in, use the sp_addsrvrolemember '<domainusername>','sysadmin'.

Also add the builtin/administrators to the sysadmin role

7. Now stop the service from the command prompt and start it from SQL Server configuration manager

You should be able to log in to the server now.

Hope this helps someone.

Comments

  • Anonymous
    March 17, 2012
    why is -T 3608 used here ?

  • Anonymous
    March 18, 2012
    Hi. Thanks for showing interest in the blog. -T3608 is used to recover only the master. This helps reduce the amount of concurrent activity on the instance.

  • Anonymous
    April 24, 2012
    reduce the amount of concurrent activity Is the a needed action or recomended ?

  • Anonymous
    April 27, 2012
    Thanks for getting back yup...yes, it's more of a recommended step, than a compulsory one...!!!

  • Anonymous
    August 01, 2012
    Thanks.... It worked for me.

  • Anonymous
    August 02, 2012
    I had the same problem, and the profile of the user for SQL was corrupted Try support.microsoft.com My config : W2008 STD 32 SQL Svr 2008

  • Anonymous
    August 03, 2012
    Thanks for appreciating the effort Laxman...!!! :)

  • Anonymous
    August 03, 2012
    Thanks Franck. Interesting. But isn't that KB supposed to be only for Vista?

  • Anonymous
    September 05, 2012
    It Helped me :) Thanks

  • Anonymous
    September 05, 2012
    Thanks for appreciating, Ben...glad to know it worked for you as well...!!!! :)

  • Anonymous
    September 26, 2012
    The comment has been removed

  • Anonymous
    September 26, 2012
    Hi Aaron, Thanks for showing interest in the blog. As far as I know, using a local admin account for installation is a compulsory prerequisite for installing all versions of SQL Server. Nevertheless, it's good to know that we can get this error in that scenario as well. Thanks for bringing this to everyone's attention. Regards, Harsh

  • Anonymous
    February 18, 2013
    Nice article..Worked for me! :)

  • Anonymous
    February 18, 2013
    Thanks Deepesh...!!!

  • Anonymous
    March 07, 2013
    when right clicking on the SQL Server service, i don't find any thing to change the service account . help

  • Anonymous
    March 10, 2013
    Hi Bpn, Thanks for showing interest in the blog. In the SQL Server configuration manager, right click on the SQL Server service, select properties, and go to the log on tab. You should be able to change the SQL server service account from there. Regards, Harsh

  • Anonymous
    August 01, 2013
    Good One.. Worked for me too!!! Thanks a lot and Keep up the good work :)

  • Anonymous
    August 01, 2013
    Thanks a lot for appreciating Swajith. Glad to know it helped...!!! :)

  • Anonymous
    September 11, 2013
    Hi, thks a lot, it's exactly my error issue. However, I have some trouble in order to well understand all steps you provided. For the 1 - I changed to network account for the "SQL Server Integration Services 11.0". I think it is ok. For the 4- I don't know how start a service with prompt.. Some help, please :) And I am a little lost for the step 5 and 6.

  • Anonymous
    September 13, 2013
    Hi Pepe, Thanks for showing interest in the blog. For step 1, i'd recommend that you use a domain/local user account, rather than using an inbuilt one like SQL Server Integration Services 11.0 For step 4, please follow the TechNet article: technet.microsoft.com/.../ms180965(v=SQL.105).aspx For step 5, use the command I've pasted in the step on the command prompt, i.e. sqlcmd admin:<server name><instance name> -E For step 6, the following command is used to add the users and roles to the sysadmin fixed server role (makes them SQL admin): sp_addsrvrolemember '<domainusername>','sysadmin' Hope this helps. Please feel free to look up the various syntax on the internet using any search engine if you're not clear.

  • Anonymous
    October 22, 2013
    Hi HarshDeep, I got the same error and spend lot of time to fix this. Still not able to solve. I really need your help. I cannt follow your steps...I cannt find options of change account, even I saw the property n log on tab of SQL service -- there the following things are listed Log on as    Built in account   This account   Account name : NT SERVICEMSSQL SERVER   Password : *********   Confirm password: ********* Help me out please.

  • Anonymous
    October 22, 2013
    I forgot to mention that I m using SQL Server 2012 Developer Edition on 64-bit windows 7 platform

  • Anonymous
    October 22, 2013
    Hi Lara, Thanks for reaching out. Can you please try using an account other that NT ServiceMSSQLSERVER, in the account name field? What I mean to say is, set up a new domain account and password, and use that in the "This account" section of the log on tab of the SQL Service. Try restarting the SQL Service after that. Let me know how it goes. Regards, Harsh

  • Anonymous
    October 22, 2013
    Hi, Well I tried all possible way from different blogs. I tried it now also but it gives the following error "The request failed or the service did not response in a timely fashion. Consult the event log or other applicable error logs for details," :( Thanks,

  • Anonymous
    October 22, 2013
    Thanks for the update Lara. Can you please check the application and system event logs for any messages? Also, please check to see if the SQL Errorlog is getting updated? Thanks, Harsh

  • Anonymous
    October 22, 2013
    Hi, The following errors are from System event logs --

  1. The SQL Server (MSSQLSERVER) service terminated with service-specific error %%-2146885628.
  2. The master browser has received a server announcement from the computer ABRAOLYVA that believes that it is the master browser for the domain on transport NetBT_Tcpip_{BDA6AA24-04C7-42BD-A4E2-EC5791D40457}. The master browser is stopping or an election is being forced. What about the 2nd error, I dont know. For the Application event  logs -
  3. Initializing the FallBack certificate failed with error code: 1, state: 20, error number: 0. (Source: MSSQLSERVER)
  4. TDSSNIClient initialization failed with error 0x80092004, status code 0x80. Reason: Unable to initialize SSL support. Cannot find object or property. (Source: MSSQLSERVER)
  5. TDSSNIClient initialization failed with error 0x80092004, status code 0x1. Reason: Initialization failed with an infrastructure error. Check for previous errors. Cannot find object or property. (Source: MSSQLSERVER) 4.SQL Server could not spawn FRunCommunicationsManager thread. Check the SQL Server error log and the Windows event logs for information about possible related problems. (Source: MSSQLSERVER) 5.Could not start the network library because of an internal error in the network library. To determine the cause, review the errors immediately preceding this one in the error log. (Source: MSSQLSERVER)
  6. Windows has backed up this user profile. Windows will automatically try to use the backup profile the next time this user logs on. (Source: User Profile Service User: NT SERVERMSSQLSERVER) 7.Windows cannot find the local profile and is logging you on with a temporary profile. Changes you make to this profile will be lost when you log off. (Source: Use Profile Service User: NT SERVERMSSQLSERVER) Thanks
  • Anonymous
    October 22, 2013
    The comment has been removed

  • Anonymous
    October 23, 2013
    Thanks Lara. This definitely seems to be the same issue, i.e. the profile for the service account seems to be corrupted. Can you try changing the startup account on the Log on tab of the SQL server service properties to  "Local system" or "System" and then restart the service? Try changing this from the SQL Server Configuration manager first. If you get an error, try from the services console (services.msc). Hope this helps.

  • Anonymous
    October 26, 2013
    Hi, Thanks, But still I ve problems ..still it is not connected, gives the error. I stuck in step 6 sp_addsrvrolemember '<domainusername>','sysadmin' --what is domain and username Helpme out pls Thanks

  • Anonymous
    October 26, 2013
    for the 5th step sqlcmd admin:<server name><instance name> - E  as sqlcmd admin: CRoy-TOSHMSSQLSERVER -E but it gives the result as Sqladmin:'admin': Unknown Option. Enter '-?' for help

  • Anonymous
    October 28, 2013
    Hi Lara...thanks for getting back...!!! The domain is the domain name that the new user account is created in...and the username is the username of the new user account that you created in the previous step...!!!

  • Anonymous
    October 28, 2013
    for step 5, please eliminate the space after admin:, and it should work...!!!

  • Anonymous
    November 04, 2013
    Thanks..though I didnt try it again.....installed SQL Serve 2008. Btw thanks...May b very soon I ll try it

  • Anonymous
    December 18, 2013
    I am also facing the same issue. error log message is Error: 5123, Severity: 16, State: 1. 2013-12-17 17:05:04.74 spid8s      CREATE FILE encountered operating system error 5(Access is denied.) while attempting to open or create the physical file 'M: should it will work for me & if it works then can this server be OK to go for live environment OR do i need to reinstall again? please help me.

  • Anonymous
    December 18, 2013
    Hi Mayur, Thanks for showing interest in the blog. I'd like to point out that you're running into a different issue here. The error mentioned in the blog post is "An error occurred during encryption". You seem to be running into a permissions issue, which is causing the Access Denied error. Please check the permissions for the account you're running the installation with, as well as the file paths you're filling in during the install. If you're still running into the same problem, please post on the msdn forums, and/or open a support ticket with Microsoft support, and they should be able to help you out. Hope this helps. Regards, Harsh

  • Anonymous
    February 06, 2014
    can you please let me know the exast syntax for using the below two steps

  1. Now stop the service and start it from the command prompt using -m -c -T3608 parameters.
  2. Now try logging in to the server using admin connection from sqlcmd (sqlcmd admin:<server name><instance name> ...)
  • Anonymous
    February 12, 2014
    Hi Harsh, I'm trying to complete the step 5 but gives the same result of Lara: Sqlcmd: 'admin': Unknown option. I tried to use the command-A (dedicated admin conection) instead "admin:" but no way Using Sql Server CTP2 2014

  • Anonymous
    February 12, 2014
    Hi Ravi, You need to navigate to the folder which has sqlservr.exe (you can get this from the properties of SQL Server service, from services.msc), and run the sqlservr.exe from there with these options. The exact syntax will depend on your instance name. Might look something like this: sqlservr.exe -s<instance name> -c -m -T3608 Hope this helps.

  • Anonymous
    February 12, 2014
    Hi Vincius, Thanks for showing interest in the blog. Can you please confirm if you've ensured there's no space after admin: ? Regards, Harsh

  • Anonymous
    February 12, 2014
    Hello  Harsh I have come across above issue while installing SQL 2008 on 2008 R2 machine. It was all well till your 3rd point , later for  step , i went into the command prompt of windows server & executed below  "-m -c -T3608"  here goes the error msg. I could not proceed further from step 4... Need your inputs please. C:Userssqladmin>-m -c -T3608 '-m' is not recognized as an internal or external command, operable program or batch file. C:Userssqladmin>sqlcmd HResult 0x2, Level 16, State 1 Named Pipes Provider: Could not open a connection to SQL Server [2]. Sqlcmd: Error: Microsoft SQL Server Native Client 10.0 : A network-related or in stance-specific error has occurred while establishing a connection to SQL Server . Server is not found or not accessible. Check if instance name is correct and i f SQL Server is configured to allow remote connections. For more information see SQL Server Books Online.. Sqlcmd: Error: Microsoft SQL Server Native Client 10.0 : Login timeout expired.

  • Anonymous
    February 12, 2014
    Hi and thanks for replying Harsh. The exact command i'm using is: sqlcmd admin:Mattos-PCMSSQLSERVER -E waiting for your reply, Vinicius =)

  • Anonymous
    February 12, 2014
    I referred to your response to Ravi , whihc was similar to me. However iam getting the while iam executing the same syntax in my server. I have the default instance "MSSQLServer ie: sqlservr.exe -s MSSQLSERVER -c -m -T3608

  • Anonymous
    February 13, 2014
    Hi Vinicius, Please try this: sqlcmd -Sadmin:Mattos-PCMSSQLSERVER -E Hope it works.

  • Anonymous
    February 13, 2014
    Hi Manju, Thanks for showing interest in the blog. Please eliminate the space after -s, and include the servername i.e. sqlservr.exe -s<servername>MSSQLSERVER -c -m -T3608 Hope this helps.

  • Anonymous
    February 13, 2014
    Triyng sqlcmd -Sadmin:Mattos-PCMSSQLSERVER -E occurred the following errors ocurrred: Sqlcmd: Error: Microsoft SQL Server Native Client 11.0 : SQL Server Network Interfaces: Connection string is not valid [87]. . Sqlcmd: Error: Microsoft SQL Server Native Client 11.0 : Login timeout expired. Sqlcmd: Error: Microsoft SQL Server Native Client 11.0 : A network-related or instance-specific error has occurred while establishing a connection to SQL Server. Server is not found or not accessible. Check if instance name is correct and if SQL Server is configured to allow remote connections. For more information see SQL Server Books Online.. I dont know why this is ocurring, can u help me? Thanks,

  • Anonymous
    February 13, 2014
    Hello Harsh I tried without space even but i get the error message as below : Need your help. 2014-02-14 18:22:48.02 Server      initerrlog: Could not open error log file ''. Operating system e rror = 3(The system cannot find the path specified.).

  • Anonymous
    February 13, 2014
    Below is the cmd executed C:Program FilesMicrosoft SQL ServerMSSQL10.MSSQLSERVERMSSQLBinn>sqlservr.exe -sMSSQL SERVER -c -m -T3608 2014-02-13 21:24:47.90 Server      Error: 17058, Severity: 16, State: 1. 2014-02-13 21:24:47.90 Server      initerrlog: Could not open error log file ''. Operating system error = 3(The system cannot find the path specified.).

  • Anonymous
    February 14, 2014
    Hi Vinicius, My bad, the syntax for using DAC from sqlcmd is different than from SSMS. Please try the following command: sqlcmd -A -SMattos-PCMSSQLSERVER -E

  • Anonymous
    February 14, 2014
    Hi Manju, Thanks for the update. Please troubleshoot the reason why the OS cannot find your errorlog file path. It might be something as simple as a typo in the path, or might be the wrong path being specified altogether. Thanks, Harsh

  • Anonymous
    February 14, 2014
    Thanks for help Harsh but the error still happens, but now the message error has changed, look: C:Program FilesMicrosoft SQL Server110ToolsBinn>sqlcmd -A -SMattos-PC/MSSQLSERVER -E Sqlcmd: Error: Microsoft SQL Server Native Client 11.0 : SQL Server Network Interfaces: An error occurred while obtaining the dedicated administrator connection (DAC) port. Make sure that SQL Browser is running, or check the error log for the port number [xFFFFFFFF]. . Sqlcmd: Error: Microsoft SQL Server Native Client 11.0 : Login timeout expired. Sqlcmd: Error: Microsoft SQL Server Native Client 11.0 : A network-related or instance-specific error has occurred while establishing a connection to SQL Server. Server is not found or not accessible. Check if instance name is correct and if SQL Server is configured to allow remote connections. For more information see SQL Server Books Online.. Note, in the first error message says to check if SQL Browser is running. I checked and the SQL Browser is stopped, but has no way to start it, because the start button is locked. do you know if has a way to try start it? Thanks for help!

  • Anonymous
    March 03, 2014
    Happens on my end the issue was that there as already sql Express which was listening to port 1433..... changed  it to listen to another port and it worked!

  • Anonymous
    May 22, 2014
    I faced with problem like Manju. I use SQL Server2012 on Windows 8.1 (x64). At the step 4 I get: RegOpenKeyEx of "SoftwareMicrosoftMicrosoft SQL ServerMSSQL11.MSSQLSERVERMSS QLServerHADR" failed. 2014-05-23 12:16:07.52 Server      Error: 17058, Severity: 16, State: 1. 2014-05-23 12:16:07.52 Server      initerrlog: Could not open error log file ''.  Operating system error = 3(Системе не удается найти указанный путь.). And last two string is repeated 8 times.

  • Anonymous
    May 22, 2014
    I have uninstalled SQL Server 2012 then do what specified here: kalcik.net/.../problems-with-the-installation-of-sql-server-2014-after-the-windows-8-1-update  "navigate to the c:Users, right click on the folder Default (which is hidden per default), Properties, Security Tab, Advance, Change Permissions and checked “Replace all child object permissions entries with the inheritable permissions entries from this object”" and have installed SQL Server 2014 successfully .

  • Anonymous
    May 27, 2014
    Hi Vinicius, You can start the SQL Browser service by changing the service status from disabled to automatic on the services console (services.msc). Hope this resolves your problem. Regards, Harsh

  • Anonymous
    May 27, 2014
    Hi SrgGld, Thanks for the update, it does indeed seem that the troubleshooting steps are different with SQL 2014, but I will not be able to confirm until I've tested this. Thanks for letting me know though. Regards, Harsh

  • Anonymous
    June 16, 2014
    At step 2, when I try to start the service, I get this: "Windows could not start the SQL Server (SQLEXPRESS) on Local Computer.  For more information, review the System Event Log. If this is a non-Microsoft service, contact the service vendor, and refer to service-specific error code 1814."

  • Anonymous
    June 24, 2014
    i have installed sql 2008 r2 a year before but i have not used it for long . when i came to use it this time it gave me a problem in trying to connect the database engine. i thought the installation has a problem and decided to uninstall it. however after uninstalling the previous software and trying to install it again i have got the an error towards the end of the installation . 'SQL 2008/R2 setup fails with "Wait on the database engine recovery handle failed" i desperately needs to have the software working by now any help please.

  • Anonymous
    July 09, 2014
    I did only this on Windows 8.1 - "navigate to the c:Users, right click on the folder Default (which is hidden per default), Properties, Security Tab, Advance, Change Permissions and checked “Replace all child object permissions entries with the inheritable permissions entries from this object”"  - and and have installed SQL Server 2014 successfully too!

  • Anonymous
    July 23, 2014
    I'm trying to install SQL 2012 Express and I'm getting the same error message. I have tried in step 1 to change the service account and it worked for one but for the SQL Agent I keep getting parameter errors or  an error that it is not running and cannot be changed. Now for starting it it won't start, it gives me errors too. Now on step 4 at the command prompt what is the path to start the program? Please help.

  • Anonymous
    July 23, 2014
    I don't suppose these steps are documented anywhere? The OP is rather vague, and then the posts are all over the place.

  • Anonymous
    August 18, 2014
    Hi JT, it seems that your installation did not complete successfully and the binaries were not completely installed on the system. Please reinstall.

  • Anonymous
    August 18, 2014
    Hi Addis, if the steps on this blog don't work, please call into Microsoft support and open a support ticket, they should be able to help you out. Thanks.

  • Anonymous
    August 18, 2014
    hi Channel21, thanks for sharing that info...the error can come due to some other factors too, but this blog only covers the "if nothing else works" scenario.

  • Anonymous
    August 18, 2014
    The comment has been removed

  • Anonymous
    August 18, 2014
    Hi Scott H, thanks for showing interest in the blog. This blog is the only place where these steps are documented, the reason being that these are from my experience with Microsoft support, troubleshooting SQL issues for customers around the world. I can assure you that these steps have helped successfully complete several failed installations of SQL Server.  I apologize if the OP seems a bit vague to you, but I can assure you it works for a majority of the cases. Hope this helps.

  • Anonymous
    January 14, 2015
    I'm getting this issue when setting up a SQL 2014 cluster (first node) on a Windows 2012 R2 failover cluster. It doesnt matter which domain service account I specify, even DOMAINAdministrator, this issue still occurs. When completing the setup, going into SQL configuration manager and configuring the service account to change to NT AUTHORITYSYSTEM the service still fails to start - ref to article - social.technet.microsoft.com/.../24364.sql-server-troubleshooting-could-not-find-database-engine-startup-handle-error-during-installation.aspx If I completely uninstall SQL 2014, including all folders, path and registry keys and try a new install using a NT AUTHORITYSYSTEM as the account, I get the following error: http://i.imgur.com/wUBG32O.png. Please advise.

  • Anonymous
    January 14, 2015
    I have resolved it, it was cluster disk related. For anyone using FreeNAS and gets this issue, try using Windows 2012 R2 with the iSCSI target feature installed found under Roles & Features, or powershell Install-WindowsFeature FS-iSCSITarget-Server. Working fine now in my lab environment thanks.

  • Anonymous
    February 21, 2015
    Thankyou, that helped. Sad that this is an issue after more than five years: I just installed a new Server 2012 R2 & Sql 2012 and got this.

  • Anonymous
    April 20, 2015
    Hi Chris, Thanks for your kind words. Glad to know the solution worked for you. Unfortunately, there are a lot of circumstances that can lead to the user profile becoming corrupt, and there is no way to predict it, as it depends on user actions as well as other software installed on the server. However, the steps to regenerate the profile are fairly straightforward, as I am sure you will agree. Thanks for showing interest in the blog. Regards, Harsh

  • Anonymous
    May 01, 2015
    When installing SQL Server 2012 Express on a Windows Server 2012 R2 Essentials system I get the above error message "Wait on the database recovery handle failed. Check the SQL Server error log for potential causes." ..... am I experiencing the same issues as the folks above?

  • Anonymous
    May 03, 2015
    Suisu, I had the same problem with SQL Server 2012 Developer Edn. I solved it by creating a Managed Service Account in AD and used that as the account to run the various SQL services in place of the default accounts proposed by the installer (a couple are read only and cannot be overwritten, but that didn't prove to be a problem). Googling SQL Server service MSA should bring up sufficient information to explain, if you are not familiar with this.

  • Anonymous
    May 19, 2015
    Thanks a lot for the help... It works for SQL Server services but not for Agent

  • Anonymous
    June 09, 2015
    When installing SQL Server 2012 Express on a Windows Server 2012 R2 I get the error message "Wait on the database Engine recovery handle failed. Check the SQL Server error log for potential causes." ..... Anyone can help to solve the mention problem? my email is (ahmadullah2006@yahoo.com)

  • Anonymous
    September 28, 2015
    Hi Harsh, What i can do if its a SQL2012 Cluster installation fails with the same error ? In this case we can not change to NT account??