Access Docker MSSQL Container from Parallel (Mac Mini M2)

How to access Docker Contained DB from Parallel.


Docker not working with Windows 11 in Parallels. Is there any way to use MSSQL with Parallel ? Yes.

Using the Mac Network IP and container exposed port number, we can access the server (Docker) within MSQL Management Studio or in a connection strings, separated by a single comma

Where Did I get the IP ?

In System Settings – Network- Find the IP.

connectionString="Data Source=192.168.20.100,1433;Password=mssql1Ipw;User Id=sa;Initial Catalog=dolphinedb;Integrated Security=False" />

The above code is sample sql connection string. Thanks for Docker.

Connection string for MSQL Server local database

How to


Following connection string can be used for connecting local MSSQL database on computer with Windows authentication.

Instead of the server instance, we have to use the server’s name to setup the string. This could be work with C#.Net and VB.Net.

   <connectionStrings>   
	  <add name="MyConnection"
	   connectionString="Data Source=LAPTOP-J3H2M20O;Initial Catalog=mydatabase;Integrated Security=True"/>
  </connectionStrings>

For more gits and snippet visit the following

On GitHub , All Gits

MSSQL : Update row from another database


This code snippet allow you to update table from another database in Microsoft SQL Server. To do this you have to use the following script.

UPDATE dbo.Address  set gstnumber= t.gst 
from olddb.dbo.address as  t  where dbo.address.id=t.id

All the data with corresponding id in the target table will be updated with the values of olddb database.