Sql-server – Installing SQL Server 2014 Express fails with error “ Could not find the Database Engine startup handle.”

installationsql serversql server 2014

Let me start by saying I am not a DBA, and I actually don't have alot of database admin experience. I'm just a guy trying to run SQL Server on my local machine to build some simple .NET applications for learning and practice. I am experiencing this same problem referenced in this post (Installing SQL Server 2012 Express fails with error " Could not find the Database Engine startup handle."), but it is with SQL Server Express 2014. I've tried the following things that did not fix the problem:

  • verified SSL is turned off
  • deleted the MSSQL$SQLEXPRESS folders under the Users folder
  • changed to built-in accounts in SQL Configuration Manager
  • ran the install file as Administrator
  • selected the default NT Service\MSSQL$SQLEXPRESS account during installation (note that I was prohibited from selecting any other accounts)
  • Per the comment below the selected answer (from Frederic), I tried to follow this path (Computer properties, advanced parameters, user profile parameters, suppressing net service\mssql profiles) but it didn't exist as listed. The closest thing I could find had only user accounts (not virtual accounts)
  • tried using mixed authentication during setup

The link to MSDN in the answer points to a resource that lists some configuration data, but it doesn't tell me where to change the service account permissions. I think this is what I need to do based on what I've read so far. I looked in the SQL Configuration Management Tool, but nothing there allows me to change permission (that I saw). I see bits and pieces of a solution, but nowhere have I found anything that says "Use this tool to modify the permissions of a service account". Here is the error log:

2015-02-08 19:55:05.51 Server      Microsoft SQL Server 2014 - 12.0.2000.8 (Intel X86) 
Feb 20 2014 19:20:46 
Copyright (c) Microsoft Corporation
Express Edition on Windows NT 6.1 <X64> (Build 7601: ) (WOW64)

2015-02-08 19:55:05.51 Server      UTC adjustment: -5:00
2015-02-08 19:55:05.51 Server      (c) Microsoft Corporation.
2015-02-08 19:55:05.51 Server      All rights reserved.
2015-02-08 19:55:05.51 Server      Server process ID is 2944.
2015-02-08 19:55:05.51 Server      System Manufacturer: 'System manufacturer', System     Model: 'System Product Name'.
2015-02-08 19:55:05.51 Server      Authentication mode is MIXED.
2015-02-08 19:55:05.51 Server      Logging SQL Server messages in file 'C:\Program Files (x86)\Microsoft SQL Server\MSSQL12.SQLEXPRESS\MSSQL\Log\ERRORLOG'.
2015-02-08 19:55:05.51 Server      The service account is 'NT Service\MSSQL$SQLEXPRESS'. This is an informational message; no user action is required.
2015-02-08 19:55:05.51 Server      Registry startup parameters: 
 -d C:\Program Files (x86)\Microsoft SQL Server\MSSQL12.SQLEXPRESS\MSSQL\DATA\master.mdf
 -e C:\Program Files (x86)\Microsoft SQL Server\MSSQL12.SQLEXPRESS\MSSQL\Log\ERRORLOG
 -l C:\Program Files (x86)\Microsoft SQL Server\MSSQL12.SQLEXPRESS\MSSQL\DATA\mastlog.ldf
2015-02-08 19:55:05.51 Server      Command Line Startup Parameters:
 -s "SQLEXPRESS"
 -m "SqlSetup"
 -Q
 -q "SQL_Latin1_General_CP1_CI_AS"
 -T 4022
 -T 4010
 -T 3659
 -T 3610
 -T 8015
 -d "C:\Program Files (x86)\Microsoft SQL Server\MSSQL12.SQLEXPRESS\MSSQL\Template Data\master.mdf"
 -l "C:\Program Files (x86)\Microsoft SQL Server\MSSQL12.SQLEXPRESS\MSSQL\Template Data\mastlog.ldf"
