Installing the Northwinds Database with SQL Server 2012

As mentioned earlier, my new gig requires a lot more day-to-day work with SQL Server, including SSIS, SSRS, and SSDS. Since most tutorials use either the AdventureWorks database or the Northwinds database, you ought to have both in place if you want to get hands-on with the tutorials and sample out there.

In the last post, we downloaded and attached the AdventureWorks database to our SQL Server 2012 installation. In this post, we'll grab the Northwinds database and attach it to the same server.

Follow the steps below to obtain and install the Northwinds database.
  1. Open a web browser and go to http://www.microsoft.com/en-us/download/details.aspx?id=23654:
  2. Click the "Download" button and save the file SQL2000SampleDb.zip.
  3. Click on the file to run it. You'll be asked if you really want to run the installation:

    Click the "Run" button.
  4. Step through the prompts:








  5. You'll find that the installation has created a new folder, SQL Server 2000 Sample Databases, on your primary drive (usually C:).
  6. Open the folder. You'll find among other things to SQL scripts, instnwnd.sql and instpubs.sql:
  7. Edit each file, commenting out the lines referring to the stored procedure  sp_dboption, which was deprecated in SQL Server 2012.
  8. Save the edited files and run them. I started with the Northwind script, instnwnd.sql, and then followed up with the pubs script, instpubs.sql.
  9. If you run into any problems, then check the message(s) kicked back by the system. They'll tell you which lines were an issue and why. Correct the issues and rerun the scripts.
Once you're done, then you'll have two new databases, northwind and pubs.

Note: I can't take credit for figuring out the issue with the store procedure sp_dboption. I found the solution here. If you get time, then you ought to check out the rest of that blog; it's got lots of good stuff.

Comments

Popular posts from this blog

Using Reference Aliases

List of Visual Studio Keyboard Shortcuts