Skip to content

Commit 65c27ab

Browse files
author
Artem Lavrenov
committed
Fix for sp_dboption in northwind-pubs if sqlversion>=12
1 parent ba9b777 commit 65c27ab

2 files changed

Lines changed: 6 additions & 1 deletion

File tree

282 Bytes
Binary file not shown.

samples/databases/northwind-pubs/instpubs.sql

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,12 @@ if db_name() <> 'pubs'
5353

5454
GO
5555

56-
execute sp_dboption 'pubs' ,'trunc. log on chkpt.' ,'true'
56+
if CAST(SERVERPROPERTY('ProductMajorVersion') AS INT)<12
57+
BEGIN
58+
exec sp_dboption 'pubs','trunc. log on chkpt.','true'
59+
exec sp_dboption 'pubs','select into/bulkcopy','true'
60+
END
61+
ELSE ALTER DATABASE [pubs] SET RECOVERY SIMPLE WITH NO_WAIT
5762
GO
5863

5964
execute sp_addtype id ,'varchar(11)' ,'NOT NULL'

0 commit comments

Comments
 (0)