Bug*_*ley 7 sql-server installation sql-server-2014
首先让我说我不是 DBA,而且我实际上没有很多数据库管理经验。我只是一个试图在我的本地机器上运行 SQL Server 来构建一些简单的 .NET 应用程序以供学习和练习的人。我遇到了这篇文章中提到的同样的问题(安装 SQL Server 2012 Express 失败,错误为“找不到数据库引擎启动句柄。”),但它是 SQL Server Express 2014。我尝试了以下方法不解决问题:
答案中指向 MSDN 的链接指向一个列出一些配置数据的资源,但它没有告诉我在哪里更改服务帐户权限。我认为这是我需要根据我目前阅读的内容做的事情。我查看了 SQL 配置管理工具,但没有任何内容允许我更改权限(我看到的)。我看到了解决方案的零碎部分,但在任何地方我都找不到任何说“使用此工具修改服务帐户的权限”的内容。这是错误日志:
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.
Run Code Online (Sandbox Code Playgroud)
我非常沮丧,我认为应该很简单的事情变得非常困难和耗时。任何建议将不胜感激 - 谢谢。
[更新]
我将默认模板数据库复制到错误中指定的位置。这允许我启动数据库服务。我打开了 SQL Server Management Studio,但无法使用 Windows 身份验证登录。由于我在设置期间使用了混合身份验证,因此我能够使用我创建的 sa 帐户。
不幸的是,这导致了另一个错误消息:“无法在服务器级别显示策略健康状态,因为用户没有权限。此功能需要访问 msdb 数据库的权限才能正常工作。” 我不确定如何为安装期间创建的 sa 帐户设置权限。我能够在左侧的导航树中看到系统数据库,但 msdb 旁边是文本(恢复待处理)。当我尝试创建新数据库时,出现以下错误:

我尝试对整个安装进行修复,但收到与 SQL Server 服务相关的错误消息:“SQL Server 功能‘SQL_Engine_Core_Inst’不处于支持修复状态,因为它从未成功配置过。只有功能可以修复成功安装。要继续,请删除指定的 SQL Server 功能。” 这是完整的错误日志。
在此之前,我已经多次尝试删除并重新安装它,所以我似乎陷入了恶性循环。
找不到数据库引擎启动句柄错误意味着 SQL Server 安装能够安装 SQL Server 服务,但当安装尝试启动 SQL Server 服务时失败。
我在这篇 Technet 文章中提到的一个简单的解决方案是
请转到 SQL Server 配置管理器并找到 SQL Server 服务
右键单击 SQL Server Express 服务并选择属性并将启动帐户更改为本地系统,然后选择应用然后确定。这将以本地系统帐户权限启动服务。

可能导致此错误的某些原因。
用户在服务器配置页面窗口(安装期间)选择的帐户不知何故无法使 SQL Server 数据库引擎服务联机。要么缺乏特权,要么已损坏。在安装数据库引擎服务期间,SQL Server 尝试将联机数据库服务作为内部进程,但由于启动帐户已损坏或没有适当的权限,它无法执行此操作,最终安装失败。
其他原因是,当由于某种原因第一次安装失败并且用户从添加删除程序卸载安装失败时,卸载会使帐户处于损坏状态,因此任何进一步的安装尝试都会闪烁此错误消息。
原因也可能是 SQL Server 安装成功安装了 SQL Server 及其服务,但由于系统中的某些其他限制或其他系统相关错误,SQL Server 无法联机。
在你的情况下,原因是
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.
Run Code Online (Sandbox Code Playgroud)
要解决此问题,请使用本地系统启动 SQL Server 服务帐户,或者在本地计算机上创建一个具有管理员权限的新本地帐户,然后尝试使用该帐户启动 SQL Server 服务。这篇 Blogs.msdn文章指出,如果帐户配置文件损坏,可能会出现此类错误
正如您所知,不建议使用具有管理员权限的帐户运行 SQL Server 服务。在这种情况下,您暂时可以在本地系统上运行该帐户,但您可以使用“配置 Windows 服务帐户和权限”来创建具有最低权限的帐户。
编辑:
FCB::打开失败:无法打开文件号 1 的文件 E:\sql12_main_t.obj.x86Release\sql\mkmastr\databases\mkmastr.proj\MSDBData.mdf。操作系统错误:2(系统找不到指定的文件。 )。
2015-02-09 10:42:45.12 spid8s 错误:5120,严重性:16,状态:101。
2015-02-09 10:42:45.12 spid8s 无法打开物理文件“E:\sql12_main_t.obj.x86Release\sql\mkmastr\databases\mkmastr.proj\MSDBData.mdf”。操作系统错误2:“2(系统找不到指定的文件。)”。
2015-02-09 10:42:45.12 spid8s 错误:17207,严重性:16,状态:1。
根据以下日志,SQL Server 正在位置 E:\sql12_main_t.obj.x86Release\sql\mkmastr\databases\mkmastr.proj\ 搜索 msdb 文件
您可以手动将 msdb 数据文件和日志文件移动到上述位置吗?我知道这不是您想要的位置,但首先让 SQL Server 联机,然后我们可以使用 alter database 命令并将位置更改为适合您的位置。对我来说,这是一个错误,并且正在发生,因为 SQL Server 无法以某种方式决定 msd 文件的位置,因此选择随机位置。
如果这不起作用,请恢复