How to Download and Restore Northwind database to SQL Server
By FoxLearn 2/12/2025 2:05:31 AM 41.62K
What is the Northwind database?
The Northwind database is a sample database provided with Microsoft Office suite. It contains sales data for a fictitious company called Northwind Trader, which specializes in exporting and importing foods.
How to create a Northwind database?
The Northwind database can be downloaded either as an executable SQL script or as a backup file (.bak) for easy restoration. It includes sample data and is compatible with SQL Server 2005, 2008, 2012, 2014, 2016, 2017, 2019, and 2024.
How to download Northwind database?
To download the Northwind backup database file you can use the northwind download database .bak link below.
After downloading the file, unzip it to find the Northwind.bak
download file or the Northwind.sql
script file.
Northwind.bak.zip
- Backup of the Northwind database for SQL Server 2005, 2008, 2012, 2014, 2016, 2017, 2019, and 2024. Extract the file, then use the Restore Database option in SQL Server Management Studio to restore the database.Northwind.sql.zip
- Northwind database creation script for SQL Server 2005, 2008, 2012, 2014, 2016, 2017, 2019, and 2024. First, create a database namedNorthwind
in your SQL Server. Then, extract the file, open the SQL script in SQL Server Management Studio, and press F5 to execute.
Alternatively, you can run the following command (example):
sqlcmd -S localhost -d Northwind -i D:\Sql\Northwind.sql
You can easily find the northwind database sample in the extracted folder.
Northwind DB Schema
Backup of Northwind database SQL Server
How to restore northwind database in SQL Server?
First, Launch SSMS and connect to your SQL Server instance.
If you haven't installed SSMS, you can download it directly: Download
Once installed, Open SSMS and connect to your SQL Server instance by entering the necessary credentials.
In SSMS, right-click on the Databases node in the Object Explorer, and select Restore Database.
Enter your database name that you want to restore
In the Restore Database dialog
Choose Device under the Source section, then click on the ... button to browse to the location where your Northwind.bak file is stored.
Click OK to select the file, and then proceed to Restore.
Finally, Click OK button to finish restore mssql database from bak file.
If you downloaded the .sql script instead of the .bak file, follow these steps to install the Northwind database.
How to Install Northwind Database to SQL Server?
First, create a new database in SQL Server.
You can do this in SSMS by right-clicking on Databases and selecting New Database.
Name the database Northwind
.
In SSMS, open a new Query Window.
Next, Open the downloaded .sql
script.
Execute the script by clicking the Execute button (or pressing F5
).
- How to set time to 00:00:00 with GETDATE() in SQL
- How to fix 'The transaction log for the database is full due to ACTIVE_TRANSACTION'
- How to use ROW_NUMBER Function in SQL Server
- How to Convert varchar to uniqueidentifier in SQL Server
- How to convert varchar to integer in MySQL
- How to change ‘Edit Top 200 Rows’ and ‘Select Top 1000 Rows’ in SQL
- How to fix 'The transaction log for the database is null due to OLDEST_PAGE'
- How to convert timestamp to date in SQL Server