The SQL Server database used in the prior recipes is available as a backup from the online content for this book on the Packt Publishing website. This backup can be restored to the SQL server instance (running SQL Server 2012).
We do not specify details for the installation of SQL Server (since they are outside the scope of this book). However, a brief overview of the database restore is discussed in this section.
An evaluation version of SQL Server is available for download at the following URL. This license will expire after 180 days. Alternatively, a free edition of SQL Server (SQL Server Express) is also available (with reduced features and no license expiry limit).
http://www.microsoft.com/betaexperience/pd/SQL2012EvalCTA/enus/default.aspx
The online resources contain two files. Firstly, a file named tabular_modelling.bak
, which is the database backup. The second is the file that contains the restore script. It is also reproduced as follows:
USE [master] RESTORE DATABASE tabular_modelling FROM DISK = N'C:\BOOK\SQLDATA\tabular_modelling.bak' WITH FILE = 1 , MOVE N'tabular_modelling' TO N'C:\BOOK\SQLDATA\tabular_modelling.mdf' , MOVE N'tabular_modelling_log' TON'C:\BOOK\SQLDATA\tabular_modelling.ldf' , NOUNLOAD, REPLACE, STATS = 5 GO
This code assumes that the backup file has been stored in the C:\BOOK\SQLDATA
directory. Additionally, the database files that are created will also be created in this directory. Running the code from SQL Server Management Studio will create the database and restore all its data.
The output of executing the script should look like the following screenshot:
If the folders used on your computer are different, the directories in the script should be changed accordingly. It should also be noted that SQL Server does not require its data (or log files) to be stored in specific folders, so the choice of C:\BOOK\SQLDATA
as a data folder may be suitable.