How to add Northwind sample database in the database

Disclaimer: This article is a blogger original article, follow the CC 4.0 BY-SA copyright agreement, reproduced, please attach the original source link and this statement.
This link: https://blog.csdn.net/cxh6863/article/details/94359214

There is a database Northwind sample database, but we generally do not install the database install, so when we need to use, how to build on the Northwind sample database installed in the database do?

(A) preparatory work

1. Download the file from the Internet SQL2000SampleDb.msi

URL: https://www.microsoft.com/en-us/download/confirmation.aspx?id=23654
Here Insert Picture Description

2, install the downloaded the msi

Here Insert Picture Description

Here Insert Picture Description

Here Insert Picture Description

3, this time will be in this path: C: \ see seven files in SQL Server 2000 Sample Databases

Here Insert Picture Description

(B) adding the sample database Northwind

Ready to do a good job, so you can add the Northwind database in the database, and there are two ways

1, additional database mode

(1) Open the data, right-click, click Additional

Here Insert Picture Description

(2) Click Add, locate NORTHWND.MDF, be determined

Here Insert Picture Description

Here Insert Picture Description
I use this method to add a database Northwind, encountered some problems, first because access is not enough (error 5120), this time converted to full control of the authority NORTHWND.MDF files just fine, because the version of the problem (Error 950) , I installed the database version 2014, and 2000 versions of the file is, in order to solve this problem, you need to first change its own version of the database to do transfer 2008, after adding back in 2014, but this method is somewhat complicated trouble, there is a simple way is instnwnd.sql file can directly execute the file.

2, execute SQL way

Drag instnwnd.sql find the database, you can execute
Here Insert Picture Description
Here Insert Picture Description

Guess you like

Origin blog.csdn.net/cxh6863/article/details/94359214