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.

20 comments:

  1. Hi -

    No bak file for sql server 2008.
    Can you please look into it.

    Thanks,
    Anirban

    ReplyDelete
  2. Hi,
    When restoring database on sql server 2008, getting the error "Specified cast is not valid. (SqlManagerUI)"

    Any help appreciated..

    Thanks,
    Amar

    ReplyDelete
  3. Thank you for making this available. However, When I try to restore it to 2008 R2, I get the error message "Object cannot be cast from DBNull to other types. (mscorlib)".

    Would appreciate any guidance.

    Thanks

    ReplyDelete
  4. I just noticed that all the links point to the same file, which is the 2014 version. I'm sure once those links are fixed it will work fine.

    ReplyDelete
  5. Hello all,
    I've updated the links for SQL 2012 and 2008 so they point to the correct backup files now. Make sure to grab the appropriate file for the version of SQL you have otherwise you will run into problems during the restore process.

    Thanks,
    David

    ReplyDelete
  6. After clicking on the SQL Server 2012 link above, I am told that the security certificate for the website is being used by another website, and I am not allowed to continue. Is there another way to get the sample db?

    ReplyDelete
  7. This comment has been removed by a blog administrator.

    ReplyDelete
  8. Restore your Entire Database with Cognegic's Simple DB Recovery Support
    Feeling stressed? Due to by mistakenly deletion of your database? If yes, by then consider our extraordinary among other help i.e. DB Recovery Support or Exchange Database Recovery. Here we give complete Backup Recovery of your entire database including MongoDB, Cassandra, MySQL, and MS SQL Server and so on. Here we will help you to examine, screen and check the execution of your database and give high-availability and streamline your database. You can particularly contact to our specific pros and request your inquiries.
    For More Info: https://cognegicsystems.com/
    Contact Number: 1-800-450-8670
    Email Address- info@cognegicsystems.com
    Company’s Address- 507 Copper Square Drive Bethel Connecticut (USA) 06801

    ReplyDelete
  9. Thanks for sharing the valuable information. Your article gave me a lot of information. We at Techno Data Group would like to introduce to you about our organization. We are the leading database providers for b2b marketing across the globe. we provide you with the readymade as well as the personalized email list and connect you with the right client or decision-makers. Please refer our Technology Mailing List for further details.

    ReplyDelete
  10. Thanks for sharing nice information with us. i like your post and all you share with us is uptodate and quite informative, i would like to bookmark the page so i can come here again to read you, as you have done a wonderful job. Email lists

    ReplyDelete
  11. Really loved this course! When doing some of your performance analysis queries, you mentioned you had a "load generation script" you'd run to simulate system usage. I would love to see how you do that. I didn't see that in the course exercise materials on PluralSight, and I didn't see it here on your blog. I think HammerDB might be able to do this too, but I'd love to see how *you* did it.

    ReplyDelete
  12. Very Useful stuff, Such an informative blog. Thank you for sharing this unique details.
    database development company


    ReplyDelete
  13. I believe there are many more pleasurable opportunities ahead for individuals that looked at your site.
    Best CRM System

    ReplyDelete
  14. I feel SQL and other such tools and database management system tools really help provide more and more aspects of complex IT solutions.

    SQL Server Load Soap API

    ReplyDelete
  15. Thanks for this post...Elegant Training of SQL Server Course Dubai will help you gain a full understanding of this universal programming language. You'll start by learning key concepts and move on to more advanced topics as you progress through the lessons. By the end of the series, you'll have a solid working knowledge of SQL.
    Graphic Designing Course in Dubai
    best web Development courses Dubai
    Programming Languages Course Dubai

    ReplyDelete
  16. Hello,

    There are LAST FEW DAYS to get our smash hit data sets with investment funds…
    …you won't get it at this cost at any point in the future.
    So I need to ensure you know…

    This is an uncommon chance for you to get your hands on to our most well known information bases that are intended to develop your business quicker and all the more without any problem…
    What's more, as usual, our offers accompany a level half OFF on email arrangements of your decision.

    It's just straightforward.
    So don't pass up a major opportunity… If you're searching for more traffic, leads, and deals without burning through every last cent, go to https://emailproleads.com 1.2M Australia Business Email Database [2022] to figure out additional!

    I desire to hear from you soon!
    To your outcome in 2022 and then some,
    Emailproleads.com

    ReplyDelete
  17. Very Nice Information " Sample Database for what Every" Please keep sharing! Importers in India

    ReplyDelete