The document discusses optimizing SQL Server for use with SharePoint. It recommends separating disks for temporary databases, logs, and data files. Memory allocation should leave some for the operating system. TempDB files should match the number of CPUs and use RAID-10. Model database settings impact all SharePoint databases. Common SharePoint database maintenance includes rebuilding indexes regularly and using the SharePoint Health Analyzer rules.
Axa Assurance Maroc - Insurer Innovation Award 2024
SharePoint & SQL Server Working Together Efficiently
1. SharePoint & SQL Server
Working Together
Efficiently
Veenus Maximiuk
SharePoint Architect
ICC
2. About Me
Veenus Maximiuk, MCSA, MCITP, MCTS, MCPD, vTS
SharePoint Managing Architect
ICC
spvee.wordpress.com
@SharePointVee
Linkedin.com/in/vmaximiuk
vmaximiuk@icct.com
I’m a SharePoint geek.
I know enough about SQL from SharePoint
perspective.
I’m NOT a SQL DBA.
2
10. Memory acquired is NOT released
Unless OS reports memory pressure
Dynamic
memory
management
Min server memory
Min amount that SQL Server process may
trim in event of memory pressure
Max server memory
• Max amount that SQL Sever process
can allocate to the buffer pool
• Recommend to set to total MB minus
OS + app overhead
10
11. Memory to
Leave for OS
SQL Server Max
Server Memory
16GB
4GB
12GB
32GB
Memory
Allocation
Physical
Memory
Setting
6GB
26GB
The general recommendation
is to always set Max Server
Memory and to leave some
memory to always be available
for the OS.
SQL server will give back memory
SQL Max Memory = TotalPhyMem - (NumOfSQLThreads * ThreadStackSize) - (1GB * CEILING(NumOfCores/4))
64GB
8GB
56GB
if OS 0)
NumOfSQLThreads = 256 + (NumOfProcessors*- 4) * 8 (* If NumOfProcessors > 4, elsememory runs low but there
can be OS memory stress if SQL
ThreadStackSize = 2MB on x64 or 4 MB on 64-bit (IA64)
128GB
16GB
112GB
256GB
16GB
240GB
does not respond fast enough to
sudden memory demands from
other processes on the system.
11
12. TempDB files
Same number of
data files as CPUs
Max of 8
Use RAID-10
Pre-size TempDB
files
Set Auto Growth to
Fixed size <200 MB
Only one
transaction log file
25% of largest DB size
SELECT * FROM
sys.dm_os_schedulers
12
14. MAXDOP for
SharePoint must be 1
Max Degree
of Parallelism
Error message
when creating new
SP2013 farms
Controls the number of
processors that can be used
to run a single SQL Server
statement
11/24/2013
14
21. SharePoint
Health
Analyzer
Rules
SharePoint maintains the index health
Stored Procedures proc_UpdateStatistics and
proc_DefragmentIndices in some database
Otherwise include in database maintenance plans
•
•
•
•
•
•
•
•
Search Administration, Analytics, Links Databases
Secure Store Database
State Service Database
Profile Sync Database
Usage Database
Managed Metadata Database
Business Connectivity Services Database
PerformancePoint Services Database
21
23. “Undocumented
feature”
SharePoint databases copy only initial settings
Autogrow settings are not copied
Settings from model database apply to ALL
SharePoint databases
Unsupported
DBCC CHECKDB WITH REPAIR
AUTO_CREATE_STATS
AUTO_UPDATE_STATS
Don’t forget
Leave autogrowth on
Don’t shrink transaction logs
Auto create statistics modifies DB schema
Upgrade will break
11/24/2013
23