Sql-docs: The commands given in the "Persist your data" section do not work when using Linux containers on Windows

Created on 25 Oct 2019  Â·  13Comments  Â·  Source: MicrosoftDocs/sql-docs

The command given, docker run -e "ACCEPT_EULA=Y" -e "MSSQL_SA_PASSWORD=&lt;YourStrong!Passw0rd&gt;" -p 1433:1433 -v <host directory>:/var/opt/mssql -d mcr.microsoft.com/mssql/server:2019-CTP3.2-ubuntu will fail due to a file access violation. It is better to explicitly mount the data & log directories instead:

docker run -e "ACCEPT_EULA=Y" -e "MSSQL_SA_PASSWORD=&lt;YourStrong!Passw0rd&gt;" -p 1433:1433 -v <host directory>/data:/var/opt/mssql/data -v <host directory>/log:/var/opt/mssql/log -d mcr.microsoft.com/mssql/server:2019-CTP3.2-ubuntu


Document Details

⚠ Do not edit this section. It is required for docs.microsoft.com ➟ GitHub issue linking.

Pri1 assigned-to-author doc-bug linutech sqprod

All 13 comments

@trbenning -- Todd, thank you for your feedback. I am looking into it now.

@vin-yu -- Vin, please review the above-mentioned PR 12703.

@VanMSFT -- Van, please review PR 12703.

It works when I sue the 2017 image, but it does not work with 2019 image

Following up with @vin-yu

@VanMSFT, @vin-yu -- Van, Vin, please look into this issue and PR 12703.

any update in this matter?

I can confirm at least on 2019 Sql Server. Only mount the data and log directories. The documentation should be updated to reflect this.

@VanMSFT, @vin-yu -- Van, Vin, please look into this issue and PR 12703.

I opened PR 3913 to address this.

3913

@CraigHead -- Craig, thank you for your contribution.

@VanMSFT, @vin-yu -- Van, Vin, please look into this issue and PRs 12703 & #3913.

@VanMSFT, @vin-yu -- Van, Vin, please look into this issue's PR 12703 and PR #3913.

Thanks @trbenning for bringing up this issue!

Thanks @CraigHead for making the appropriate changes!

Was this page helpful?
0 / 5 - 0 ratings