SlideShare a Scribd company logo
SharePoint & SQL Server
Working Together
Efficiently
Veenus Maximiuk
SharePoint Architect
ICC
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
Session Goals

Consolidate your
knowledge and hopefully
learn something new

SharePoint Admins and
SQL DBAs speak the same
language ”SharePoint”

3
Agenda

Did you know...

Optimize SQL
Server instance

Optimize server for
SQL

SharePoint
SQL
best practices

4
Optimize server for
SQL

5
Disk layouts

TempDB

Logs

Database

OS

Backup

Prioritize

Separate drives for
different purposes

Prioritize for faster
disk
• TempDB
• Logs
• Database

6
Storage
Disk block
size

SQL Server pages are 8k in
size

Extents are a collection of
eight pages

Format drives with 64k
allocation unit

7
Antivirus
exclusions

File types to exclude:
•
•
•
•

*.mdf
*.ndf
*.ldf
*.bak

Clustering also exclude:
• <$windir>/cluster
• Witness quorum disk
(if deployed)

8
Optimize SQL Server
instance

9
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
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
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
Model
database file
settings

•
•

SharePoint databases are
based off Model
Consider changing the
settings

13
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
Other “Stuff”

Instance collation
Latin1_General_CI_AS_KS_WS

Windows
authentication

Auto shrink set to
off

(case-insensitive, accent-sensitive, Kana-sensitive, and width-sensitive)

Access Services requires
Mixed Mode!

Otherwise causes high
fragmentation

11/24/2013

Set Fill Factor to 80

15
Demo

Optimize SQL Server instance
SharePoint
SQL
best practices

17
To alias or
not to alias

SQL Aliases

18
Naming
standards

A standard is better
than no standard

No GUIDS

Consider multiple
Farms and
environments

19
Detecting
index
fragmentation

Use ALTER INDEX
(REBUILD or
REORGANIZE) to
defrag indexes

20
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
Did you know…

22
“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
Questions?

More Related Content

PPTX
SQL Server 2014 New Features (Sql Server 2014 Yenilikleri)
PPTX
Fard Solutions Sdn Bhd
PPTX
JSSUG: SQL Sever Performance Tuning
PPT
Sql And Storage Considerations For Share Point Server 2010
PPSX
MS SQL Server 2008, Implementation and Maintenance
PPTX
Diving into sql server 2016
PDF
2013-07-24 - CapArea.NET SSIG - SharePoint 2013, A Brief Capability Overview ...
PPTX
How SQL Server 2016 SP1 Changes the Game
SQL Server 2014 New Features (Sql Server 2014 Yenilikleri)
Fard Solutions Sdn Bhd
JSSUG: SQL Sever Performance Tuning
Sql And Storage Considerations For Share Point Server 2010
MS SQL Server 2008, Implementation and Maintenance
Diving into sql server 2016
2013-07-24 - CapArea.NET SSIG - SharePoint 2013, A Brief Capability Overview ...
How SQL Server 2016 SP1 Changes the Game

What's hot (20)

PPTX
SQL Server 2016 New Features and Enhancements
PDF
Azure sql database limitations
PDF
SQL Server 2016 Editions
PPTX
Azure cosmos db, Azure no-SQL database,
PPTX
SQL Server 2016: Just a Few of Our DBA's Favorite Things
PPTX
Sql server 2016 it just runs faster sql bits 2017 edition
PPTX
SQL Azure
PPTX
Geek Sync | How to Be the DBA When You Don't Have a DBA - Eric Cobb | IDERA
PDF
Microsoft SQL Server 2012 Components and Tools (Quick Overview) - Rev 1.3
PPTX
Inside SQL Server In-Memory OLTP
PPTX
Real Time Operational Analytics with Microsoft Sql Server 2016 [Liviu Ieran]
PPTX
Sql server 2012 dba online training
PPTX
Everything you need to know about SQL Server 2016
PPTX
Performance Eye for the SQL Guy
PDF
Azure Boot Camp 21.04.2018 SQL Server in Azure Iaas PaaS on-prem Lars Platzdasch
PDF
Modernizing your database with SQL Server 2019
PPTX
Azure storage
PPTX
Azure intoduksjon for it pro 02 data protection public
PPTX
Experience sql server on l inux and docker
PPTX
Geek Sync | SQL Security Principals and Permissions 101
SQL Server 2016 New Features and Enhancements
Azure sql database limitations
SQL Server 2016 Editions
Azure cosmos db, Azure no-SQL database,
SQL Server 2016: Just a Few of Our DBA's Favorite Things
Sql server 2016 it just runs faster sql bits 2017 edition
SQL Azure
Geek Sync | How to Be the DBA When You Don't Have a DBA - Eric Cobb | IDERA
Microsoft SQL Server 2012 Components and Tools (Quick Overview) - Rev 1.3
Inside SQL Server In-Memory OLTP
Real Time Operational Analytics with Microsoft Sql Server 2016 [Liviu Ieran]
Sql server 2012 dba online training
Everything you need to know about SQL Server 2016
Performance Eye for the SQL Guy
Azure Boot Camp 21.04.2018 SQL Server in Azure Iaas PaaS on-prem Lars Platzdasch
Modernizing your database with SQL Server 2019
Azure storage
Azure intoduksjon for it pro 02 data protection public
Experience sql server on l inux and docker
Geek Sync | SQL Security Principals and Permissions 101
Ad

