Get the sample databases for ADO.NET code samples

A number of examples and walkthroughs in the LINQ to SQL documentation use sample SQL Server databases and SQL Server Express. You can download these products free of charge from Microsoft.

Get the Northwind sample database for SQL Server

Download the script instnwnd.sql from the following GitHub repository to create and load the Northwind sample database for SQL Server:

Northwind and pubs sample databases for Microsoft SQL Server

Before you can use the Northwind database, you have to run the downloaded instnwnd.sql script file to recreate the database on an instance of SQL Server by using SQL Server Management Studio or a similar tool. Follow the instructions in the Readme file in the repository.

Tip

If you're looking for the Northwind database for Microsoft Access, see Install the Northwind sample database for Microsoft Access.

Get the Northwind sample database for Microsoft Access

The Northwind sample database for Microsoft Access is not available on the Microsoft Download Center. To install Northwind directly from within Access, do the following things:

  1. Open Access.

  2. Enter Northwind in the Search for Online Templates box, and then select Enter.

  3. On the results screen, select Northwind. A new window opens with a description of the Northwind database.

  4. In the new window, in the File Name text box, provide a filename for your copy of the Northwind database.

  5. Select Create. Access downloads the Northwind database and prepares the file.

  6. When this process is complete, the database opens with a Welcome screen.

Get the AdventureWorks sample database for SQL Server

Download the AdventureWorks sample database for SQL Server from the following GitHub repository:

AdventureWorks sample databases

After you download one of the database backup (*.bak) files, restore the backup to an instance of SQL Server by using SQL Server Management Studio (SSMS). See Get SQL Server Management Studio.

Get SQL Server Management Studio

If you want to view or modify a database that you've downloaded, you can use SQL Server Management Studio (SSMS). Download SSMS from the following page:

Download SQL Server Management Studio (SSMS)

You can also view and manage databases in the Visual Studio integrated development environment (IDE). In Visual Studio, connect to the database from SQL Server Object Explorer, or create a Data Connection to the database in Server Explorer. Open these explorer panes from the View menu.

Get SQL Server Express

SQL Server Express is a free, entry-level edition of SQL Server that you can redistribute with applications. Download SQL Server Express from the following page:

SQL Server Express Edition

If you're using Visual Studio, SQL Server Express LocalDB is included in the free Community edition of Visual Studio, as well as the Professional and higher editions.

See also