SQL Server 2014 SP2 does not start on Windows Docker

自作多情 提交于 2021-02-08 08:22:29

问题


I want to install and use SQL Server 2014 SP2 on Windows Docker. But the SQL Server service does not start.

Steps to reproduce:

  1. Download "Microsoft SQL Server 2014 Service Pack 2 (SP2) Express" English version from https://www.microsoft.com/en-US/download/details.aspx?id=53167.
  2. Execute the "SQLEXPR_x64_ENU.exe", extract to "SQLEXPR_x64_ENU" folder, and cancel the installer.
  3. Write Dockerfile as below.
  4. Execute "docker build -t sample .".
  5. Execute "docker run --name sample -i --rm sample".

Dockerfile:

FROM microsoft/windowsservercore
MAINTAINER someone@example.com
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" ]

The host environment is Windows 10 Creators Update.

The log file (C:\Program Files\Microsoft SQL Server\MSSQL12.MSSQLSERVER\MSSQL\Log\ERRORLOG) show some error messages:

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.

If I pass "NT AUTHORITY\System" to the "/SQLSVCACCOUNT" option, the SQL server service starts correctly. But I want to use "NT Service\MSSQLSERVER" for security reason. How can I use SQL Server 2014 SP2 with "NT Service\MSSQLSERVER"?

Update: 2017/10/02 14:43 JST If I pass "NT Service\MSSQLSERVER" -> If I pass "NT AUTHORITY\System"

来源:https://stackoverflow.com/questions/46518524/sql-server-2014-sp2-does-not-start-on-windows-docker

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!