Fix for sp_dboption in northwind-pubs if sqlversion>=12

This commit is contained in:
Artem Lavrenov
2018-11-02 23:08:34 +03:00
parent ba9b777053
commit 65c27abe8a
2 changed files with 6 additions and 1 deletions
Binary file not shown.
@@ -53,7 +53,12 @@ if db_name() <> 'pubs'
GO
execute sp_dboption 'pubs' ,'trunc. log on chkpt.' ,'true'
if CAST(SERVERPROPERTY('ProductMajorVersion') AS INT)<12
BEGIN
exec sp_dboption 'pubs','trunc. log on chkpt.','true'
exec sp_dboption 'pubs','select into/bulkcopy','true'
END
ELSE ALTER DATABASE [pubs] SET RECOVERY SIMPLE WITH NO_WAIT
GO
execute sp_addtype id ,'varchar(11)' ,'NOT NULL'