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:

c# httpclient The remote certificate is invalid according to the validation procedure: RemoteCertificateNameMismatch

 If we get this error while trying to get http reponse using HttpClient object, it could mean that certificate validation fails for the remo...