cant connect to sqlserver docker image - sql-server

running the container
docker run -e "ACCEPT_EULA=Y" -e "SA_PASSWORD=Password_01!" -p 1433:1433 --name sql1 -d microsoft/mssql-server-linux:2017-latest
the container status is UP
trying to connect
docker exec -it sql1 /opt/mssql-tools/bin/sqlcmd -S localhost -U sa -P Password_01!
or using the docker machine ip insted of localhost
docker exec -it sql1 /opt/mssql-tools/bin/sqlcmd -S 192.168.99.100 -U SA -P 'Password_01!'
i got this error:
Sqlcmd: Error: Microsoft ODBC Driver 17 for SQL Server : Login timeout expired.
Sqlcmd: Error: Microsoft ODBC Driver 17 for SQL Server : TCP Provider: Timeout error [258]. .
Sqlcmd: Error: Microsoft ODBC Driver 17 for SQL Server : Unable to complete login process due to delay in prelogin response.
this is the container log
$ docker logs sql1
2018-08-17 12:41:55.65 Server Setup step is copying system data file 'C:\templatedata\master.mdf' to '/var/opt/mssql/data/master.mdf'.
2018-08-17 12:41:55.77 Server Did not find an existing master data file /var/opt/mssql/data/master.mdf, copying the missing default master and other system database files. If you have moved the database location, but not moved the database files, startup may fail. To repair: shutdown SQL Server, move the master database to configured location, and restart.
2018-08-17 12:41:55.78 Server Setup step is copying system data file 'C:\templatedata\mastlog.ldf' to '/var/opt/mssql/data/mastlog.ldf'.
2018-08-17 12:41:55.81 Server Setup step is copying system data file 'C:\templatedata\model.mdf' to '/var/opt/mssql/data/model.mdf'.
2018-08-17 12:41:55.91 Server Setup step is copying system data file 'C:\templatedata\modellog.ldf' to '/var/opt/mssql/data/modellog.ldf'.
2018-08-17 12:41:56.01 Server Setup step is copying system data file 'C:\templatedata\msdbdata.mdf' to '/var/opt/mssql/data/msdbdata.mdf'.
2018-08-17 12:41:56.17 Server Setup step is copying system data file 'C:\templatedata\msdblog.ldf' to '/var/opt/mssql/data/msdblog.ldf'.
2018-08-17 12:41:56.26 Server Microsoft SQL Server 2017 (RTM-CU9-GDR) (KB4293805) - 14.0.3035.2 (X64)
Jul 6 2018 18:24:36
Copyright (C) 2017 Microsoft Corporation
Developer Edition (64-bit) on Linux (Ubuntu 16.04.5 LTS)
2018-08-17 12:41:56.27 Server UTC adjustment: 0:00
2018-08-17 12:41:56.27 Server (c) Microsoft Corporation.
2018-08-17 12:41:56.27 Server All rights reserved.
2018-08-17 12:41:56.27 Server Server process ID is 4120.
2018-08-17 12:41:56.27 Server Logging SQL Server messages in file '/var/opt/mssql/log/errorlog'.
2018-08-17 12:41:56.27 Server Registry startup parameters:
-d /var/opt/mssql/data/master.mdf
-l /var/opt/mssql/data/mastlog.ldf
-e /var/opt/mssql/log/errorlog
2018-08-17 12:41:56.28 Server SQL Server detected 1 sockets with 1 cores per socket and 1 logical processors per socket, 1 total logical processors; using 1 logical processors based on SQL Server licensing. This is an informational message; no user action is required.
2018-08-17 12:41:56.29 Server SQL Server is starting at normal priority base (=7). This is an informational message only. No user action is required.
2018-08-17 12:41:56.29 Server Detected 3160 MB of RAM. This is an informational message; no user action is required.
2018-08-17 12:41:56.30 Server Using conventional memory in the memory manager.
2018-08-17 12:41:56.70 Server Buffer pool extension is already disabled. No action is necessary.
2018-08-17 12:41:57.35 Server InitializeExternalUserGroupSid failed. Implied authentication will be disabled.
2018-08-17 12:41:57.35 Server Implied authentication manager initialization failed. Implied authentication will be disabled.
2018-08-17 12:41:57.35 Server Successfully initialized the TLS configuration. Allowed TLS protocol versions are ['1.0 1.1 1.2']. Allowed TLS ciphers are ['ECDHE-ECDSA-AES128-GCM-SHA256:ECDHE-ECDSA-AES256-GCM-SHA384:ECDHE-RSA-AES128-GCM-SHA256:ECDHE-RSA-AES256-GCM-SHA384:ECDHE-ECDSA-AES128-SHA256:ECDHE-ECDSA-AES256-SHA384:ECDHE-ECDSA-AES256-SHA:ECDHE-ECDSA-AES128-SHA:AES256-GCM-SHA384:AES128-GCM-SHA256:AES256-SHA256:AES128-SHA256:AES256-SHA:AES128-SHA:!DHE-RSA-AES256-GCM-SHA384:!DHE-RSA-AES128-GCM-SHA256:!DHE-RSA-AES256-SHA:!DHE-RSA-AES128-SHA'].
2018-08-17 12:41:57.59 Server The maximum number of dedicated administrator connections for this instance is '1'
2018-08-17 12:41:57.59 Server Node configuration: node 0: CPU mask: 0x0000000000000001:0 Active CPU mask: 0x0000000000000001:0. This message provides a description of the NUMA configuration for this computer. This is an informational message only. No user action is required.
2018-08-17 12:41:57.72 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.
2018-08-17 12:41:57.80 Server In-Memory OLTP initialized on lowend machine.
2018-08-17 12:41:58.09 Server Database Instant File Initialization: enabled. For security and performance considerations see the topic 'Database Instant File Initialization' in SQL Server Books Online. This is an informational message only. No user action is required.
ForceFlush is enabled for this instance.
2018-08-17 12:41:58.13 Server Query Store settings initialized with enabled = 1,
2018-08-17 12:41:58.33 spid6s Starting up database 'master'.
2018-08-17 12:41:58.39 Server Software Usage Metrics is disabled.
ForceFlush feature is enabled for log durability.
2018-08-17 12:41:58.95 spid6s The tail of the log for database master is being rewritten to match the new sector size of 4096 bytes. 3072 bytes at offset 418816 in file /var/opt/mssql/data/mastlog.ldf will be written.
2018-08-17 12:42:00.16 spid6s Converting database 'master' from version 862 to the current version 869.
2018-08-17 12:42:00.16 spid6s Database 'master' running the upgrade step from version 862 to version 863.
2018-08-17 12:42:00.62 spid6s Database 'master' running the upgrade step from version 863 to version 864.
2018-08-17 12:42:01.38 spid6s Database 'master' running the upgrade step from version 864 to version 865.
2018-08-17 12:42:01.76 spid6s Database 'master' running the upgrade step from version 865 to version 866.
2018-08-17 12:42:02.12 spid6s Database 'master' running the upgrade step from version 866 to version 867.
2018-08-17 12:42:02.56 spid6s Database 'master' running the upgrade step from version 867 to version 868.
2018-08-17 12:42:02.97 spid6s Database 'master' running the upgrade step from version 868 to version 869.
2018-08-17 12:42:05.05 spid6s Resource governor reconfiguration succeeded.
2018-08-17 12:42:05.06 spid6s SQL Server Audit is starting the audits. This is an informational message. No user action is required.
2018-08-17 12:42:05.07 spid6s SQL Server Audit has started the audits. This is an informational message. No user action is required.
2018-08-17 12:42:05.36 spid6s SQL Trace ID 1 was started by login "sa".
2018-08-17 12:42:05.77 spid20s Password policy update was successful.
2018-08-17 12:42:06.15 spid6s Server name is '980bd8d92bc7'. This is an informational message only. No user action is required.
2018-08-17 12:42:06.35 spid23s Always On: The availability replica manager is starting. This is an informational message only. No user action is required.
2018-08-17 12:42:06.36 spid6s Starting up database 'msdb'.
2018-08-17 12:42:06.36 spid23s Always On: The availability replica manager is waiting for the instance of SQL Server to allow client connections. This is an informational message only. No user action is required.
2018-08-17 12:42:06.37 spid9s Starting up database 'mssqlsystemresource'.
2018-08-17 12:42:06.37 spid9s The resource database build version is 14.00.3035. This is an informational message only. No user action is required.
2018-08-17 12:42:06.51 spid9s Starting up database 'model'.
2018-08-17 12:42:06.89 spid6s The tail of the log for database msdb is being rewritten to match the new sector size of 4096 bytes. 512 bytes at offset 306688 in file /var/opt/mssql/data/MSDBLog.ldf will be written.
2018-08-17 12:42:06.95 spid20s A self-generated certificate was successfully loaded for encryption.
2018-08-17 12:42:07.08 spid20s Server is listening on [ 'any' <ipv4> 1433].
2018-08-17 12:42:07.09 Server Server is listening on [ 127.0.0.1 <ipv4> 1434].
2018-08-17 12:42:07.09 Server Dedicated admin connection support was established for listening locally on port 1434.
2018-08-17 12:42:07.16 spid20s SQL Server is now ready for client connections. This is an informational message; no user action is required.
this i the refernece that i followed: https://learn.microsoft.com/en-us/sql/linux/quickstart-install-connect-docker?view=sql-server-2017

