Update: This article was from my old website. I am curating what I had posted there and will be reposting items here with any new content that is appropriate, and removing anything that is outdate. This post was originally from 2016. For this update - I am using a Mac Mini system I have, with 32GB of RAM, but limited hard drive space.
A quick one this time around.
Download a copy of the AdventureWorks database backup from Microsoft's Learn website on the system where you are running your Docker instance of SQL Server for Linux. Save it to the mssql\data folder.
Switch over to Azure Data Studio and reconnect to your server if you aren't already connected.
Expand the server name so you can see the Databases folder. Right click on that folder, and from the menu that appears, choose the Restore Database (Preview) option.
In the Restore Database (Preview) window, make sure you are on the General tab, In the Source section, switch the Restore from drop down to Backup file.
Click the button at the end of the Backup file path to open a navigator window labeled Select a File. This is a pseudo file structure imposed on the SQL instance, and does not represent the actual file structure of the machine. (That is why you need to save the backup in the mssql\data folder.) Scroll down until you find the opt entry. Open it by clicking on it, and drill down to the data folder. In there, you should see the AdventureWorks backup file you saved earlier.
Click on the file name and then OK.
The screen will update and the destination will display the Target database name,. Restore plan will also be filled in and checked. Click the RESTORE button at the bottom to run the process, which should only take a few seconds and you will be back to your normal window.
Congratulations! You have restored a copy of AdventureWorks!
BTW - SQL Server and AdventureWorks are items owned by Microsoft. Docker logo from Docker.com.
Comments
Post a Comment