Differences between revisions 3 and 4
Revision 3 as of 2022-01-25 13:13:48
Size: 545
Editor: scot
Comment:
Revision 4 as of 2022-01-25 14:14:46
Size: 1016
Editor: scot
Comment:
Deletions are marked like this. Additions are marked like this.
Line 2: Line 2:

In section 3.3 (for version 2.0 book), They assume that you have a SQL Server installed on the local host. In class we just used docker on your local machine and its works for the most part. However, you do need to change the connection string. Here is the process:

== Bring Up a SQL Server Docker Container ==

{{{
# docker run -e "ACCEPT_EULA=Y" -e "SA_PASSWORD=ConstraintDB!23" -p 1433:1433 --name sqlserver -d mcr.microsoft.com/mssql/server:2019-latest
}}}

SQL Server Docker Fix

In section 3.3 (for version 2.0 book), They assume that you have a SQL Server installed on the local host. In class we just used docker on your local machine and its works for the most part. However, you do need to change the connection string. Here is the process:

Bring Up a SQL Server Docker Container

# docker run -e "ACCEPT_EULA=Y" -e "SA_PASSWORD=ConstraintDB!23" -p 1433:1433 --name sqlserver -d mcr.microsoft.com/mssql/server:2019-latest

Problem: You try to run a SQL Server docker image with the default port (1433) and you get the following error message:

Error response from daemon: Ports are not available: listen tcp 0.0.0.0:1433: bind: An attempt was made to access a socket in a way forbidden by its access permissions. Error: failed to start containers: sqlserver

Ok, there is a simple fix for this in windows 10/11 that has worked for me in the past:

> net stop winnat
> docker start sqlserver
> net start winnat

WebServices/SqlServerDockerFix (last edited 2022-01-25 14:39:02 by scot)