https://www.codingblocks.net
In this video we go over how to get a good sized chunk of data to get you started with SQL Server. This video completes the foundation for upcoming video on learning many SQL Server related tips. If you haven't already, you'll likely want to watch the first video in the series so you can follow this one with a better understanding. That video can be found here:
• SQL Server Tips - Run in Docker and a...
Some helpful notes from the video:
Contoso Sample BI Database Download
https://www.microsoft.com/en-us/downl...
Run a container and kill/remove the container any time it's stopped (exited) for any reason - notice the --rm
docker run --name sqldev --rm -d -e ACCEPT_EULA=Y -e SA_PASSWORD=c0dingblocks! -p 1533:1433 mcr.microsoft.com/mssql/server:2017-latest-ubuntu
Run a container but keep it (and the internal state) around if it's only stopped and not removed - notice there is no longer a --rm
docker run --name sqldev -d -e ACCEPT_EULA=Y -e SA_PASSWORD=c0dingblocks! -p 1533:1433 mcr.microsoft.com/mssql/server:2017-latest-ubuntu
Run a container a map a volume to it so whatever happens in the container directory, you can see and access on your host
Even if you rm the container, the directory C:\Your\Directory\Here" will still contain the contents of the /var/opt/mssql/data folder from right before you killed the container
docker run --name sqldev -d -e ACCEPT_EULA=Y -e SA_PASSWORD=c0dingblocks! -p 1533:1433 -v "C:\Your\Directory\Here\:/var/opt/mssql/data/" mcr.microsoft.com/mssql/server:2017-latest-ubuntu
List all Docker containers currently not removed on your system
docker ps -a
Force stop and then also remove a container
docker rm -f sqldev
Launch the shell for the sql linux container that is running in the samples
docker exec -it -u root sqldev bash
Stop a running container
docker stop sqldev
OR
docker stop containerid
Start an exited / stopped container
docker start sqldev
OR
docker start containerid
Join us on Slack:
https://www.codingblocks.net/slack
Social
=============================================
Twitter: @CodingBlocks
Facebook: / codingblocks
Podcast
===========================================
iTunes: https://www.codingblocks.net/itunes
Stitcher: https://www.codingblocks.net/stitcher