Sunday, February 28, 2016

Sample Database for "What Every Developer Should Know About SQL Server Performance"

To download the sample database for 'What Every Developer Should Know About SQL Server Performance", use the link below that corresponds to your version of SQL Server.



Once you have the file downloaded, unzip the file.  Then, in SQL Server Management Studio, right click on the databases folder and select "Restore Database".  In the dialog box, choose "Device" and locate the "Students.bak" file you just unzipped.  Follow the prompts and the database will be restored to your system.

Using bcp to Import Data Instead

If you have trouble with the backup file, or just prefer to import your data directly, I've put together a zip file of the raw data exported out using the SQL Server bcp utility.  In this file, I have a readme.txt file that tells the exact steps to bring the data in, but basically, you will do the following:

  1. Go into Management Studio and create a new database called Students.
  2. Run the included Students-Schema.sql file in Management Studio to create all of the schema objects (tables)
  3. At a command prompt, run a series of bcp commands to bring the data into SQL Server.  In the file, there is a list of all the commands you need to run in the correct order.  
The link to the bcp file is here: Students Data as bcp Export


Either way, the result is to same, the data will get into your database and give you an opportunity to play around.