How to Restore a SQL Server Database on macOS Using Docker

In this video, I’ll show you how to create a Microsoft SQL Server instance using Docker, connect to SQL Server using a program called SQL Operations Studio, and restore a copy of the AdventureWorks2016.bak database. Finally, I’ll show you how to restart an inactive SQL Server container in Docker.

🟩 Notes in the video here: https://docs.google.com/document/d/1G…

🟩 Command to create SQL instance:

docker run -e ACCEPT_EULA=Y -e SA_PASSWORD=StrongPa$$word123 -p 1433:1433 -d mcr.microsoft.com/mssql/server:2019-latest 

🟩 Command to copy AdventureWorks2016.bak to docker container:

docker cp ~/Downloads/AdventureWorks2016.bak CONTAINER_ID:/var/opt/mssql/data/ 

where CONTAINER_ID is the docker container id for the sql server instance.