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
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:
Post a Comment