7

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.

5 Answers 5

3

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

1
  • 3
    Uninstall and fresh install using NT Authority\SYSTEM (as it's mentioned in your technet article) is helped me. Thanks. Aug 23, 2015 at 9:11
2

It is frustrating that it is often stated that installing SQL on an DC is not recommended, people neglect to say why or how. They refer to resources needed by AD, but most of us with this problem don't have 500 users, WSUS, IIS, VLAN's, etc, etc. We have a single server for a few, read "FEW" as in 4 or 5, users. A second server is just silly in such small networks. You could argue, but that is not the point here. What we need is a solution, a single-server solution.

My solution seems to work without complicated workarounds. Create an administrative user in AD. Install SQL using "Custom", as you need to specify the user account the Database Engine uses, and make it the user account you just created. Creating user accounts for SQL services is a recommended practice, but that recommendation is not linked to this error.

That's it. The install works. You don't need to go back and fix it with powershell, single-user mode, or SQL commands. The people who know, assume you haven't checked what they regurgitate with their "check these" links. And they know just enough to confuse those of us with the problem. Keep It Simple Stupid. Honestly, this shouldn't be that hard, Microsoft makes both products. There must be a simple answer. Nowhere have I found it, so here is my answer.

1
  • Hallelujah! That worked to install SQLExpr 2017 on Server 2012 R2. Ta very much! Jul 4, 2023 at 14:54
1

I am cautiously optimistic that I've fixed the problem. There are a few things that I did that may have helped:

  • I modified some permissions at the file level within the SQL application folder.
  • I ran the scripts to move some of the template databases that were pointing to the wrong location.
  • I was able to add some login accounts within SQL Server.

The final thing that seemed to fix it, though, was rebuilding the system databases (details here). I was never able to actually create any databases, so there were no backups to restore. I just started from scratch, and it worked.

Thanks to @Shanky for all of the suggestions.

1

This occurred upon a failed installation. My resolution was using a USB Drive and creating the path where the temp install was (****main_t.obj.x86Release\sql\mkmastr\databases\mkmastr.proj). (Or if you have that drive already, use it.) You may have to use Disk Manager to change drive letters. You can copy system files, tempdb.mdf etc. from the installation folder (C:\Program Files\Microsoft SQL Server\....instance\DATA\) to your new temp folders.

After logging in to SQL Server Management Studio, I also changed the start-up permission to any account that would start it. And I noticed, very scarily, the sa password was never set, even though I set it during setup – so I could not log in to the new instance, unless I used sa, with a blank password. Once in, I could assign all the proper info.

Then I used the command below (NAME is a logical name, use the correct file names):

ALTER DATABASE tempdb
MODIFY FILE (
  NAME = 'templog' ,
  FILENAME = 'C:\Program Files\Microsoft SQL Server\MSSQL13.MYINSTANCENAME\MSSQL\DATA\templog.ldf'
)
Go

I did this on all files and SQL Server responded with a message telling me to restart for the new path to take effect.

All this happened when I had to end the task because SQL Server 2016 install did complete the last step.

1

I got this error after several install/uninstall cycles of Microsoft SQL Server. The solution was to delete the dead profiles in directories:

c:\Windows\ServiceProfiles\MSSQL$SQLEXPRESS\
SQLTELEMETRY$SQLEXPRESS

and re-install Microsoft SQL Server.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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