Install and configure WideWorldImportersDW sample database

Applies to: SQL Server Azure SQL Database Azure SQL Managed Instance Azure Synapse Analytics Analytics Platform System (PDW)

This article contains installation and configuration instructions for the WideWorldImportersDW database.

Prerequisites

Download

Download the sample WideWorldImportersDW database backup/BACPAC that corresponds to your edition of SQL Server or Azure SQL Database.

The latest release of the sample is available from wide-world-importers-release.

Source code to recreate the sample database is available from wide-world-importers-source. Data population is based on ETL from the OLTP database (WideWorldImporters).

Install

You can use SSMS to restore a backup to SQL Server, or import a BACPAC into a new Azure SQL database.

Restore a backup to a SQL Server instance using SSMS:

  1. Open SSMS and connect to the target SQL Server instance.
  2. Right-click on the Databases node, and select Restore Database.
  3. Select Device and select the ellipses button (...).
  4. In the dialog Select backup devices, select Add, navigate to the database backup in the filesystem of the server, and select the backup. Select OK.
  5. If needed, change the target location for the data and log files, in the Files pane. It is best practice to place data and log files on different drives.
  6. Select OK. This step initiates the database restore. After it completes, you will have the database WideWorldImporters installed on your SQL Server instance.

Configure PolyBase

Applies to: SQL Server 2016 (13.x) and later versions, Developer and Enterprise edition

The sample database can make use of PolyBase to query files in Hadoop or Azure Blob Storage. However, that feature isn't installed by default with SQL Server; you need to select it during SQL Server Setup. Therefore, a post-installation step is required.

  1. In SSMS, connect to the WideWorldImportersDW database and open a new query window.

  2. Run the following Transact-SQL command to enable the use of PolyBase in the database:

    EXECUTE [Application].[Configuration_ApplyPolyBase];