-
Notifications
You must be signed in to change notification settings - Fork 0
/
Post-Installation_Standards.sql
65 lines (45 loc) · 1.43 KB
/
Post-Installation_Standards.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
--Post Installtion Helper :
--==========================
-- To set a fixed amount of memory (Max memory on server 80% for SQL and 20% for OS)
EXEC sys.sp_configure N'show advanced options', N'1' RECONFIGURE WITH OVERRIDE
GO
EXEC sys.sp_configure N'max server memory (MB)', N'10240'
GO
RECONFIGURE WITH OVERRIDE
GO
-- MAXDOP and Cost Threshold for parallelism
EXEC sys.sp_configure N'show advanced options', N'1' RECONFIGURE WITH OVERRIDE
GO
EXEC sys.sp_configure N'cost threshold for parallelism', N'50'
GO
EXEC sys.sp_configure N'max degree of parallelism', N'1'
GO
RECONFIGURE WITH OVERRIDE
GO
EXEC sys.sp_configure N'show advanced options', N'0' RECONFIGURE WITH OVERRIDE
GO
--Optimize Ad Hoc Workloads
EXEC sp_configure 'optimize for ad hoc workloads', 1
--SQL Server Backup Compression default
EXEC sys.sp_configure N'backup compression default', N'1'
GO
-- Start Up parameters
--Check existing
SELECT
DSR.registry_key,
DSR.value_name,
DSR.value_data
FROM sys.dm_server_registry AS DSR
WHERE
DSR.registry_key LIKE N'%MSSQLServer\Parameters';
/*
-- Add new parameters
-T1222 -- Deadlock info
-T1118 -- Allocates a Uniform Extent
-T3226 -- Suppress log entries
*/
--Autogrowth Setting of DB
ALTER DATABASE [model] MODIFY FILE ( NAME = N'modeldev', SIZE = 262144KB )
GO
ALTER DATABASE [model] MODIFY FILE ( NAME = N'modellog', SIZE = 65536KB )
GO