Setup WideWorldImporters sample database Development Environment
This lab will demonstrate how to setup your local database development environment with the sample development database.
DevOps MPP Course Source
- This lab is used in course DevOps200.6x: DevOps for Databses - Module 1.
- Visual Studio 2017
- Local SQL Server 2016 installation (optional)
- SQL Server Management Studio
- SQL Server 2016 SP1 installed locally
- Download WideWorldImporters sample database
- Restore multiple copies of the database
Estimated Lab Time:
- approx. 30 minutes
Task 1: Download WideWorldImporters sample database
In this step, you will get the sample database from the official Microsoft repository.
The Microsoft Database Sample Database repository is located at https://github.com/Microsoft/sql-server-samples/. This is the location for all sample databases.
We will be using the WideWorldImporters sample database, so naviate to https://github.com/Microsoft/sql-server-samples/releases/tag/wide-world-importers-v1.0 to find the various versions of WideWorldImporters that are available for download.
Download the Azure SQL Database Standard tier .bacpac file for the OLTP version. Since we will deploy to Azure SQL database and use LocalDB, we want this file: WideWorldImporters-Standard.bacpac.
This should be located on the page below the SQL Server 2016 SP1 versions and Azure SQL Database Premium tier samples.
Save this file in a location on your local machine.
Task 2: Restore multiple copies of the database
In this step, you will restore the various development copies that are needed for future labs.
Start SQL Server Management Studio
Connect to your LocalDB instance. The address, by default for Visual Studio 2017, is: (localdb)\ProjectsV13. The connection dialog is shown below:
In Object Explorer, right-click the Databases folder and click Import Data-tier Application, as shown below.
Skip the first dialog of the wizard by clicking Next
On the Import Settings page of the wizard, ensure the Import from local disk radio button is selected. Click the Browse button and navigate to the location of the WideWorldImporters-Standard.bacpac file that you downloaded in the first part of this lab.
Click Next to continue.
On the Database Settings page, change the New database name text box to WideWorldImporters-SSDT. The data file path and log file path default to the AppData folder under your local user. Leave these at the defaults.
Review the Summary page, then click Finish.
On the Results page, when processing finishes, all items should show success. Click Close once you have reviewed this page.
Verify that the database has been created by expanding the Databases folder in Object Explorer. There should be a database named WideWorldImporters-SSDT
Repeat steps 3-9 to create another new database named WideWorldImporters-RR
In this lab you have downloaded the WideWorldImporters sample database from the official Microsoft repository and restored the various development copies that are needed for future labs.