To download the Northwind backup database file you can go Codeplex or Northwind database link, then unzip your downloaded file, you will see the Northwind.bak file or Northwind.sql script file. You need to login to your SQL Server, then right click on the database -> select Restore Database. I have download the NORTHWND.MDF file from the Microsoft website. And in visual studio I added an new connection in the server explorer. Connection string for Northwind.mdf. Mar 20, 2009 09:53 PM| RahulSoni. You are not attaching to a database file directly, but to the databases listed in your DB server. Hope this helps, Rahul Soni www.
Northwind sample database that can be downloaded as an executable sql script or as a backup that can be restored with sample data currently works with SQL Server 2000 to 2019. To download the Northwind backup database file you can go Codeplex or Northwind database link, then unzip your downloaded file, you will see the Northwind.bak file. Download Northwind and Pubs database files - 1.17 MB. The Northwind and Pubs sample databases are staples of other sample code on this and other development. Oct 23, 2007 HowTo: Install the Northwind and Pubs Sample Databases. Brian C Hart. Download Northwind and Pubs database files - 1.17 MB; Download Northwind and Pubs database files only (from MSDN) - 1,964.8 KB. The Northwind and Pubs sample databases are staples of other sample code on this and other development websites. They are used in.
I want to practice with some database that I want to use inside Visual Studio 2017.
I had Northwind.mdf
that I downloaded some time ago. But when I try to connect to it from VS2017 Servers panel, I get error message:
This database file is not compatible with the current instance of SQL Server.
Q1: Why?
Q2: Where and how do I know the version of Northwind.mdf
?
Q3: Where and how do I know which version of database is supported by VS2017?
Q4: I can create my own database in VS2017, but why I cannot use the existing database?
SQL Server only supports databases up to two versions ago, I don't know what version of SQL Server comes with VS2017 but I suppose that is at least SQL Server 2016 (you can check it using the query select @@version
), so it supports at most DB's from SQL Server 2012 and Northwind is for SQL Server 2000.
If you really, really want to use that database you have an upgrade path, is a bit cumbersome but is free (you should use a virtual machine for this if you can, I sometimes use the VM's that MS offer for testing IE for this sort of things):
Download and install SQL Server 2008 R2 Express, which is the last version that supports databases from SQL Server 2000. Import the database and make a full backup (you can also attach and detach the database files but I prefer to use backups).
If the version returned by
select @@version
if SQL Server 2016 or higher, download and install SQL Server 2014 Express. Restore the backup from 2008 to a new database and then make another backup of that database (if you are using this version just restore the backup in your current SQL Server and you are done).Finally, restore the 2014 backup in the SQL Server used by VS2017.
Note that is you already have SQL Management Studio (or it's integrated in VS2017) you don't need to install the previous versions, since it can connect to different SQL Server versions (if you do all the installs on your system you shouldn't install the previous versions of Management studio, take care of this). Also, if you are doing this in your system I recommend uninstall the step versions as soon as possible.
i have the same problem, i want to use the northwind in VS2017 environment.
(btw - w3scoolsuse this northwind db to teach sql (october 2018)
so i download the sql script from here, install it and run it from cmd in my computer
sqlcmd -S (localdb)mssqllocaldb -i InstNwnd.sql
This create db in my computer that i can access by sqlcmd, and by visual studio 2017.
If you want those files (without build it yourself) you can download it from my google drive ( i will upload it to github someday and change the link)