I've found more success with giving the container a hostname (-h option), then connecting to that hostname, if that's an option for you.

Related

Connect MSSQL db with docker

I am trying to connect MSSQL Db with docker.
I tried with docker MSSQL documentation,
https://hub.docker.com/_/microsoft-mssql-server
It starts the container and stops immediately, and I used the following commands,
docker run -e 'ACCEPT_EULA=Y' -e 'SA_PASSWORD=My_password' -p 1433:1433 --name db -d mcr.microsoft.com/mssql/server
docker exec -it containername /opt/mssql-tools/bin/sqlcmd -S my_server_ip -U My_user -P My_password
Container logs
SQL Server 2019 will run as non-root by default.
This container is running as user mssql.
To learn more visit https://go.microsoft.com/fwlink/?linkid=2099216.
2020-10-02 05:21:03.67 Server Setup step is copying system data file 'C:\templatedata\master.mdf' to '/var/opt/mssql/data/master.mdf'.
2020-10-02 05:21:03.92 Server Did not find an existing master data file /var/opt/mssql/data/master.mdf, copying the missing default master and other system database files. If you have moved the database location, but not moved the database files, startup may fail. To repair: shutdown SQL Server, move the master database to configured location, and restart.
2020-10-02 05:21:03.95 Server Setup step is copying system data file 'C:\templatedata\mastlog.ldf' to '/var/opt/mssql/data/mastlog.ldf'.
2020-10-02 05:21:04.00 Server Setup step is copying system data file 'C:\templatedata\model.mdf' to '/var/opt/mssql/data/model.mdf'.
2020-10-02 05:21:04.06 Server Setup step is copying system data file 'C:\templatedata\modellog.ldf' to '/var/opt/mssql/data/modellog.ldf'.
2020-10-02 05:21:04.12 Server Setup step is copying system data file 'C:\templatedata\msdbdata.mdf' to '/var/opt/mssql/data/msdbdata.mdf'.
2020-10-02 05:21:04.19 Server Setup step is copying system data file 'C:\templatedata\msdblog.ldf' to '/var/opt/mssql/data/msdblog.ldf'.
2020-10-02 05:21:04.27 Server Setup step is FORCE copying system data file 'C:\templatedata\model_replicatedmaster.mdf' to '/var/opt/mssql/data/model_replicatedmaster.mdf'.
2020-10-02 05:21:04.35 Server Setup step is FORCE copying system data file 'C:\templatedata\model_replicatedmaster.ldf' to '/var/opt/mssql/data/model_replicatedmaster.ldf'.
2020-10-02 05:21:04.42 Server Setup step is FORCE copying system data file 'C:\templatedata\model_msdbdata.mdf' to '/var/opt/mssql/data/model_msdbdata.mdf'.
2020-10-02 05:21:04.53 Server Setup step is FORCE copying system data file 'C:\templatedata\model_msdblog.ldf' to '/var/opt/mssql/data/model_msdblog.ldf'.
2020-10-02 05:21:05.01 Server Microsoft SQL Server 2019 (RTM-CU7) (KB4570012) - 15.0.4063.15 (X64)
Aug 15 2020 10:48:11
Copyright (C) 2019 Microsoft Corporation
Developer Edition (64-bit) on Linux (Ubuntu 18.04.5 LTS) <X64>
2020-10-02 05:21:05.03 Server UTC adjustment: 0:00
2020-10-02 05:21:05.04 Server (c) Microsoft Corporation.
2020-10-02 05:21:05.04 Server All rights reserved.
2020-10-02 05:21:05.05 Server Server process ID is 40.
2020-10-02 05:21:05.05 Server Logging SQL Server messages in file '/var/opt/mssql/log/errorlog'.
2020-10-02 05:21:05.06 Server Registry startup parameters:
-d /var/opt/mssql/data/master.mdf
-l /var/opt/mssql/data/mastlog.ldf
-e /var/opt/mssql/log/errorlog
2020-10-02 05:21:05.10 Server SQL Server detected 1 sockets with 4 cores per socket and 8 logical processors per socket, 8 total logical processors; using 8 logical processors based on SQL Server licensing. This is an informational message; no user action is required.
2020-10-02 05:21:05.13 Server SQL Server is starting at normal priority base (=7). This is an informational message only. No user action is required.
2020-10-02 05:21:05.14 Server Detected 5032 MB of RAM. This is an informational message; no user action is required.
2020-10-02 05:21:05.90 Server Using conventional memory in the memory manager.
2020-10-02 05:21:05.92 Server Page exclusion bitmap is enabled.
2020-10-02 05:21:05.97 Server Buffer pool extension is not supported on Linux platform.
2020-10-02 05:21:05.97 Server Buffer Pool: Allocating 1048576 bytes for 723370 hashPages.
2020-10-02 05:21:06.91 Server Buffer pool extension is already disabled. No action is necessary.
2020-10-02 05:21:09.77 Server Successfully initialized the TLS configuration. Allowed TLS protocol versions are ['1.0 1.1 1.2']. Allowed TLS ciphers are ['ECDHE-ECDSA-AES128-GCM-SHA256:ECDHE-ECDSA-AES256-GCM-SHA384:ECDHE-RSA-AES128-GCM-SHA256:ECDHE-RSA-AES256-GCM-SHA384:ECDHE-ECDSA-AES128-SHA256:ECDHE-ECDSA-AES256-SHA384:ECDHE-ECDSA-AES256-SHA:ECDHE-ECDSA-AES128-SHA:AES256-GCM-SHA384:AES128-GCM-SHA256:AES256-SHA256:AES128-SHA256:AES256-SHA:AES128-SHA:!DHE-RSA-AES256-GCM-SHA384:!DHE-RSA-AES128-GCM-SHA256:!DHE-RSA-AES256-SHA:!DHE-RSA-AES128-SHA'].
2020-10-02 05:21:09.88 Server Query Store settings initialized with enabled = 1,
2020-10-02 05:21:09.92 Server The maximum number of dedicated administrator connections for this instance is '1'
2020-10-02 05:21:09.93 Server Node configuration: node 0: CPU mask: 0x00000000000000ff:0 Active CPU mask: 0x00000000000000ff:0. This message provides a description of the NUMA configuration for this computer. This is an informational message only. No user action is required.
2020-10-02 05:21:09.97 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.
2020-10-02 05:21:10.02 Server In-Memory OLTP initialized on lowend machine.
2020-10-02 05:21:10.10 Server CLR version v4.0.30319 loaded.
2020-10-02 05:21:10.11 Server [INFO] Created Extended Events session 'hkenginexesession'
2020-10-02 05:21:10.12 Server Database Instant File Initialization: enabled. For security and performance considerations see the topic 'Database Instant File Initialization' in SQL Server Books Online. This is an informational message only. No user action is required.
ForceFlush is enabled for this instance.
2020-10-02 05:21:10.17 Server Total Log Writer threads: 2. This is an informational message; no user action is required.
2020-10-02 05:21:10.18 Server clflushopt is selected for pmem flush operation.
2020-10-02 05:21:10.20 Server Software Usage Metrics is disabled.
2020-10-02 05:21:10.21 spid9s [1]. Feature Status: PVS: 0. CTR: 0. ConcurrentPFSUpdate: 1.
2020-10-02 05:21:10.21 spid9s Starting up database 'master'.
ForceFlush feature is enabled for log durability.
2020-10-02 05:21:10.79 spid9s The tail of the log for database master is being rewritten to match the new sector size of 4096 bytes. 3584 bytes at offset 393728 in file /var/opt/mssql/data/mastlog.ldf will be written.
2020-10-02 05:21:10.98 Server Common language runtime (CLR) functionality initialized.
2020-10-02 05:21:11.30 spid9s Converting database 'master' from version 897 to the current version 904.
2020-10-02 05:21:11.31 spid9s Database 'master' running the upgrade step from version 897 to version 898.
2020-10-02 05:21:11.56 spid9s Database 'master' running the upgrade step from version 898 to version 899.
2020-10-02 05:21:11.85 spid9s Database 'master' running the upgrade step from version 899 to version 900.
2020-10-02 05:21:12.14 spid9s Database 'master' running the upgrade step from version 900 to version 901.
2020-10-02 05:21:12.38 spid9s Database 'master' running the upgrade step from version 901 to version 902.
2020-10-02 05:21:12.90 spid9s Database 'master' running the upgrade step from version 902 to version 903.
2020-10-02 05:21:13.13 spid9s Database 'master' running the upgrade step from version 903 to version 904.
2020-10-02 05:21:14.13 spid9s Resource governor reconfiguration succeeded.
2020-10-02 05:21:14.13 spid9s SQL Server Audit is starting the audits. This is an informational message. No user action is required.
2020-10-02 05:21:14.16 spid9s SQL Server Audit has started the audits. This is an informational message. No user action is required.
2020-10-02 05:21:14.53 spid9s SQL Trace ID 1 was started by login "sa".
2020-10-02 05:21:15.24 spid9s Server name is '313c0fa336a7'. This is an informational message only. No user action is required.
2020-10-02 05:21:15.29 spid9s [4]. Feature Status: PVS: 0. CTR: 0. ConcurrentPFSUpdate: 1.
2020-10-02 05:21:15.29 spid41s Always On: The availability replica manager is starting. This is an informational message only. No user action is required.
2020-10-02 05:21:15.30 spid9s Starting up database 'msdb'.
2020-10-02 05:21:15.31 spid41s Always On: The availability replica manager is waiting for the instance of SQL Server to allow client connections. This is an informational message only. No user action is required.
2020-10-02 05:21:15.51 spid11s [32767]. Feature Status: PVS: 0. CTR: 0. ConcurrentPFSUpdate: 1.
2020-10-02 05:21:15.52 spid11s Starting up database 'mssqlsystemresource'.
2020-10-02 05:21:15.54 spid11s The resource database build version is 15.00.4063. This is an informational message only. No user action is required.
2020-10-02 05:21:15.60 spid11s [3]. Feature Status: PVS: 0. CTR: 0. ConcurrentPFSUpdate: 1.
2020-10-02 05:21:15.61 spid11s Starting up database 'model'.
2020-10-02 05:21:15.76 spid9s The tail of the log for database msdb is being rewritten to match the new sector size of 4096 bytes. 3072 bytes at offset 50176 in file /var/opt/mssql/data/MSDBLog.ldf will be written.
2020-10-02 05:21:16.29 spid11s The tail of the log for database model is being rewritten to match the new sector size of 4096 bytes. 512 bytes at offset 73216 in file /var/opt/mssql/data/modellog.ldf will be written.
2020-10-02 05:21:16.32 spid39s Password policy update was successful.
2020-10-02 05:21:16.75 spid9s Converting database 'msdb' from version 897 to the current version 904.
2020-10-02 05:21:16.76 spid9s Database 'msdb' running the upgrade step from version 897 to version 898.
2020-10-02 05:21:16.77 spid39s A self-generated certificate was successfully loaded for encryption.
2020-10-02 05:21:16.79 spid39s Server is listening on [ 'any' <ipv6> 1433].
2020-10-02 05:21:16.80 spid39s Server is listening on [ 'any' <ipv4> 1433].
2020-10-02 05:21:16.82 Server Server is listening on [ ::1 <ipv6> 1434].
2020-10-02 05:21:16.82 Server Server is listening on [ 127.0.0.1 <ipv4> 1434].
2020-10-02 05:21:16.83 Server Dedicated admin connection support was established for listening locally on port 1434.
2020-10-02 05:21:16.85 spid39s Server is listening on [ ::1 <ipv6> 1431].
2020-10-02 05:21:16.86 spid39s Server is listening on [ 127.0.0.1 <ipv4> 1431].
2020-10-02 05:21:16.87 spid39s SQL Server is now ready for client connections. This is an informational message; no user action is required.
2020-10-02 05:21:17.24 spid11s Converting database 'model' from version 897 to the current version 904.
2020-10-02 05:21:17.25 spid11s Database 'model' running the upgrade step from version 897 to version 898.
2020-10-02 05:21:18.45 spid9s Database 'msdb' running the upgrade step from version 898 to version 899.
2020-10-02 05:21:18.45 spid18s ERROR: Unable to set system administrator password: Password validation failed. The password does not meet SQL Server password policy requirements because it is not complex enough. The password must be at least 8 characters long and contain characters from three of the following four sets: Uppercase letters, Lowercase letters, Base 10 digits, and Symbols..
2020-10-02 05:21:18.52 spid18s An error occurred during server setup. See previous errors for more information.
2020-10-02 05:21:18.53 spid18s SQL Trace was stopped due to server shutdown. Trace ID = '1'. This is an informational message only; no user action is required.
2020-10-02 05:21:18.57 spid11s Database 'model' running the upgrade step from version 898 to version 899
I dont know to how to run my sql server using docker-compose file, I tried with the following
version: "3"
services:
nsetest:
image: my_image/abc
dbconnect:
image: mcr.microsoft.com/mssql/server
environment:
- ConnectionString=data source=100.10.143.192;Initial Catalog=sharedb;Integrated Security=True;User Id=vart;Password=adm;MultipleActiveResultSets=True;Pooling=False
- ACCEPT_EULA=Y
Normally when I run my code it will give me some output and it will store in my db.
But when I run through docker my code is running and i'm getting datas but it is not storing in my db.
It is running only in Master db but I need to use other db.
please help on this
The fourth last line of the container logs describe the issue clearly:
2020-10-02 05:21:18.45 spid18s ERROR: Unable to set system administrator password: Password validation failed. The password does not meet SQL Server password policy requirements because it is not complex enough. The password must be at least 8 characters long and contain characters from three of the following four sets: Uppercase letters, Lowercase letters, Base 10 digits, and Symbols.
Your current password, My_password, does not match the requirements. Try to set a strong password that includes Uppercase letters, Lowercase letters, Base 10 digits, and Symbols.

