-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathCreateDatabase.sql
83 lines (83 loc) · 6.09 KB
/
CreateDatabase.sql
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
CREATE DATABASE [IntranetMacStats]
CONTAINMENT = NONE
ON PRIMARY
( NAME = N'IntranetMacStats', FILENAME = N'C:\Program Files\Microsoft SQL Server\MSSQL13.SQLEXPRESS\MSSQL\DATA\IntranetMacStats.mdf' , SIZE = 8192KB , FILEGROWTH = 65536KB )
LOG ON
( NAME = N'IntranetMacStats_log', FILENAME = N'C:\Program Files\Microsoft SQL Server\MSSQL13.SQLEXPRESS\MSSQL\DATA\IntranetMacStats_log.ldf' , SIZE = 8192KB , FILEGROWTH = 65536KB )
GO
ALTER DATABASE [IntranetMacStats] SET COMPATIBILITY_LEVEL = 130
GO
ALTER DATABASE [IntranetMacStats] SET ANSI_NULL_DEFAULT OFF
GO
ALTER DATABASE [IntranetMacStats] SET ANSI_NULLS OFF
GO
ALTER DATABASE [IntranetMacStats] SET ANSI_PADDING OFF
GO
ALTER DATABASE [IntranetMacStats] SET ANSI_WARNINGS OFF
GO
ALTER DATABASE [IntranetMacStats] SET ARITHABORT OFF
GO
ALTER DATABASE [IntranetMacStats] SET AUTO_CLOSE OFF
GO
ALTER DATABASE [IntranetMacStats] SET AUTO_SHRINK OFF
GO
ALTER DATABASE [IntranetMacStats] SET AUTO_CREATE_STATISTICS ON(INCREMENTAL = OFF)
GO
ALTER DATABASE [IntranetMacStats] SET AUTO_UPDATE_STATISTICS ON
GO
ALTER DATABASE [IntranetMacStats] SET CURSOR_CLOSE_ON_COMMIT OFF
GO
ALTER DATABASE [IntranetMacStats] SET CURSOR_DEFAULT GLOBAL
GO
ALTER DATABASE [IntranetMacStats] SET CONCAT_NULL_YIELDS_NULL OFF
GO
ALTER DATABASE [IntranetMacStats] SET NUMERIC_ROUNDABORT OFF
GO
ALTER DATABASE [IntranetMacStats] SET QUOTED_IDENTIFIER OFF
GO
ALTER DATABASE [IntranetMacStats] SET RECURSIVE_TRIGGERS OFF
GO
ALTER DATABASE [IntranetMacStats] SET DISABLE_BROKER
GO
ALTER DATABASE [IntranetMacStats] SET AUTO_UPDATE_STATISTICS_ASYNC OFF
GO
ALTER DATABASE [IntranetMacStats] SET DATE_CORRELATION_OPTIMIZATION OFF
GO
ALTER DATABASE [IntranetMacStats] SET PARAMETERIZATION SIMPLE
GO
ALTER DATABASE [IntranetMacStats] SET READ_COMMITTED_SNAPSHOT OFF
GO
ALTER DATABASE [IntranetMacStats] SET READ_WRITE
GO
ALTER DATABASE [IntranetMacStats] SET RECOVERY SIMPLE
GO
ALTER DATABASE [IntranetMacStats] SET MULTI_USER
GO
ALTER DATABASE [IntranetMacStats] SET PAGE_VERIFY CHECKSUM
GO
ALTER DATABASE [IntranetMacStats] SET TARGET_RECOVERY_TIME = 60 SECONDS
GO
ALTER DATABASE [IntranetMacStats] SET DELAYED_DURABILITY = DISABLED
GO
USE [IntranetMacStats]
GO
ALTER DATABASE SCOPED CONFIGURATION SET MAXDOP = 0;
GO
ALTER DATABASE SCOPED CONFIGURATION FOR SECONDARY SET MAXDOP = PRIMARY;
GO
ALTER DATABASE SCOPED CONFIGURATION SET LEGACY_CARDINALITY_ESTIMATION = OFF;
GO
ALTER DATABASE SCOPED CONFIGURATION FOR SECONDARY SET LEGACY_CARDINALITY_ESTIMATION = PRIMARY;
GO
ALTER DATABASE SCOPED CONFIGURATION SET PARAMETER_SNIFFING = ON;
GO
ALTER DATABASE SCOPED CONFIGURATION FOR SECONDARY SET PARAMETER_SNIFFING = PRIMARY;
GO
ALTER DATABASE SCOPED CONFIGURATION SET QUERY_OPTIMIZER_HOTFIXES = OFF;
GO
ALTER DATABASE SCOPED CONFIGURATION FOR SECONDARY SET QUERY_OPTIMIZER_HOTFIXES = PRIMARY;
GO
USE [IntranetMacStats]
GO
IF NOT EXISTS (SELECT name FROM sys.filegroups WHERE is_default=1 AND name = N'PRIMARY') ALTER DATABASE [IntranetMacStats] MODIFY FILEGROUP [PRIMARY] DEFAULT
GO