2015-02-08 19:55:05.84 Server      SQL Server detected 1 sockets with 4 cores per socket and 4 logical processors per socket, 4 total logical processors; using 4 logical processors based on SQL Server licensing. This is an informational message; no user action is required.
2015-02-08 19:55:05.84 Server      SQL Server is starting at normal priority base (=7). This is an informational message only. No user action is required.
2015-02-08 19:55:05.84 Server      Detected 8191 MB of RAM. This is an informational message; no user action is required.
2015-02-08 19:55:05.84 Server      Using conventional memory in the memory manager.
2015-02-08 19:55:05.89 Server      Default collation: SQL_Latin1_General_CP1_CI_AS (us_english 1033)
2015-02-08 19:55:05.90 Server      Perfmon counters for resource governor pools and groups failed to initialize and are disabled.
2015-02-08 19:55:05.91 Server      Query Store settings initialized with enabled = 1, 
2015-02-08 19:55:05.91 Server      The maximum number of dedicated administrator connections for this instance is '1'
2015-02-08 19:55:05.91 Server      This instance of SQL Server last reported using a process ID of 5432 at 2/8/2015 7:55:02 PM (local) 2/9/2015 12:55:02 AM (UTC). This is an informational message only; no user action is required.
2015-02-08 19:55:05.91 Server      Node configuration: node 0: CPU mask: 0x0000000f:0 Active CPU mask: 0x0000000f:0. This message provides a description of the NUMA configuration for this computer. This is an informational message only. No user action is required.
2015-02-08 19:55:05.92 Server      Using dynamic lock allocation.  Initial allocation of 2500 Lock blocks and 5000 Lock Owner blocks per node.  This is an informational message only.  No user action is required.
2015-02-08 19:55:05.94 Server      Database Mirroring Transport is disabled in the endpoint configuration.
2015-02-08 19:55:05.94 Server      Software Usage Metrics is disabled.
2015-02-08 19:55:05.94 spid7s      Warning ******************
2015-02-08 19:55:05.94 spid7s      SQL Server started in single-user mode. This an informational message only. No user action is required.
2015-02-08 19:55:05.94 spid7s      Starting up database 'master'.
2015-02-08 19:55:05.98 spid7s      1 transactions rolled forward in database 'master' (1:0). This is an informational message only. No user action is required.
2015-02-08 19:55:05.98 spid7s      0 transactions rolled back in database 'master' (1:0). This is an informational message only. No user action is required.
2015-02-08 19:55:06.01 Server      CLR version v4.0.30319 loaded.
2015-02-08 19:55:06.09 Server      Common language runtime (CLR) functionality initialized using CLR version v4.0.30319 from C:\Windows\Microsoft.NET\Framework\v4.0.30319\.
2015-02-08 19:55:06.09 spid7s      Service Master Key could not be decrypted using one of its encryptions. See sys.key_encryptions for details.
2015-02-08 19:55:06.12 spid7s      SQL Server Audit is starting the audits. This is an informational message. No user action is required.
2015-02-08 19:55:06.12 spid7s      SQL Server Audit has started the audits. This is an informational message. No user action is required.
2015-02-08 19:55:06.15 spid7s      SQL Trace ID 1 was started by login "sa".
2015-02-08 19:55:06.15 spid7s      Server name is 'MIKE-PC\SQLEXPRESS'. This is an informational message only. No user action is required.
2015-02-08 19:55:06.15 spid7s      Starting up database 'msdb'.
2015-02-08 19:55:06.16 spid11s     Starting up database 'mssqlsystemresource'.
2015-02-08 19:55:06.16 spid14s     Error: 17190, Severity: 16, State: 1.
2015-02-08 19:55:06.16 spid14s     Initializing the FallBack certificate failed with error code: 1, state: 20, error number: 0.
2015-02-08 19:55:06.16 spid14s     Unable to initialize SSL encryption because a valid certificate could not be found, and it is not possible to create a self-signed certificate.
2015-02-08 19:55:06.16 spid14s     Error: 17182, Severity: 16, State: 1.
2015-02-08 19:55:06.16 spid14s     TDSSNIClient initialization failed with error 0x80092004, status code 0x80. Reason: Unable to initialize SSL support. Cannot find object or property. 
2015-02-08 19:55:06.16 spid14s     Error: 17182, Severity: 16, State: 1.
2015-02-08 19:55:06.16 spid14s     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. 
2015-02-08 19:55:06.16 spid14s     Error: 17826, Severity: 18, State: 3.
2015-02-08 19:55:06.16 spid14s     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.
2015-02-08 19:55:06.16 spid14s     Error: 17120, Severity: 16, State: 1.
2015-02-08 19:55:06.16 spid14s     SQL Server could not spawn FRunCommunicationsManager thread. Check the SQL Server error log and the Windows event logs for information about possible related problems.