SQL Server docker container stop after initializing

I downloaded the latest version of the SQL Server image and I followed the instruction given in the docker hub page here
The problem is when I start container by running the below command, the container stops and I cannot find it in the running containers using docker ps
docker run -e 'ACCEPT_EULA=Y' -e 'SA_PASSWORD=fakepassw0rd' -p 1433:1433 mcr.microsoft.com/mssql/server
The result :
2019-04-22 19:16:13.67 Server Setup step is copying system data file 'C:\templatedata\master.mdf' to '/var/opt/mssql/data/master.mdf'.
2019-04-22 19:16:13.74 Server Did not find an existing master data file /var/opt/mssql/data/master.mdf, copying the missing default master and other system database files. If you have moved the database location, but not moved the database files, startup may fail. To repair: shutdown SQL Server, move the master database to configured location, and restart.
2019-04-22 19:16:13.75 Server Setup step is copying system data file 'C:\templatedata\mastlog.ldf' to '/var/opt/mssql/data/mastlog.ldf'.
2019-04-22 19:16:13.76 Server Setup step is copying system data file 'C:\templatedata\model.mdf' to '/var/opt/mssql/data/model.mdf'.
2019-04-22 19:16:13.77 Server Setup step is copying system data file 'C:\templatedata\modellog.ldf' to '/var/opt/mssql/data/modellog.ldf'.
2019-04-22 19:16:13.79 Server Setup step is copying system data file 'C:\templatedata\msdbdata.mdf' to '/var/opt/mssql/data/msdbdata.mdf'.
2019-04-22 19:16:13.82 Server Setup step is copying system data file 'C:\templatedata\msdblog.ldf' to '/var/opt/mssql/data/msdblog.ldf'.
2019-04-22 19:16:13.93 Server Microsoft SQL Server 2017 (RTM-CU11) (KB4462262) - 14.0.3038.14 (X64)
Sep 14 2018 13:53:44
Copyright (C) 2017 Microsoft Corporation
Developer Edition (64-bit) on Linux (Ubuntu 16.04.5 LTS)
2019-04-22 19:16:13.94 Server UTC adjustment: 0:00
2019-04-22 19:16:13.95 Server (c) Microsoft Corporation.
2019-04-22 19:16:13.95 Server All rights reserved.
2019-04-22 19:16:13.95 Server Server process ID is 4120.
2019-04-22 19:16:13.95 Server Logging SQL Server messages in file '/var/opt/mssql/log/errorlog'.
2019-04-22 19:16:13.95 Server Registry startup parameters:
-d /var/opt/mssql/data/master.mdf
-l /var/opt/mssql/data/mastlog.ldf
-e /var/opt/mssql/log/errorlog
2019-04-22 19:16:13.96 Server SQL Server detected 1 sockets with 2 cores per socket and 2 logical processors per socket, 2 total logical processors; using 2 logical processors based on SQL Server licensing. This is an informational message; no user action is required.
2019-04-22 19:16:13.97 Server SQL Server is starting at normal priority base (=7). This is an informational message only. No user action is required.
2019-04-22 19:16:13.98 Server Detected 1584 MB of RAM. This is an informational message; no user action is required.
2019-04-22 19:16:13.98 Server Using conventional memory in the memory manager.
2019-04-22 19:16:14.14 Server Buffer pool extension is already disabled. No action is necessary.
2019-04-22 19:16:14.27 Server InitializeExternalUserGroupSid failed. Implied authentication will be disabled.
2019-04-22 19:16:14.28 Server Implied authentication manager initialization failed. Implied authentication will be disabled.
2019-04-22 19:16:14.29 Server Successfully initialized the TLS configuration. Allowed TLS protocol versions are ['1.0 1.1 1.2']. Allowed TLS ciphers are ['ECDHE-ECDSA-AES128-GCM-SHA256:ECDHE-ECDSA-AES256-GCM-SHA384:ECDHE-RSA-AES128-GCM-SHA256:ECDHE-RSA-AES256-GCM-SHA384:ECDHE-ECDSA-AES128-SHA256:ECDHE-ECDSA-AES256-SHA384:ECDHE-ECDSA-AES256-SHA:ECDHE-ECDSA-AES128-SHA:AES256-GCM-SHA384:AES128-GCM-SHA256:AES256-SHA256:AES128-SHA256:AES256-SHA:AES128-SHA:!DHE-RSA-AES256-GCM-SHA384:!DHE-RSA-AES128-GCM-SHA256:!DHE-RSA-AES256-SHA:!DHE-RSA-AES128-SHA'].
2019-04-22 19:16:14.32 Server The maximum number of dedicated administrator connections for this instance is '1'
2019-04-22 19:16:14.33 Server Node configuration: node 0: CPU mask: 0x0000000000000003:0 Active CPU mask: 0x0000000000000003:0. This message provides a description of the NUMA configuration for this computer. This is an informational message only. No user action is required.
2019-04-22 19:16:14.34 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.
2019-04-22 19:16:14.36 Server In-Memory OLTP initialized on lowend machine.
2019-04-22 19:16:14.46 Server Database Instant File Initialization: enabled. For security and performance considerations see the topic 'Database Instant File Initialization' in SQL Server Books Online. This is an informational message only. No user action is required.
ForceFlush is enabled for this instance.
2019-04-22 19:16:14.47 Server Query Store settings initialized with enabled = 1,
2019-04-22 19:16:14.48 spid7s Starting up database 'master'.
2019-04-22 19:16:14.49 Server Software Usage Metrics is disabled.
ForceFlush feature is enabled for log durability.
2019-04-22 19:16:14.71 spid7s The tail of the log for database master is being rewritten to match the new sector size of 4096 bytes. 3072 bytes at offset 418816 in file /var/opt/mssql/data/mastlog.ldf will be written.
2019-04-22 19:16:14.91 spid7s Converting database 'master' from version 862 to the current version 869.
2019-04-22 19:16:14.91 spid7s Database 'master' running the upgrade step from version 862 to version 863.
2019-04-22 19:16:14.99 spid7s Database 'master' running the upgrade step from version 863 to version 864.
2019-04-22 19:16:15.04 spid7s Database 'master' running the upgrade step from version 864 to version 865.
2019-04-22 19:16:15.05 spid7s Database 'master' running the upgrade step from version 865 to version 866.
2019-04-22 19:16:15.08 spid7s Database 'master' running the upgrade step from version 866 to version 867.
2019-04-22 19:16:15.09 spid7s Database 'master' running the upgrade step from version 867 to version 868.
2019-04-22 19:16:15.13 spid7s Database 'master' running the upgrade step from version 868 to version 869.
2019-04-22 19:16:15.44 spid7s Resource governor reconfiguration succeeded.
2019-04-22 19:16:15.46 spid7s SQL Server Audit is starting the audits. This is an informational message. No user action is required.
2019-04-22 19:16:15.46 spid7s SQL Server Audit has started the audits. This is an informational message. No user action is required.
2019-04-22 19:16:15.56 spid7s SQL Trace ID 1 was started by login "sa".
2019-04-22 19:16:15.59 spid19s Password policy update was successful.
2019-04-22 19:16:15.60 spid7s Server name is '75d968b3f551'. This is an informational message only. No user action is required.
2019-04-22 19:16:15.64 spid21s Always On: The availability replica manager is starting. This is an informational message only. No user action is required.
2019-04-22 19:16:15.65 spid8s Starting up database 'mssqlsystemresource'.
2019-04-22 19:16:15.66 spid7s Starting up database 'msdb'.
2019-04-22 19:16:15.66 spid21s Always On: The availability replica manager is waiting for the instance of SQL Server to allow client connections. This is an informational message only. No user action is required.
2019-04-22 19:16:15.68 spid8s The resource database build version is 14.00.3038. This is an informational message only. No user action is required.
2019-04-22 19:16:15.72 spid8s Starting up database 'model'.
2019-04-22 19:16:15.96 spid24s ERROR: Unable to set system administrator password: Password validation failed. The password does not meet SQL Server password policy requirements because it is too short. The password must be at least 8 characters..
2019-04-22 19:16:15.97 spid24s An error occurred during server setup. See previous errors for more information.
2019-04-22 19:16:15.97 spid24s SQL Trace was stopped due to server shutdown. Trace ID = '1'. This is an informational message only; no user action is required.
2019-04-22 19:16:16.03 spid19s A self-generated certificate was successfully loaded for encryption.
2019-04-22 19:16:16.04 spid19s Server is listening on [ 'any' <ipv4> 1433].
I tried the same and it works with 2 adjustments:
- I had to change the password to include an upper case letter as well: fakePassw0rd
- I added the "-d" flag before the image name
Password need to be strong password.
https://learn.microsoft.com/en-gb/sql/linux/quickstart-install-connect-docker?view=sql-server-ver15&pivots=cs1-bash
Specify your own strong password that is at least eight characters and
meets the SQL Server password requirements. Required setting for the
SQL Server image.

