Monday, November 9, 2015

Creating Northwind sample database on SQL 2014

A while ago there was a situation where I needed the northwind database on SQL 2014 instance, which is originally available in SQL 2000 script format at

https://www.microsoft.com/en-us/download/details.aspx?id=23654

But the sp_dboptions system sp has been deprecated in SQL 2012 onwards so I needed to replace the following lines

--exec sp_dboption 'Northwind','trunc. log on chkpt.','true'
--exec sp_dboption 'Northwind','select into/bulkcopy','true'

with

ALTER DATABASE Northwind SET RECOVERY SIMPLE 
ALTER DATABASE Northwind SET RECOVERY BULK_LOGGED

And it works like a charm :)

More reference about the new commands can be found at http://beyondrelational.com/modules/2/blogs/28/Posts/15429/replacement-for-system-stored-procedure-spdboption-in-sql-server-2012-denali.aspx

No comments:

SSL Error - The connection for this site is not secure

 After cloning a git repo of dot net framework website and trying to run it all I could see was this error Turns out the fix was to simply e...