I'm insanely frustrated that something I assume should be simple is turning out to be very difficult and time consuming. Any advice would be appreciated – thanks.

[UPDATE]

I copied the default template databases to the location specified in the error. This allowed me to start the db service. I opened SQL Server Management Studio, and I was not able to log in using Windows Authentication. Since I used mixed authentication during my setup, I was able to use the sa account that I created.

Unfortunately, this caused another error message: "Cannot display policy health state at the server level, because the user doesn't have permission. Permission to access the msdb database is required for this feature to work correctly." I'm not sure how to set permissions for the sa account created during installation. I am able to see the system databases in the navigation tree on the left, but next to the msdb is the text (Recovery Pending). When I try to create a new database, I get the following error:

attempt to add new database error message

I tried to run a repair on the entire installation, and I get this error message related to the SQL Server Service: "The SQL Server feature 'SQL_Engine_Core_Inst' is not in a supported state for repair, as it was never successfully configured. Only features from successful installations can be repaired. To continue, remove the specified SQL Server feature." Here is the full error log.

I've already tried removing and reinstalling it several times prior to this, so it seems I'm in a vicious cycle.

Best Answer

Could not find database engine startup handle error means SQL Server installation was able to install SQL Server services but when installation is trying to start SQL Server services its failing.

A simple solution I mentioned In This Technet Article is

Please go to SQL Server configuration manager and locate the SQL Server services

Right click on SQL Server express service and select properties and change startup account to Local System and select apply then OK. This will start services with Local system account privilege.

enter image description here

Certain reasons which can cause this error.

  1. The account which user selected on Server Configuration page window ( during installation) is somehow not able to bring SQL Server database engine services online. Either is lacks privilege or it is corrupted. During installation of database engine services SQL Server tries to bring online database services as a internal process but due to startup account either corrupt or not having appropriate privileges it fails to do so and ultimately installation fails.

  2. Other reason is when installation fails first time due to some reason and user uninstall failed installation from add remove program, the un-installation leaves account in broken state so any further attempt to install flashes this error message.

  3. The reason can be also that SQL Server installation was successful in installing SQL Server and its services but due to some other limitation in system or other system related errors SQL Server is not able to come online.

In Your case reason is

2015-02-08 19:55:06.16 spid14s     Error: 17190, Severity: 16, State: 1.
2015-02-08 19:55:06.16 spid14s     Initializing the FallBack certificate failed with error code: 1, state: 20, error number: 0.
2015-02-08 19:55:06.16 spid14s     Unable to initialize SSL encryption because a valid certificate could not be found, and it is not possible to create a self-signed certificate.
2015-02-08 19:55:06.16 spid14s     Error: 17182, Severity: 16, State: 1.

To solve this Either start SQL Server service account with Local System or Create a new local account having admin privileges on the local machine and try starting SQL Server service with that account. This Blogs.msdn article says such error can come if account profile is corrupt

As you are already aware running SQL Server service with account having admin privileges is not advised. In such case for time being you can run the account with local system but you can use Configure Windows Service Account and Permissions to create account with minimum privileges.

EDIT:

FCB::Open failed: Could not open file E:\sql12_main_t.obj.x86Release\sql\mkmastr\databases\mkmastr.proj\MSDBData.mdf for file number 1. OS error: 2(The system cannot find the file specified.).

2015-02-09 10:42:45.12 spid8s Error: 5120, Severity: 16, State: 101.

2015-02-09 10:42:45.12 spid8s Unable to open the physical file "E:\sql12_main_t.obj.x86Release\sql\mkmastr\databases\mkmastr.proj\MSDBData.mdf". Operating system error 2: "2(The system cannot find the file specified.)".

2015-02-09 10:42:45.12 spid8s Error: 17207, Severity: 16, State: 1.

As per below logs SQL Server is searching for msdb file at location E:\sql12_main_t.obj.x86Release\sql\mkmastr\databases\mkmastr.proj\

Can you manually move both msdb data file and log file to above location. I know this is not your desired location but let first SQL Server come online then we can use alter database command and change location to what ever suits you. To me this is bug and is happening because SQL Server is unable to ,somehow, decide the location of msd files and so choosing random location.

Revert if this does not works