SQL Server 2016 Error: 18456, Severity: 14, State: 38

While trying to install SQL server 2016 in my machine I came across following error:
Msg 18456, Severity: 14, State: 38
Please have a look at the log:
2017-10-12 11:24:15.51 Server Microsoft SQL Server 2016 (SP1) (KB3182545) - 13.0.4001.0 (X64)
Oct 28 2016 18:17:30
Copyright (c) Microsoft Corporation
Express Edition (64-bit) on Windows 10 Enterprise 6.3 <X64> (Build 15063: )
2017-10-12 11:24:15.54 Server UTC adjustment: 5:30
2017-10-12 11:24:15.54 Server (c) Microsoft Corporation.
2017-10-12 11:24:15.54 Server All rights reserved.
2017-10-12 11:24:15.54 Server Server process ID is 4824.
2017-10-12 11:24:15.54 Server System Manufacturer: 'Dell Inc.', System Model: 'Precision Tower 7810'.
2017-10-12 11:24:15.54 Server Authentication mode is WINDOWS-ONLY.
2017-10-12 11:24:15.54 Server Logging SQL Server messages in file 'C:\Program Files\Microsoft SQL Server\MSSQL13.SQLEXPRESS\MSSQL\Log\ERRORLOG'.
2017-10-12 11:24:15.54 Server The service account is 'NT Service\MSSQL$SQLEXPRESS'. This is an informational message; no user action is required.
2017-10-12 11:24:15.55 Server Registry startup parameters:
-d C:\Program Files\Microsoft SQL Server\MSSQL13.SQLEXPRESS\MSSQL\DATA\master.mdf
-e C:\Program Files\Microsoft SQL Server\MSSQL13.SQLEXPRESS\MSSQL\Log\ERRORLOG
-l C:\Program Files\Microsoft SQL Server\MSSQL13.SQLEXPRESS\MSSQL\DATA\mastlog.ldf
2017-10-12 11:24:15.55 Server Command Line Startup Parameters:
-s "SQLEXPRESS"
2017-10-12 11:24:17.64 Server SQL Server detected 2 sockets with 6 cores per socket and 6 logical processors per socket, 12 total logical processors; using 4 logical processors based on SQL Server licensing. This is an informational message; no user action is required.
2017-10-12 11:24:17.64 Server SQL Server is starting at normal priority base (=7). This is an informational message only. No user action is required.
2017-10-12 11:24:17.65 Server Detected 32692 MB of RAM. This is an informational message; no user action is required.
2017-10-12 11:24:17.66 Server Using conventional memory in the memory manager.
2017-10-12 11:24:18.14 Server Default collation: Latin1_General_CI_AI (us_english 1033)
2017-10-12 11:24:18.78 Server Buffer pool extension is already disabled. No action is necessary.
2017-10-12 11:24:19.62 Server InitializeExternalUserGroupSid failed. Implied authentication will be disabled.
2017-10-12 11:24:19.62 Server Implied authentication manager initialization failed. Implied authentication will be disabled.
2017-10-12 11:24:20.73 Server The maximum number of dedicated administrator connections for this instance is '1'
2017-10-12 11:24:20.75 Server This instance of SQL Server last reported using a process ID of 2476 at 12-10-2017 11:22:51 (local) 12-10-2017 05:52:51 (UTC). This is an informational message only; no user action is required.
2017-10-12 11:24:20.82 Server Node configuration: node 0: CPU mask: 0x000000000000000f:0 Active CPU mask: 0x000000000000000f:0. This message provides a description of the NUMA configuration for this computer. This is an informational message only. No user action is required.
2017-10-12 11:24:20.95 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.
2017-10-12 11:24:21.05 Server Database Instant File Initialization: enabled. For security and performance considerations see the topic 'Database Instant File Initialization' in SQL Server Books Online. This is an informational message only. No user action is required.
2017-10-12 11:24:21.38 Server Query Store settings initialized with enabled = 1,
2017-10-12 11:24:21.82 spid5s Starting up database 'master'.
2017-10-12 11:24:24.04 Server CLR version v4.0.30319 loaded.
2017-10-12 11:24:24.57 spid5s SQL Server Audit is starting the audits. This is an informational message. No user action is required.
2017-10-12 11:24:24.62 spid5s SQL Server Audit has started the audits. This is an informational message. No user action is required.
2017-10-12 11:24:25.29 spid5s SQL Trace ID 1 was started by login "sa".
2017-10-12 11:24:25.38 Server Common language runtime (CLR) functionality initialized using CLR version v4.0.30319 from C:\Windows\Microsoft.NET\Framework64\v4.0.30319\.
2017-10-12 11:24:25.41 spid5s Server name is 'I7724\SQLEXPRESS'. This is an informational message only. No user action is required.
2017-10-12 11:24:25.55 spid5s Starting up database 'msdb'.
2017-10-12 11:24:25.56 spid6s Starting up database 'mssqlsystemresource'.
2017-10-12 11:24:25.63 spid6s The resource database build version is 13.00.4001. This is an informational message only. No user action is required.
2017-10-12 11:24:25.99 spid6s Starting up database 'model'.
2017-10-12 11:24:26.22 spid10s A self-generated certificate was successfully loaded for encryption.
2017-10-12 11:24:26.23 spid10s Server local connection provider is ready to accept connection on [ \\.\pipe\SQLLocal\SQLEXPRESS ].
2017-10-12 11:24:26.24 Server Software Usage Metrics is disabled.
2017-10-12 11:24:26.24 spid10s Server local connection provider is ready to accept connection on [ \\.\pipe\MSSQL$SQLEXPRESS\sql\query ].
2017-10-12 11:24:26.26 spid10s Dedicated administrator connection support was not started because it is disabled on this edition of SQL Server. If you want to use a dedicated administrator connection, restart SQL Server using the trace flag 7806. This is an informational message only. No user action is required.
2017-10-12 11:24:26.26 spid10s SQL Server is now ready for client connections. This is an informational message; no user action is required.
2017-10-12 11:24:26.26 Server SQL Server is attempting to register a Service Principal Name (SPN) for the SQL Server service. Kerberos authentication will not be possible until a SPN is registered for the SQL Server service. This is an informational message. No user action is required.
2017-10-12 11:24:26.37 Server The SQL Server Network Interface library could not register the Service Principal Name (SPN) [ MSSQLSvc/I7724.ptcnet.ptc.com:SQLEXPRESS ] for the SQL Server service. Windows return code: 0x200b, state: 15. Failure to register a SPN might cause integrated authentication to use NTLM instead of Kerberos. This is an informational message. Further action is only required if Kerberos authentication is required by authentication policies and if the SPN has not been manually registered.
2017-10-12 11:24:26.40 spid6s Polybase feature disabled.
2017-10-12 11:24:26.40 spid6s Clearing tempdb database.
2017-10-12 11:24:27.04 spid6s Starting up database 'tempdb'.
2017-10-12 11:24:27.43 spid18s The Service Broker endpoint is in disabled or stopped state.
2017-10-12 11:24:27.43 spid18s The Database Mirroring endpoint is in disabled or stopped state.
2017-10-12 11:24:27.62 spid18s Service Broker manager has started.
2017-10-12 11:24:27.62 spid5s Recovery is complete. This is an informational message only. No user action is required.
2017-10-12 11:29:41.85 spid51 Attempting to load library 'xplog70.dll' into memory. This is an informational message only. No user action is required.
2017-10-12 11:29:41.98 spid51 Using 'xplog70.dll' version '2015.130.1601' to execute extended stored procedure 'xp_msver'. This is an informational message only; no user action is required.
2017-10-12 11:49:26.09 Logon Error: 18456, Severity: 14, State: 38.
2017-10-12 11:49:26.09 Logon Login failed for user 'PTCNET\I7724$'. Reason: Failed to open the explicitly specified database 'WM'. [CLIENT: <local machine>]
But When I am trying to install SQL Server 2012 just to verify where could be the possible error, I am getting the below log and in this case I am able to install SQl Server 2012.
2017-10-12 15:31:05.57 Server Microsoft SQL Server 2012 - 11.0.2100.60 (Intel X86)
Feb 10 2012 19:13:17
Copyright (c) Microsoft Corporation
Express Edition on Windows NT 6.2 <X64> (Build 9200: ) (WOW64)
2017-10-12 15:31:05.57 Server (c) Microsoft Corporation.
2017-10-12 15:31:05.57 Server All rights reserved.
2017-10-12 15:31:05.57 Server Server process ID is 9680.
2017-10-12 15:31:05.57 Server System Manufacturer: 'Dell Inc.', System Model: 'Precision Tower 7810'.
2017-10-12 15:31:05.57 Server Authentication mode is WINDOWS-ONLY.
2017-10-12 15:31:05.57 Server Logging SQL Server messages in file 'C:\Program Files (x86)\Microsoft SQL Server\MSSQL11.SQLEXPRESS\MSSQL\Log\ERRORLOG'.
2017-10-12 15:31:05.57 Server The service account is 'PTCNET\I7724$'. This is an informational message; no user action is required.
2017-10-12 15:31:05.57 Server Registry startup parameters:
-d C:\Program Files (x86)\Microsoft SQL Server\MSSQL11.SQLEXPRESS\MSSQL\DATA\master.mdf
-e C:\Program Files (x86)\Microsoft SQL Server\MSSQL11.SQLEXPRESS\MSSQL\Log\ERRORLOG
-l C:\Program Files (x86)\Microsoft SQL Server\MSSQL11.SQLEXPRESS\MSSQL\DATA\mastlog.ldf
2017-10-12 15:31:05.57 Server Command Line Startup Parameters:
-s "SQLEXPRESS"
2017-10-12 15:31:05.84 Server SQL Server detected 2 sockets with 6 cores per socket and 6 logical processors per socket, 12 total logical processors; using 4 logical processors based on SQL Server licensing. This is an informational message; no user action is required.
2017-10-12 15:31:05.84 Server SQL Server is starting at normal priority base (=7). This is an informational message only. No user action is required.
2017-10-12 15:31:05.84 Server Detected 32692 MB of RAM. This is an informational message; no user action is required.
2017-10-12 15:31:05.84 Server Using conventional memory in the memory manager.
2017-10-12 15:31:05.96 Server This instance of SQL Server last reported using a process ID of 8320 at 10/12/2017 3:31:02 PM (local) 10/12/2017 10:01:02 AM (UTC). This is an informational message only; no user action is required.
2017-10-12 15:31:05.96 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.
2017-10-12 15:31:05.97 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.
2017-10-12 15:31:05.99 Server Software Usage Metrics is disabled.
2017-10-12 15:31:06.00 spid4s Starting up database 'master'.
2017-10-12 15:31:06.07 Server CLR version v4.0.30319 loaded.
2017-10-12 15:31:06.18 spid4s SQL Server Audit is starting the audits. This is an informational message. No user action is required.
2017-10-12 15:31:06.18 spid4s SQL Server Audit has started the audits. This is an informational message. No user action is required.
2017-10-12 15:31:06.19 spid4s SQL Trace ID 1 was started by login "sa".
2017-10-12 15:31:06.20 spid4s Server name is 'I7724\SQLEXPRESS'. This is an informational message only. No user action is required.
2017-10-12 15:31:06.21 spid4s Failed to verify Authenticode signature on DLL 'C:\Program Files (x86)\Microsoft SQL Server\MSSQL11.SQLEXPRESS\MSSQL\Binn\ftimport.dll'.
2017-10-12 15:31:06.21 spid9s Starting up database 'mssqlsystemresource'.
2017-10-12 15:31:06.21 spid4s Starting up database 'msdb'.
2017-10-12 15:31:06.23 Server Common language runtime (CLR) functionality initialized using CLR version v4.0.30319 from C:\Windows\Microsoft.NET\Framework\v4.0.30319\.
2017-10-12 15:31:06.27 spid9s The resource database build version is 11.00.2100. This is an informational message only. No user action is required.
2017-10-12 15:31:06.36 spid12s A self-generated certificate was successfully loaded for encryption.
2017-10-12 15:31:06.36 spid12s Server local connection provider is ready to accept connection on [ \\.\pipe\SQLLocal\SQLEXPRESS ].
2017-10-12 15:31:06.36 spid12s Server local connection provider is ready to accept connection on [ \\.\pipe\MSSQL$SQLEXPRESS\sql\query ].
2017-10-12 15:31:06.36 spid12s Dedicated administrator connection support was not started because it is disabled on this edition of SQL Server. If you want to use a dedicated administrator connection, restart SQL Server using the trace flag 7806. This is an informational message only. No user action is required.
2017-10-12 15:31:06.36 spid12s SQL Server is now ready for client connections. This is an informational message; no user action is required.
2017-10-12 15:31:06.36 Server SQL Server is attempting to register a Service Principal Name (SPN) for the SQL Server service. Kerberos authentication will not be possible until a SPN is registered for the SQL Server service. This is an informational message. No user action is required.
2017-10-12 15:31:06.38 Server The SQL Server Network Interface library could not register the Service Principal Name (SPN) [ MSSQLSvc/I7724.ptcnet.ptc.com:SQLEXPRESS ] for the SQL Server service. Windows return code: 0x200b, state: 15. Failure to register a SPN might cause integrated authentication to use NTLM instead of Kerberos. This is an informational message. Further action is only required if Kerberos authentication is required by authentication policies and if the SPN has not been manually registered.
2017-10-12 15:31:06.46 spid9s Starting up database 'model'.
2017-10-12 15:31:06.59 spid9s Clearing tempdb database.
2017-10-12 15:31:06.84 spid9s Starting up database 'tempdb'.
One thing which I observed is the difference in Service account name which is "PTCNET\I7724$" for SQL server 2012 whereas for SQL Server 2016 it is "NT Service\MSSQL$SQLEXPRESS".
Not sure if this is the reason for that and from where it is picking the different Service name. Any input will be highly appreciated.

