One last thing – our sample data
This is the final preparation piece before we build the Analysis Services models. We will be using the latest Microsoft sample database from Wide World Importers. The Wide World Importers data warehouse sample is a star schema database. While a number of cool features have been added and can be explored in the data warehouse, our focus is on source data for our Analysis Services models.
You can find the World Wide Importers sample databases on GitHub: https://github.com/Microsoft/sql-server-samples/releases/tag/wide-world-importers-v1.0. For our purposes, you only need the WideWorldImportersDW-Full.bak
file. If you are interested in the features for the transactional database, which is the actual source for the data warehouse, you can also download WideWorldImporters-Full.bak
. If you get both samples, you will need 10 GB of storage for the databases and a minimum of 1.5 GB of RAM to support them.
The sample databases use the latest features of SQL Server 2019
This is a warning for if you choose to install both databases on your server. Both use in-memory features, which could cause performance issues on your computer. These features are meant to highlight some of the latest features but can be resource-intensive. If this is a concern, you should not restore the transactional database at this time.
Once you have the backup file downloaded, I would recommend you move the file to the Backup
folder located where you selected during the install process. This folder will be easily discoverable from SSMS during the restore process. This is not required, but I find it a good practice in most cases.
Restoring the data warehouse backup
Let's restore the database now:
- Open up SQL Server Management Studio.
- Connect to your SQL Server 2019 database instance.
- Right-click on the Databases folder and select Restore Database…:
- In the Restore Database… dialog, choose Device.
- Then use the ellipses button to open a dialog box that will allow you to choose the
WideWorldImportersDW-Full.bak
file. Click Add to find your backup file. - Once selected, your dialog should be filled in similar to the following:
- Next, select OK. This will take some time, but you should see the restored database in Management Studio when the process is complete.
You can also use a script to restore the backup as shown here. You will need to replace
{YOUR PATH HERE}
with the location of your files:USE [master] RESTORE DATABASE [WideWorldImportersDW] FROM DISK = N'{YOUR PATH HERE}\MSSQL\Backup\WideWorldImportersDW-Full.bak' WITH FILE = 1, MOVE N'WWI_Primary' TO N'{YOUR PATH HERE}\MSSQL\DATA\WideWorldImportersDW.mdf', MOVE N'WWI_UserData' TO N'{YOUR PATH HERE}\MSSQL\DATA\WideWorldImportersDW_UserData.ndf', MOVE N'WWI_Log' TO N'{YOUR PATH HERE}\MSSQL\DATA\WideWorldImportersDW.ldf', MOVE N'WWIDW_InMemory_Data_1' TO N'{YOUR PATH HERE}\MSSQL\DATA\WideWorldImportersDW_InMemory_Data_1', DOWNLOAD, STATS = 5 GO
Whichever option you choose to use, this will result in a restored database for us to use in later chapters.