Search icon CANCEL
Arrow left icon
Explore Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Conferences
Free Learning
Arrow right icon
Arrow up icon
GO TO TOP
Hands-On SQL Server 2019 Analysis Services

You're reading from   Hands-On SQL Server 2019 Analysis Services Design and query tabular and multi-dimensional models using Microsoft's SQL Server Analysis Services

Arrow left icon
Product type Paperback
Published in Oct 2020
Publisher Packt
ISBN-13 9781800204768
Length 474 pages
Edition 1st Edition
Languages
Arrow right icon
Author (1):
Arrow left icon
Steven Hughes Steven Hughes
Author Profile Icon Steven Hughes
Steven Hughes
Arrow right icon
View More author details
Toc

Table of Contents (19) Chapters Close

Preface 1. Section 1: Choosing Your Model
2. Chapter 1: Analysis Services in SQL Server 2019 FREE CHAPTER 3. Chapter 2: Choosing the SQL Server 2019 Analytic Model for Your BI Needs 4. Section 2: Building and Deploying a Multidimensional Model
5. Chapter 3: Preparing Your Data for Multidimensional Models 6. Chapter 4: Building a Multidimensional Cube in SSAS 2019 7. Chapter 5: Adding Measures and Calculations with MDX 8. Section 3: Building and Deploying Tabular Models
9. Chapter 6: Preparing Your Data for Tabular Models 10. Chapter 7: Building a Tabular Model in SSAS 2019 11. Chapter 8: Adding Measures and Calculations with DAX 12. Section 4: Exposing Insights while Visualizing Data from Your Models
13. Chapter 9: Exploring and Visualizing Your Data with Excel 14. Chapter 10: Creating Interactive Reports and Enhancing Your Models in Power BI 15. Section 5: Security, Administration, and Managing Your Models
16. Chapter 11: Securing Your SSAS Models 17. Chapter 12: Common Administration and Maintenance Tasks 18. Other Books You May Enjoy

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:

  1. Open up SQL Server Management Studio.
  2. Connect to your SQL Server 2019 database instance.
  3. Right-click on the Databases folder and select Restore Database…:
    Figure 1.29 – Select Restore Database…

    Figure 1.29 – Select Restore Database…

  4. In the Restore Database… dialog, choose Device.
  5. 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.
  6. Once selected, your dialog should be filled in similar to the following:
    Figure 1.30 – Your dialog box should look like this

    Figure 1.30 – Your dialog box should look like this

  7. 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.

You have been reading a chapter from
Hands-On SQL Server 2019 Analysis Services
Published in: Oct 2020
Publisher: Packt
ISBN-13: 9781800204768
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at $19.99/month. Cancel anytime