How to connect SSMS to Linux SqlServer in docker container?

I have installed in my PC Docker. I have installed SQlServer for linux and instance run correctly.
I need to connect to Docker instance with SSMS.
In the picture you can see my personal config.
For installation I have follow this link
https://learn.microsoft.com/en-us/sql/linux/sql-server-linux-setup-docker
Thanks in advance
When I lunch the server I have this message
PS C:\Users\Daniele> docker ps
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS
NAMES
PS C:\Users\Daniele> docker run microsoft/mssql-server-linux
This is an evaluation version. There are [171] days left in the evaluation period.
2017-05-23 07:19:15.12 Server Setup step is copying system data file 'C:\templatedata\master.mdf' to '/var/opt/mssq
l/data/master.mdf'.
2017-05-23 07:19:15.19 Server Setup step is copying system data file 'C:\templatedata\mastlog.ldf' to '/var/opt/mss
ql/data/mastlog.ldf'.
2017-05-23 07:19:15.19 Server Setup step is copying system data file 'C:\templatedata\model.mdf' to '/var/opt/mssql
/data/model.mdf'.
2017-05-23 07:19:15.21 Server Setup step is copying system data file 'C:\templatedata\modellog.ldf' to '/var/opt/ms
sql/data/modellog.ldf'.
2017-05-23 07:19:15.22 Server Setup step is copying system data file 'C:\templatedata\msdbdata.mdf' to '/var/opt/ms
sql/data/msdbdata.mdf'.
2017-05-23 07:19:15.24 Server Setup step is copying system data file 'C:\templatedata\msdblog.ldf' to '/var/opt/mss
ql/data/msdblog.ldf'.
2017-05-23 07:19:15.34 Server Microsoft SQL Server 2017 (CTP2.1) - 14.0.600.250 (X64)
May 10 2017 12:21:23
Copyright (C) 2017 Microsoft Corporation. All rights reserved.
Developer Edition (64-bit) on Linux (Ubuntu 16.04.2 LTS)
2017-05-23 07:19:15.34 Server UTC adjustment: 0:00
2017-05-23 07:19:15.35 Server (c) Microsoft Corporation.
2017-05-23 07:19:15.35 Server All rights reserved.
2017-05-23 07:19:15.35 Server Server process ID is 4116.
2017-05-23 07:19:15.35 Server Logging SQL Server messages in file '/var/opt/mssql/log/errorlog'.
2017-05-23 07:19:15.36 Server Registry startup parameters:
-d /var/opt/mssql/data/master.mdf
-l /var/opt/mssql/data/mastlog.ldf
-e /var/opt/mssql/log/errorlog
2017-05-23 07:19:15.37 Server SQL Server detected 1 sockets with 2 cores per socket and 2 logical processors per so
cket, 2 total logical processors; using 2 logical processors based on SQL Server licensing. This is an informational mes
sage; no user action is required.
2017-05-23 07:19:15.38 Server SQL Server is starting at normal priority base (=7). This is an informational message
only. No user action is required.
2017-05-23 07:19:15.39 Server Detected 3944 MB of RAM. This is an informational message; no user action is required
.
2017-05-23 07:19:15.39 Server Using conventional memory in the memory manager.
2017-05-23 07:19:15.63 Server Buffer pool extension is already disabled. No action is necessary.
2017-05-23 07:19:15.76 Server InitializeExternalUserGroupSid failed. Implied authentication will be disabled.
2017-05-23 07:19:15.76 Server Implied authentication manager initialization failed. Implied authentication will be
disabled.
2017-05-23 07:19:15.77 Server Successfully initialized the TLS configuration. Allowed TLS protocol versions are ['1
.0 1.1 1.2']. Allowed TLS ciphers are ['ECDHE-ECDSA-AES128-GCM-SHA256:ECDHE-ECDSA-AES256-GCM-SHA384:ECDHE-RSA-AES128-GCM
-SHA256:ECDHE-RSA-AES256-GCM-SHA384:ECDHE-ECDSA-AES128-SHA256:ECDHE-ECDSA-AES256-SHA384:ECDHE-RSA-AES128-SHA256:ECDHE-RS
A-AES256-SHA384:ECDHE-ECDSA-AES256-SHA:ECDHE-ECDSA-AES128-SHA:ECDHE-RSA-AES256-SHA:ECDHE-RSA-AES128-SHA:AES256-GCM-SHA38
4:AES128-GCM-SHA256:AES256-SHA256:AES128-SHA256:AES256-SHA:AES128-SHA'].
2017-05-23 07:19:15.81 Server The maximum number of dedicated administrator connections for this instance is '1'
2017-05-23 07:19:15.81 Server Node configuration: node 0: CPU mask: 0x0000000000000003:0 Active CPU mask: 0x0000000
000000003:0. This message provides a description of the NUMA configuration for this computer. This is an informational m
essage only. No user action is required.
2017-05-23 07:19:15.82 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.
2017-05-23 07:19:15.83 Server In-Memory OLTP initialized on lowend machine.
2017-05-23 07:19:15.88 Server Database Instant File Initialization: enabled. For security and performance considera
tions see the topic 'Database Instant File Initialization' in SQL Server Books Online. This is an informational message
only. No user action is required.
2017-05-23 07:19:15.89 Server Query Store settings initialized with enabled = 1,
2017-05-23 07:19:15.90 spid7s Starting up database 'master'.
2017-05-23 07:19:15.91 Server Software Usage Metrics is disabled.
2017-05-23 07:19:16.12 spid7s The tail of the log for database master is being rewritten to match the new sector si
ze of 4096 bytes. 3584 bytes at offset 418304 in file /var/opt/mssql/data/mastlog.ldf will be written.
2017-05-23 07:19:16.18 spid7s Converting database 'master' from version 862 to the current version 868.
2017-05-23 07:19:16.19 spid7s Database 'master' running the upgrade step from version 862 to version 863.
2017-05-23 07:19:16.21 spid7s Database 'master' running the upgrade step from version 863 to version 864.
2017-05-23 07:19:16.23 spid7s Database 'master' running the upgrade step from version 864 to version 865.
2017-05-23 07:19:16.23 spid7s Database 'master' running the upgrade step from version 865 to version 866.
2017-05-23 07:19:16.24 spid7s Database 'master' running the upgrade step from version 866 to version 867.
2017-05-23 07:19:16.25 spid7s Database 'master' running the upgrade step from version 867 to version 868.
2017-05-23 07:19:16.42 spid7s Buffer pool extension is already disabled. No action is necessary.
2017-05-23 07:19:16.42 spid7s Resource governor reconfiguration succeeded.
2017-05-23 07:19:16.43 spid7s SQL Server Audit is starting the audits. This is an informational message. No user ac
tion is required.
2017-05-23 07:19:16.43 spid7s SQL Server Audit has started the audits. This is an informational message. No user ac
tion is required.
2017-05-23 07:19:16.49 spid7s SQL Trace ID 1 was started by login "sa".
2017-05-23 07:19:16.50 spid7s Server name is '29e275920103'. This is an informational message only. No user action
is required.
2017-05-23 07:19:16.50 spid7s The NETBIOS name of the local node that is running the server is '29e275920103'. This
is an informational message only. No user action is required.
2017-05-23 07:19:16.52 spid19s Password policy update was successful.
2017-05-23 07:19:16.52 spid22s Always On: The availability replica manager is starting. This is an informational mes
sage only. No user action is required.
2017-05-23 07:19:16.53 spid9s Starting up database 'mssqlsystemresource'.
2017-05-23 07:19:16.53 spid7s Starting up database 'msdb'.
2017-05-23 07:19:16.54 spid22s Always On: The availability replica manager is waiting for the instance of SQL Server
to allow client connections. This is an informational message only. No user action is required.
2017-05-23 07:19:16.55 spid9s The resource database build version is 14.00.600. This is an informational message on
ly. No user action is required.
2017-05-23 07:19:16.57 spid9s Starting up database 'model'.
2017-05-23 07:19:16.88 spid7s The tail of the log for database msdb is being rewritten to match the new sector size
of 4096 bytes. 512 bytes at offset 52736 in file /var/opt/mssql/data/MSDBLog.ldf will be written.
2017-05-23 07:19:16.94 spid7s Converting database 'msdb' from version 862 to the current version 868.
2017-05-23 07:19:16.95 spid7s Database 'msdb' running the upgrade step from version 862 to version 863.
2017-05-23 07:19:16.98 spid19s A self-generated certificate was successfully loaded for encryption.
2017-05-23 07:19:17.00 spid7s Database 'msdb' running the upgrade step from version 863 to version 864.
2017-05-23 07:19:17.01 spid19s Server is listening on [ 0.0.0.0 <ipv4> 1433].
2017-05-23 07:19:17.02 Server Server is listening on [ 127.0.0.1 <ipv4> 1434].
2017-05-23 07:19:17.02 Server Dedicated admin connection support was established for listening locally on port 1434
.
2017-05-23 07:19:17.02 spid9s The tail of the log for database model is being rewritten to match the new sector siz
e of 4096 bytes. 2048 bytes at offset 75776 in file /var/opt/mssql/data/modellog.ldf will be written.
2017-05-23 07:19:17.02 spid19s SQL Server is now ready for client connections. This is an informational message; no
user action is required.
2017-05-23 07:19:17.05 spid7s Database 'msdb' running the upgrade step from version 864 to version 865.
2017-05-23 07:19:17.05 spid7s Database 'msdb' running the upgrade step from version 865 to version 866.
2017-05-23 07:19:17.06 spid9s Converting database 'model' from version 862 to the current version 868.
2017-05-23 07:19:17.06 spid9s Database 'model' running the upgrade step from version 862 to version 863.
2017-05-23 07:19:17.07 spid7s Database 'msdb' running the upgrade step from version 866 to version 867.
2017-05-23 07:19:17.08 spid7s Database 'msdb' running the upgrade step from version 867 to version 868.
2017-05-23 07:19:17.09 spid9s Database 'model' running the upgrade step from version 863 to version 864.
2017-05-23 07:19:17.10 spid9s Database 'model' running the upgrade step from version 864 to version 865.
2017-05-23 07:19:17.10 spid9s Database 'model' running the upgrade step from version 865 to version 866.
2017-05-23 07:19:17.10 spid9s Database 'model' running the upgrade step from version 866 to version 867.
2017-05-23 07:19:17.11 spid9s Database 'model' running the upgrade step from version 867 to version 868.
2017-05-23 07:19:17.22 spid9s Polybase feature disabled.
2017-05-23 07:19:17.22 spid9s Clearing tempdb database.
2017-05-23 07:19:17.71 spid9s Starting up database 'tempdb'.
2017-05-23 07:19:17.97 spid9s The tempdb database has 1 data file(s).
2017-05-23 07:19:17.99 spid22s The Service Broker endpoint is in disabled or stopped state.
2017-05-23 07:19:17.99 spid22s The Database Mirroring endpoint is in disabled or stopped state.
2017-05-23 07:19:18.00 spid22s Service Broker manager has started.
2017-05-23 07:19:18.14 spid7s Recovery is complete. This is an informational message only. No user action is requir
ed.
This is an old question, but I came to this thread when I have similar issue. So answering this as it may be useful for others.
In my case its the server name syntax issue. SSMS uses ip_address,port_number syntax. So I have to use either localhost,1433 or 127.0.0.1,1433 to connect.
I actually found a SO question related to this here
If you ran the command on the docs:
docker run -e 'ACCEPT_EULA=Y' -e 'SA_PASSWORD=<YourStrong!Passw0rd>' -p 1433:1433 -d microsoft/mssql-server-linux
Then the ports on the container are mapped to the port on your localhost. So, you can connect to your database using localhost and the password you specified above.
Let me know if that works!
I'm a little late, but I hope this answer helps someone in the future. Guys, I experienced the exact same problem reported.
What worked for me was connecting as follows:
127.0.0.1\{container_name},1433
I used the following image:
mcr.microsoft.com/mssql/server
With MSSQL_PID Express and ports :
"1433:1433"
"1434:1434/udp"
Use the IP only (I had same problem using "Ip,1433\Express"). If you not using std. port add ,port (Note , not :!)
But not the internal IP of the docker. Use the IP you get from the docker desktop icon in the taskbar Settings=>Network => "Internal Virtual Switch" ->Subnet Address. (Must be in your local host pc IP range). Replace last 0 with 1
See: https://learn.microsoft.com/de-de/sql/linux/sql-server-linux-manage-ssms?view=sql-server-2017
SQL-Auth.
User=SA
PWD see start of docker run cmd.

SQL Server Linux Docker image keeps exiting

Setup
Windows 10 Pro
Docker for Windows 1.13.0-beta38 (9805)
Dockerfile
FROM microsoft/mssql-server-linux:latest
ENV ACCEPT_EULA "Y"
ENV SA_PASSWORD "my_strong_Password!"
EXPOSE 1433
Issue
Temperamental container. Sometime it stays up for a few minutes. Other time is exits straight away.
Once the container has stopped I run docker start #containerID. The container will start and stay up for a few more minutes. However it will eventually exit.
I know the container lifecyle means that if no process is running in the container it will exit, so I can only assume this is happening.
I have examined the logs and I always get this message before it exits:
sqlservr: ObjectWaitContext.cpp:533: void ObjectWaitContext::Wait(const PLONG64): Assertion `m_state == State::Signaled' failed.
I've googled this message but can't find any useful information about it.
Does anyone know why the container keeps exiting?
Full SQL Server Linux Logs
This is an evaluation version. There are [141] days left in the evaluation period.
2017-01-23 17:42:33.90 Server Microsoft SQL Server vNext (CTP1.1) - 14.0.100.187 (X64)
Dec 10 2016 02:51:11
Copyright (C) 2016 Microsoft Corporation. All rights reserved.
on Linux (Ubuntu 16.04.1 LTS)
2017-01-23 17:42:33.91 Server UTC adjustment: 0:00
2017-01-23 17:42:33.92 Server (c) Microsoft Corporation.
2017-01-23 17:42:33.92 Server All rights reserved.
2017-01-23 17:42:33.92 Server Server process ID is 4116.
2017-01-23 17:42:33.93 Server Logging SQL Server messages in file 'C:\var\opt\mssql\log\errorlog'.
2017-01-23 17:42:33.93 Server Registry startup parameters:
-d C:\var\opt\mssql\data\master.mdf
-l C:\var\opt\mssql\data\mastlog.ldf
-e C:\var\opt\mssql\log\errorlog
2017-01-23 17:42:34.08 Server SQL Server detected 1 sockets with 2 cores per socket and 2 logical processors per socket, 2 total logical processors; using 2 logical
processors based on SQL Server licensing. This is an informational message; no user action is required.
2017-01-23 17:42:34.09 Server SQL Server is starting at normal priority base (=7). This is an informational message only. No user action is required.
2017-01-23 17:42:34.09 Server Detected 3143 MB of RAM. This is an informational message; no user action is required.
2017-01-23 17:42:34.10 Server Using conventional memory in the memory manager.
2017-01-23 17:42:34.90 Server Default collation: SQL_Latin1_General_CP1_CI_AS (us_english 1033)
2017-01-23 17:42:37.27 Server Buffer pool extension is already disabled. No action is necessary.
2017-01-23 17:42:38.70 Server InitializeExternalUserGroupSid failed. Implied authentication will be disabled.
2017-01-23 17:42:38.70 Server Implied authentication manager initialization failed. Implied authentication will be disabled.
2017-01-23 17:42:39.11 Server The maximum number of dedicated administrator connections for this instance is '1'
2017-01-23 17:42:39.11 Server Node configuration: node 0: CPU mask: 0x0000000000000003:0 Active CPU mask: 0x0000000000000003:0. This message provides a description o
f the NUMA configuration for this computer. This is an informational message only. No user action is required.
2017-01-23 17:42:39.13 Server Using dynamic lock allocation. Initial allocation of 2500 Lock blocks and 5000 Lock Owner blocks per node. This is an informational m
essage only. No user action is required.
2017-01-23 17:42:39.14 Server Database Instant File Initialization: enabled. For security and performance considerations see the topic 'Database Instant File Initial
ization' in SQL Server Books Online. This is an informational message only. No user action is required.
2017-01-23 17:42:39.16 Server Query Store settings initialized with enabled = 1,
2017-01-23 17:42:39.16 spid5s Starting up database 'master'.
2017-01-23 17:42:39.19 Server In-Memory OLTP initialized on lowend machine.
2017-01-23 17:42:40.27 Server Software Usage Metrics is disabled.
2017-01-23 17:42:40.79 spid5s 159 transactions rolled forward in database 'master' (1:0). This is an informational message only. No user action is required.
2017-01-23 17:42:40.82 spid5s 0 transactions rolled back in database 'master' (1:0). This is an informational message only. No user action is required.
2017-01-23 17:42:40.82 spid5s Recovery is writing a checkpoint in database 'master' (1). This is an informational message only. No user action is required.
2017-01-23 17:42:41.05 spid5s Buffer pool extension is already disabled. No action is necessary.
2017-01-23 17:42:41.06 spid5s Resource governor reconfiguration succeeded.
2017-01-23 17:42:41.06 spid5s SQL Server Audit is starting the audits. This is an informational message. No user action is required.
2017-01-23 17:42:41.07 spid5s SQL Server Audit has started the audits. This is an informational message. No user action is required.
2017-01-23 17:42:41.80 spid5s SQL Trace ID 1 was started by login "sa".
2017-01-23 17:42:41.82 spid5s Server name is 'c0afcedc2500'. This is an informational message only. No user action is required.
2017-01-23 17:42:41.85 spid20s Starting up database 'msdb'.
2017-01-23 17:42:41.85 spid21s Starting up database 'MyTestDb'.
2017-01-23 17:42:41.85 spid6s Starting up database 'mssqlsystemresource'.
2017-01-23 17:42:41.89 spid6s The resource database build version is 14.00.100. This is an informational message only. No user action is required.
2017-01-23 17:42:41.99 spid6s Starting up database 'model'.
2017-01-23 17:42:44.68 spid21s Parallel redo is started for database 'MyTestDb' with worker pool size [1].
2017-01-23 17:42:44.69 spid5s Recovery is writing a checkpoint in database 'msdb' (4). This is an informational message only. No user action is required.
2017-01-23 17:42:44.85 spid21s 75 transactions rolled forward in database 'MyTestDb' (5:0). This is an informational message only. No user action is required.
2017-01-23 17:42:44.91 spid5s 0 transactions rolled back in database 'MyTestDb' (5:0). This is an informational message only. No user action is required.
2017-01-23 17:42:44.93 spid5s Parallel redo is shutdown for database 'MyTestDb' with worker pool size [1].
2017-01-23 17:42:44.98 spid6s Polybase feature disabled.
2017-01-23 17:42:44.98 spid6s Clearing tempdb database.
2017-01-23 17:42:49.01 spid6s Starting up database 'tempdb'.
2017-01-23 17:42:49.03 spid17s A self-generated certificate was successfully loaded for encryption.
2017-01-23 17:42:49.24 spid17s Server is listening on [ 0.0.0.0 <ipv4> 1433].
2017-01-23 17:42:49.24 Server Server is listening on [ 127.0.0.1 <ipv4> 1434].
2017-01-23 17:42:49.25 Server Dedicated admin connection support was established for listening locally on port 1434.
2017-01-23 17:42:49.25 spid17s SQL Server is now ready for client connections. This is an informational message; no user action is required.
2017-01-23 17:42:50.95 spid6s The tempdb database has 1 data file(s).
2017-01-23 17:42:50.96 spid22s The Service Broker endpoint is in disabled or stopped state.
2017-01-23 17:42:50.96 spid22s The Database Mirroring endpoint is in disabled or stopped state.
2017-01-23 17:42:50.99 spid22s Service Broker manager has started.
2017-01-23 17:42:51.14 spid5s Recovery is complete. This is an informational message only. No user action is required.
sqlservr: ObjectWaitContext.cpp:533: void ObjectWaitContext::Wait(const PLONG64): Assertion `m_state == State::Signaled' failed.
Capturing core dump and information for sqlservr (pid 11)...
cat: core.sqlservr.11.temp/log/debug.log: No such file or directory
dmesg: read kernel buffer failed: Operation not permitted
No journal files were found.
No journal files were found.
ls: cannot access '/var/opt/mssql/log/log/errorlog*': No such file or directory
ls: cannot access '/var/opt/mssql/log/log/exception.log': No such file or directory
ls: cannot access '/var/opt/mssql/log/log/SQLDu*.txt': No such file or directory
ls: cannot access '/var/opt/mssql/log/log/SQLDu*.mdmp': No such file or directory
ls: cannot access '/var/opt/mssql/log/log/system_health*': No such file or directory
Packaging core dump and information into compressed files.
Core dump and information will be written to /var/opt/mssql/log/core.sqlservr.01_23_2017_17_43_37.11 and logs in /var/opt/mssql/log/core.sqlservr.01_23_2017_17_43_37.11.l
og
This is an evaluation version. There are [141] days left in the evaluation period.
2017-01-23 17:45:25.45 Server Microsoft SQL Server vNext (CTP1.1) - 14.0.100.187 (X64)
Dec 10 2016 02:51:11
Copyright (C) 2016 Microsoft Corporation. All rights reserved.
on Linux (Ubuntu 16.04.1 LTS)
2017-01-23 17:45:25.45 Server UTC adjustment: 0:00
2017-01-23 17:45:25.45 Server (c) Microsoft Corporation.
2017-01-23 17:45:25.46 Server All rights reserved.
2017-01-23 17:45:25.46 Server Server process ID is 4116.
2017-01-23 17:45:25.46 Server Logging SQL Server messages in file 'C:\var\opt\mssql\log\errorlog'.
2017-01-23 17:45:25.46 Server Registry startup parameters:
-d C:\var\opt\mssql\data\master.mdf
-l C:\var\opt\mssql\data\mastlog.ldf
-e C:\var\opt\mssql\log\errorlog
2017-01-23 17:45:25.55 Server SQL Server detected 1 sockets with 2 cores per socket and 2 logical processors per socket, 2 total logical processors; using 2 logical
processors based on SQL Server licensing. This is an informational message; no user action is required.
2017-01-23 17:45:25.55 Server SQL Server is starting at normal priority base (=7). This is an informational message only. No user action is required.
2017-01-23 17:45:25.56 Server Detected 3143 MB of RAM. This is an informational message; no user action is required.
2017-01-23 17:45:25.56 Server Using conventional memory in the memory manager.
2017-01-23 17:45:26.40 Server Default collation: SQL_Latin1_General_CP1_CI_AS (us_english 1033)
2017-01-23 17:45:28.55 Server Buffer pool extension is already disabled. No action is necessary.
2017-01-23 17:45:29.96 Server InitializeExternalUserGroupSid failed. Implied authentication will be disabled.
2017-01-23 17:45:29.96 Server Implied authentication manager initialization failed. Implied authentication will be disabled.
2017-01-23 17:45:30.43 Server The maximum number of dedicated administrator connections for this instance is '1'
2017-01-23 17:45:30.43 Server Node configuration: node 0: CPU mask: 0x0000000000000003:0 Active CPU mask: 0x0000000000000003:0. This message provides a description o
f the NUMA configuration for this computer. This is an informational message only. No user action is required.
2017-01-23 17:45:30.45 Server Using dynamic lock allocation. Initial allocation of 2500 Lock blocks and 5000 Lock Owner blocks per node. This is an informational m
essage only. No user action is required.
2017-01-23 17:45:30.46 Server Database Instant File Initialization: enabled. For security and performance considerations see the topic 'Database Instant File Initial
ization' in SQL Server Books Online. This is an informational message only. No user action is required.
2017-01-23 17:45:30.47 Server Query Store settings initialized with enabled = 1,
2017-01-23 17:45:30.47 spid5s Starting up database 'master'.
2017-01-23 17:45:30.49 Server In-Memory OLTP initialized on lowend machine.
2017-01-23 17:45:32.07 Server Software Usage Metrics is disabled.
2017-01-23 17:45:32.31 spid5s 5 transactions rolled forward in database 'master' (1:0). This is an informational message only. No user action is required.
2017-01-23 17:45:32.36 spid5s 0 transactions rolled back in database 'master' (1:0). This is an informational message only. No user action is required.
2017-01-23 17:45:32.36 spid5s Recovery is writing a checkpoint in database 'master' (1). This is an informational message only. No user action is required.
2017-01-23 17:45:32.64 spid5s Buffer pool extension is already disabled. No action is necessary.
2017-01-23 17:45:32.65 spid5s Resource governor reconfiguration succeeded.
2017-01-23 17:45:32.65 spid5s SQL Server Audit is starting the audits. This is an informational message. No user action is required.
2017-01-23 17:45:32.65 spid5s SQL Server Audit has started the audits. This is an informational message. No user action is required.
2017-01-23 17:45:33.47 spid5s SQL Trace ID 1 was started by login "sa".
2017-01-23 17:45:33.49 spid5s Server name is 'c0afcedc2500'. This is an informational message only. No user action is required.
2017-01-23 17:45:33.53 spid6s Starting up database 'mssqlsystemresource'.
2017-01-23 17:45:33.54 spid20s Starting up database 'msdb'.
2017-01-23 17:45:33.55 spid21s Starting up database 'MyTestDb'.
2017-01-23 17:45:33.61 spid6s The resource database build version is 14.00.100. This is an informational message only. No user action is required.
2017-01-23 17:45:33.67 spid6s Starting up database 'model'.
2017-01-23 17:45:36.19 spid21s Parallel redo is started for database 'MyTestDb' with worker pool size [1].
2017-01-23 17:45:36.43 spid21s 78 transactions rolled forward in database 'MyTestDb' (5:0). This is an informational message only. No user action is required.
2017-01-23 17:45:36.53 spid6s Polybase feature disabled.
2017-01-23 17:45:36.53 spid6s Clearing tempdb database.
2017-01-23 17:45:36.59 spid5s 0 transactions rolled back in database 'MyTestDb' (5:0). This is an informational message only. No user action is required.
2017-01-23 17:45:36.60 spid5s Parallel redo is shutdown for database 'MyTestDb' with worker pool size [1].
2017-01-23 17:45:36.71 spid5s Recovery is writing a checkpoint in database 'msdb' (4). This is an informational message only. No user action is required.
sqlservr: ObjectWaitContext.cpp:533: void ObjectWaitContext::Wait(const PLONG64): Assertion `m_state == State::Signaled' failed.
Capturing core dump and information for sqlservr (pid 12)...
cat: core.sqlservr.12.temp/log/debug.log: No such file or directory
dmesg: read kernel buffer failed: Operation not permitted
No journal files were found.
No journal files were found.
ls: cannot access '/var/opt/mssql/log/log/errorlog*': No such file or directory
ls: cannot access '/var/opt/mssql/log/log/exception.log': No such file or directory
ls: cannot access '/var/opt/mssql/log/log/SQLDu*.txt': No such file or directory
ls: cannot access '/var/opt/mssql/log/log/SQLDu*.mdmp': No such file or directory
ls: cannot access '/var/opt/mssql/log/log/system_health*': No such file or directory
Packaging core dump and information into compressed files.
Core dump and information will be written to /var/opt/mssql/log/core.sqlservr.01_23_2017_17_45_37.12 and logs in /var/opt/mssql/log/core.sqlservr.01_23_2017_17_45_37.12.l
og
I had the same problem!
I used a really strong password and step by step of that link to solved the problem.
Quickstart: Run the SQL Server 2017 container image with Docker
Good luck.
sqlservr: ObjectWaitContext.cpp:533: void ObjectWaitContext::Wait(const PLONG64): Assertion `m_state == State::Signaled' failed.
Above message is related to Microsoft SQL Server bug (see: GH-23). Upgrade should help.
Microsoft SQL Server vNext (CTP1.2) - 14.0.200.24 (X64) solved this issue!
Try increasing the memory size of Docker's VM. Left click on the whale icon on the task bar, select Settings/Advanced and set the amount of memory to a fair size, like 4 Gigs, then start the container, wait and probe to see if the image is still running. I had this and other problems with my container and this fixed it. Good luck.

Resources