问题
I want to install and use SQL Server 2014 SP2 on Windows Docker. But the SQL Server service does not start.
Steps to reproduce:
- Download "Microsoft SQL Server 2014 Service Pack 2 (SP2) Express" English version from https://www.microsoft.com/en-US/download/details.aspx?id=53167.
- Execute the "SQLEXPR_x64_ENU.exe", extract to "SQLEXPR_x64_ENU" folder, and cancel the installer.
- Write Dockerfile as below.
- Execute "docker build -t sample .".
- 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