Viewers also liked (7)

PDF
Upgrading to SharePoint 2013
PDF
SharePoint 2013 Hosted-Apps (On-Premises) - Infrastructure Setup
PDF
Exploring SharePoint 2013 - From an IT Pro Perspective
PDF
SharePoint Storage Best Practices
PPTX
SPSMadrid Get sql spinning with SharePoint. Best practice for the back end
PPT
Large Scale SQL Considerations for SharePoint Deployments
PPTX
User Profiles: I Didn't Know I Could Do That!! @SPSHI
Upgrading to SharePoint 2013
SharePoint 2013 Hosted-Apps (On-Premises) - Infrastructure Setup
Exploring SharePoint 2013 - From an IT Pro Perspective
SharePoint Storage Best Practices
SPSMadrid Get sql spinning with SharePoint. Best practice for the back end
Large Scale SQL Considerations for SharePoint Deployments
User Profiles: I Didn't Know I Could Do That!! @SPSHI
Ad

Similar to SharePoint & SQL Server Working Together Efficiently (20)

PPTX
Unity Connect - Getting SQL Spinning with SharePoint - Best Practices for the...
PPTX
Get your SharePoint spinning with SQL Server
PDF
SQL Server and SharePoint - Best Practices presented by Steffen Krause, Micro...
PPTX
Sql Server Tuning for SharePoint : what every consultant must know (Office 36...
PPTX
What SharePoint Admins need to know about SQL-Cinncinati
PPTX
SPS Kansas City: What SharePoint Admin need to know about SQL
PPTX
What SQL DBAs need to know about SharePoint-Indianapolis 2013
PPTX
Optimize SQL server performance for SharePoint
PPTX
Espc17 make your share point fly by tuning and optimising sql server
PPTX
Make your SharePoint fly by tuning and optimizing SQL Server
PPTX
What SQL DBA's need to know about SharePoint
PPTX
What SQL DBA's need to know about SharePoint-St. Louis 2013
PPTX
Sql Health in a SharePoint environment
PPTX
What SQL DBAs need to know about SharePoint
PPTX
SharePoint Saturday St. Louis 2014: What SharePoint Admins need to know about...
PPTX
What SQL DBAs need to know about SharePoint-Kansas City, Sept 2013
PPTX
Effective SharePoint Architecture - SharePoint Saturday Stockholm 2016
PPTX
Infrastructure Best Practices for SharePoint On-Premises presented by Michael...
PPTX
SPSAD - Ultimate SharePoint Infrastructure Best Practices Session - SharePoin...
PPTX
SPSSV 2013 - Ultimate SharePoint Infrastructure Best Practices Session
Unity Connect - Getting SQL Spinning with SharePoint - Best Practices for the...
Get your SharePoint spinning with SQL Server
SQL Server and SharePoint - Best Practices presented by Steffen Krause, Micro...
Sql Server Tuning for SharePoint : what every consultant must know (Office 36...
What SharePoint Admins need to know about SQL-Cinncinati
SPS Kansas City: What SharePoint Admin need to know about SQL
What SQL DBAs need to know about SharePoint-Indianapolis 2013
Optimize SQL server performance for SharePoint
Espc17 make your share point fly by tuning and optimising sql server
Make your SharePoint fly by tuning and optimizing SQL Server
What SQL DBA's need to know about SharePoint
What SQL DBA's need to know about SharePoint-St. Louis 2013
Sql Health in a SharePoint environment
What SQL DBAs need to know about SharePoint
SharePoint Saturday St. Louis 2014: What SharePoint Admins need to know about...
What SQL DBAs need to know about SharePoint-Kansas City, Sept 2013
Effective SharePoint Architecture - SharePoint Saturday Stockholm 2016
Infrastructure Best Practices for SharePoint On-Premises presented by Michael...
SPSAD - Ultimate SharePoint Infrastructure Best Practices Session - SharePoin...
SPSSV 2013 - Ultimate SharePoint Infrastructure Best Practices Session

Recently uploaded (20)

PDF
Chapter 3 Spatial Domain Image Processing.pdf
PDF
Diabetes mellitus diagnosis method based random forest with bat algorithm
PPTX
Effective Security Operations Center (SOC) A Modern, Strategic, and Threat-In...
PPTX
MYSQL Presentation for SQL database connectivity
PDF
Review of recent advances in non-invasive hemoglobin estimation
PDF
Electronic commerce courselecture one. Pdf
PDF
7 ChatGPT Prompts to Help You Define Your Ideal Customer Profile.pdf
PDF
Shreyas Phanse Resume: Experienced Backend Engineer | Java • Spring Boot • Ka...
PPT
“AI and Expert System Decision Support & Business Intelligence Systems”
PPTX
VMware vSphere Foundation How to Sell Presentation-Ver1.4-2-14-2024.pptx
PDF
NewMind AI Weekly Chronicles - August'25 Week I
PDF
Per capita expenditure prediction using model stacking based on satellite ima...
PDF
Reach Out and Touch Someone: Haptics and Empathic Computing
PDF
Bridging biosciences and deep learning for revolutionary discoveries: a compr...
PPTX
PA Analog/Digital System: The Backbone of Modern Surveillance and Communication
PDF
Architecting across the Boundaries of two Complex Domains - Healthcare & Tech...
PDF
Peak of Data & AI Encore- AI for Metadata and Smarter Workflows
PDF
How UI/UX Design Impacts User Retention in Mobile Apps.pdf
PDF
Blue Purple Modern Animated Computer Science Presentation.pdf.pdf
PDF
Network Security Unit 5.pdf for BCA BBA.
Chapter 3 Spatial Domain Image Processing.pdf
Diabetes mellitus diagnosis method based random forest with bat algorithm
Effective Security Operations Center (SOC) A Modern, Strategic, and Threat-In...
MYSQL Presentation for SQL database connectivity
Review of recent advances in non-invasive hemoglobin estimation
Electronic commerce courselecture one. Pdf
7 ChatGPT Prompts to Help You Define Your Ideal Customer Profile.pdf
Shreyas Phanse Resume: Experienced Backend Engineer | Java • Spring Boot • Ka...
“AI and Expert System Decision Support & Business Intelligence Systems”
VMware vSphere Foundation How to Sell Presentation-Ver1.4-2-14-2024.pptx
NewMind AI Weekly Chronicles - August'25 Week I
Per capita expenditure prediction using model stacking based on satellite ima...
Reach Out and Touch Someone: Haptics and Empathic Computing
Bridging biosciences and deep learning for revolutionary discoveries: a compr...
PA Analog/Digital System: The Backbone of Modern Surveillance and Communication
Architecting across the Boundaries of two Complex Domains - Healthcare & Tech...
Peak of Data & AI Encore- AI for Metadata and Smarter Workflows
How UI/UX Design Impacts User Retention in Mobile Apps.pdf
Blue Purple Modern Animated Computer Science Presentation.pdf.pdf
Network Security Unit 5.pdf for BCA BBA.

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
  • 3. Session Goals Consolidate your knowledge and hopefully learn something new SharePoint Admins and SQL DBAs speak the same language ”SharePoint” 3
  • 4. Agenda Did you know... Optimize SQL Server instance Optimize server for SQL SharePoint SQL best practices 4
  • 6. Disk layouts TempDB Logs Database OS Backup Prioritize Separate drives for different purposes Prioritize for faster disk • TempDB • Logs • Database 6
  • 7. Storage Disk block size SQL Server pages are 8k in size Extents are a collection of eight pages Format drives with 64k allocation unit 7
  • 8. Antivirus exclusions File types to exclude: • • • • *.mdf *.ndf *.ldf *.bak Clustering also exclude: • <$windir>/cluster • Witness quorum disk (if deployed) 8
  • 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
  • 13. Model database file settings • • SharePoint databases are based off Model Consider changing the settings 13
  • 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
  • 15. Other “Stuff” Instance collation Latin1_General_CI_AS_KS_WS Windows authentication Auto shrink set to off (case-insensitive, accent-sensitive, Kana-sensitive, and width-sensitive) Access Services requires Mixed Mode! Otherwise causes high fragmentation 11/24/2013 Set Fill Factor to 80 15
  • 18. To alias or not to alias SQL Aliases 18
  • 19. Naming standards A standard is better than no standard No GUIDS Consider multiple Farms and environments 19
  • 20. Detecting index fragmentation Use ALTER INDEX (REBUILD or REORGANIZE) to defrag indexes 20
  • 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