Created
January 30, 2021 09:59
-
-
Save DominicWatts/87fae474e4c1095d34ec04185cae761e to your computer and use it in GitHub Desktop.
Open mssql bak in linux
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Steps | |
- install Azure data studio | |
- docker container | |
- copy file | |
- connect | |
- import | |
- inspect | |
# Azure Data Studio | |
https://docs.microsoft.com/en-us/sql/azure-data-studio/download-azure-data-studio?view=sql-server-ver15 | |
# Docker Image | |
https://hub.docker.com/_/microsoft-mssql-server | |
# Install Azure Data Studio | |
https://go.microsoft.com/fwlink/?linkid=2151506 | |
# Docker container | |
# copy file | |
docker run -d --name sql1 -e 'ACCEPT_EULA=Y' -e 'SA_PASSWORD=StrongPwd1234567' -p 1433:1433 microsoft/mssql-server-linux | |
docker start sql1 | |
docker exec -d sql1 mkdir /var/opt/mssql/backup | |
docker cp dbname.bak sql1:/var/opt/mssql/backup | |
# connect | |
Connection type: Microsoft SQL Server | |
Server: localhost | |
User name: sa | |
Password: StrongPwd1234567 | |
# import | |
Open the SERVERS, right-click and select Manage. | |
Restore on the Tasks widget | |
File | |
/var/opt/mssql/backup | |
# inspect |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Great cheat sheet, thank you!
But there needs to be
instead of