SQL Server 2014 SP2 无法在 Windows Docker 上启动

SQL Server 2014 SP2 无法在 Windows Docker 上启动

我想在 Windows Docker 上安装并使用 SQL Server 2014 SP2。但是 SQL Server 服务无法启动。

重现步骤:

  1. 下载“Microsoft SQL Server 2014 Service Pack 2 (SP2) Express”英文版https://www.microsoft.com/en-US/download/details.aspx?id=53167
  2. 执行“SQLEXPR_x64_ENU.exe”,解压到“SQLEXPR_x64_ENU”文件夹,并取消安装程序。
  3. 按照如下方式编写Dockerfile。
  4. 执行“docker build -t sample ”。
  5. 执行“docker run --name sample -i --rm sample”。

Dockerfile:

FROM microsoft/windowsservercore
MAINTAINER [email protected]
COPY SQLEXPR_x64_ENU C:/SQLEXPR_x64_ENU/
WORKDIR C:/SQLEXPR_x64_ENU/
RUN SETUP.EXE /q /ACTION=Install /INSTANCENAME=MSSQLSERVER /FEATURES=SQLEngine /UPDATEENABLED=0 /SQLSVCACCOUNT="NT Service\MSSQLSERVER" /SQLSYSADMINACCOUNTS="foobar" /TCPENABLED=1 /NPENABLED=0 /IACCEPTSQLSERVERLICENSETERMS
CMD [ "powershell" ]

宿主环境是Windows 10 Creators Update。

日志文件(C:\Program Files\Microsoft SQL Server\MSSQL12.MSSQLSERVER\MSSQL\Log\ERRORLOG)显示一些错误消息:

2017-09-29 18:47:24.31 spid15s     Error: 17182, Severity: 16, State: 1.
2017-09-29 18:47:24.31 spid15s     TDSSNIClient initialization failed with error 0x5, status code 0x51. Reason: Unable to configure MDAC-compatibility Named Pipes protocol pipe name in registry. Access is denied.
2017-09-29 18:47:24.31 spid15s     Error: 17182, Severity: 16, State: 1.
2017-09-29 18:47:24.31 spid15s     TDSSNIClient initialization failed with error 0x5, status code 0x1. Reason: Initialization failed with an infrastructure error. Check for previous errors. Access is denied.
2017-09-29 18:47:24.31 spid15s     Error: 17826, Severity: 18, State: 3.
2017-09-29 18:47:24.31 spid15s     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.
2017-09-29 18:47:24.31 spid15s     Error: 17120, Severity: 16, State: 1.
2017-09-29 18:47:24.31 spid15s     SQL Server could not spawn FRunCommunicationsManager thread. Check the SQL Server error log and the Windows event logs for information about possible related problems.

如果我将“NT AUTHORITY\System”传递给“/SQLSVCACCOUNT”选项,SQL 服务器服务将正确启动。但出于安全原因,我想使用“NT Service\MSSQLSERVER”。如何将 SQL Server 2014 SP2 与“NT Service\MSSQLSERVER”一起使用?

更新时间:2017/10/02 14:44 JST如果我传递“NT Service\MSSQLSERVER”-> 如果我传递“NT AUTHORITY\System”

相关内容