0

I am trying to connect to an instance of SQL Server Express running inside a container from SSMS running on my host machine.

The container was started as follows:

docker pull microsoft/mssql-server-windows-express
docker run -d -e "ACCEPT_EULA=Y" -e "SA_PASSWORD=password" -p 1436:1433 --name mydb microsoft/mssql-server-windows-express

The container is running on the IP address that I got using

docker inspect --format '{{.NetworkSettings.Networks.nat.IPAddress}}' mydb

Now I am trying to connect to this instance, at the above IP address using SSMS, but get the following error:

enter image description here

I get the same error even if I change the case/position of the instance, e.g. 1.2.3.4,1436\SQLExpress, or 1.2.3.4\SQLExpress,1436.

What am I missing?

Possible duplicates:

  1. Cannot connect to SQL Server express from SSMS
  2. Connect to SQL Express with SSMS

But the answers didn't help me.

  • I have made sure that the container is up and running. I can ping to the IP address of the container.
  • The username and password are correct.

One thing I could be missing is that the SQL Server authentication is not enabled on the database instance in the container. I am not sure how to do that.

How can I connect to the SQL Server Express instance running inside a container from SSMS?

software_writer
  • 3,941
  • 9
  • 38
  • 64

1 Answers1

1

The original password I had used was weak (no I wasn't using password used in the question, but a different one which was still weak).

After starting a new container with a password which has combinations of uppercase, lowercase, characters, and numbers, I can now log into the database using following settings.

enter image description here

software_writer
  • 3,941
  • 9
  • 38
  • 64