LambdaLuke Help

Install SQL Server Via Docker

First download and install Docker

Enter the following in the command line to download the container, but make sure to change the password to a secure one you wish to use:

docker pull mcr.microsoft.com/mssql/server:2022-latest docker run -e "ACCEPT_EULA=Y" -e "MSSQL_SA_PASSWORD=Password123" \ -p 1433:1433 --name sql2022 --hostname sql2022 \ -d \ mcr.microsoft.com/mssql/server:2022-latest
Note:

The default username for SQL Server is always sa (System Administrator). The password is specified by the MSSQL_SA_PASSWORD environment variable (use something more secure than Password123 in the example above!)

To check the container is running and to stop and start it etc. use the Docker desktop application.

Connect to the Database

Open Datagrip and select a new project

Select the database folder within our project as the path

Once the project is open, select file from the top menu bar and select renam project, then name the project CrudApp

From the database explorer left-hand menu, choose add a data source and select Microsoft SQL Server

Host should be set to localhost

Enter port number 1433

Set Authentication to User & Password

Set user to sa

Set the password to Password123

You can now select a test connection to ensure that it works, then press done

10 July 2025