-v sql1data:/var/opt/mssql
parameter creates a data volume container named sql1ddata. This is used to persist the data created by SQL Server.docker ps
command.-v sql1data:/var/opt/mssql
parameter creates a data volume container named sql1ddata. This is used to persist the data created by SQL Server.docker ps
command.MSSQL_SA_PASSWORD
environment variable you specified is discoverable by running echo $MSSQL_SA_PASSWORD
in the container. For security purposes, change your SA password:docker exec
to run the sqlcmd utility to change the password through a Transact-SQL statement. Replace <YourStrong!Passw0rd>
and <YourNewStrong!Passw0rd>
with your own password values:-v sql1data:/var/opt/mssql
parameter. The sql1data data volume container persists the /var/opt/mssql data even after the container is removed. The following steps completely remove the sql1 container and then create a new container, sql2, with the persisted data.MSSQL_SA_PASSWORD=<YourStrong!Passw0rd>
. All of the SQL Server data was restored from sql1, including the changed password from earlier in the tutorial. In effect, some options like this are ignored due to restoring the data in /var/opt/mssql. For this reason, the password is <YourNewStrong!Passw0rd>
as shown here.MSSQL_SA_PASSWORD=<YourStrong!Passw0rd>
. All of the SQL Server data was restored from sql1, including the changed password from earlier in the tutorial. In effect, some options like this are ignored due to restoring the data in /var/opt/mssql. For this reason, the password is <YourNewStrong!Passw0rd>
as shown here.