SlideShare une entreprise Scribd logo
1  sur  24
Télécharger pour lire hors ligne
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?

Contenu connexe

Tendances

Sql server 2012 dba online training
Sql server 2012 dba online trainingSql server 2012 dba online training
Sql server 2012 dba online training
sqlmasters
 

Tendances (20)

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

En vedette

Upgrading to SharePoint 2013
Upgrading to SharePoint 2013Upgrading to SharePoint 2013
Upgrading to SharePoint 2013
vmaximiuk
 

En vedette (7)

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

Similaire à SharePoint & SQL Server Working Together Efficiently

Tuning Your SharePoint Environment
Tuning Your SharePoint EnvironmentTuning Your SharePoint Environment
Tuning Your SharePoint Environment
vmaximiuk
 
Building the Perfect SharePoint 2010 Farm - MS Days Bulgaria 2012
Building the Perfect SharePoint 2010 Farm - MS Days Bulgaria 2012Building the Perfect SharePoint 2010 Farm - MS Days Bulgaria 2012
Building the Perfect SharePoint 2010 Farm - MS Days Bulgaria 2012
Michael Noel
 
Pre and post tips to installing sql server correctly
Pre and post tips to installing sql server correctlyPre and post tips to installing sql server correctly
Pre and post tips to installing sql server correctly
Antonios Chatzipavlis
 
Tipstricksandbestpracticesformanagingmicrosoftofficesharepointserver2007 0905...
Tipstricksandbestpracticesformanagingmicrosoftofficesharepointserver2007 0905...Tipstricksandbestpracticesformanagingmicrosoftofficesharepointserver2007 0905...
Tipstricksandbestpracticesformanagingmicrosoftofficesharepointserver2007 0905...
corin29
 

Similaire à SharePoint & SQL Server Working Together Efficiently (20)

Optimizing SQL Server 2012 for SharePoint 2013
Optimizing SQL Server 2012 for SharePoint 2013Optimizing SQL Server 2012 for SharePoint 2013
Optimizing SQL Server 2012 for SharePoint 2013
 
Sql Health in a SharePoint environment
Sql Health in a SharePoint environmentSql Health in a SharePoint environment
Sql Health in a SharePoint environment
 
Unity Connect - Getting SQL Spinning with SharePoint - Best Practices for the...
Unity Connect - Getting SQL Spinning with SharePoint - Best Practices for the...Unity Connect - Getting SQL Spinning with SharePoint - Best Practices for the...
Unity Connect - Getting SQL Spinning with SharePoint - Best Practices for the...
 
SharePoint 2010 database maintenance
SharePoint 2010 database maintenanceSharePoint 2010 database maintenance
SharePoint 2010 database maintenance
 
Investigate SQL Server Memory Like Sherlock Holmes
Investigate SQL Server Memory Like Sherlock HolmesInvestigate SQL Server Memory Like Sherlock Holmes
Investigate SQL Server Memory Like Sherlock Holmes
 
SPS Kansas City: What SharePoint Admin need to know about SQL
SPS Kansas City: What SharePoint Admin need to know about SQLSPS Kansas City: What SharePoint Admin need to know about SQL
SPS Kansas City: What SharePoint Admin need to know about SQL
 
Configuring sql server - SQL Saturday, Athens Oct 2014
Configuring sql server - SQL Saturday, Athens Oct 2014Configuring sql server - SQL Saturday, Athens Oct 2014
Configuring sql server - SQL Saturday, Athens Oct 2014
 
Optimize SQL server performance for SharePoint
Optimize SQL server performance for SharePointOptimize SQL server performance for SharePoint
Optimize SQL server performance for SharePoint
 
Introduction to SharePoint for SQLserver DBAs
Introduction to SharePoint for SQLserver DBAsIntroduction to SharePoint for SQLserver DBAs
Introduction to SharePoint for SQLserver DBAs
 
Get your SharePoint spinning with SQL Server
Get your SharePoint spinning with SQL ServerGet your SharePoint spinning with SQL Server
Get your SharePoint spinning with SQL Server
 
Optimization SQL Server for Dynamics AX 2012 R3
Optimization SQL Server for Dynamics AX 2012 R3Optimization SQL Server for Dynamics AX 2012 R3
Optimization SQL Server for Dynamics AX 2012 R3
 
Tuning Your SharePoint Environment
Tuning Your SharePoint EnvironmentTuning Your SharePoint Environment
Tuning Your SharePoint Environment
 
Building the Perfect SharePoint 2010 Farm - MS Days Bulgaria 2012
Building the Perfect SharePoint 2010 Farm - MS Days Bulgaria 2012Building the Perfect SharePoint 2010 Farm - MS Days Bulgaria 2012
Building the Perfect SharePoint 2010 Farm - MS Days Bulgaria 2012
 
ECMDay2015 - Kent Agerlund – Configuration Manager 2012 – A Site Review
ECMDay2015 - Kent Agerlund – Configuration Manager 2012 – A Site ReviewECMDay2015 - Kent Agerlund – Configuration Manager 2012 – A Site Review
ECMDay2015 - Kent Agerlund – Configuration Manager 2012 – A Site Review
 
Pre and post tips to installing sql server correctly
Pre and post tips to installing sql server correctlyPre and post tips to installing sql server correctly
Pre and post tips to installing sql server correctly
 
Building the Perfect SharePoint 2010 Farm - Sharing the Point South America
Building the Perfect SharePoint 2010 Farm - Sharing the Point South AmericaBuilding the Perfect SharePoint 2010 Farm - Sharing the Point South America
Building the Perfect SharePoint 2010 Farm - Sharing the Point South America
 
What SQL DBA's need to know about SharePoint-St. Louis 2013
What SQL DBA's need to know about SharePoint-St. Louis 2013What SQL DBA's need to know about SharePoint-St. Louis 2013
What SQL DBA's need to know about SharePoint-St. Louis 2013
 
What SharePoint Admins need to know about SQL-Cinncinati
What SharePoint Admins need to know about SQL-CinncinatiWhat SharePoint Admins need to know about SQL-Cinncinati
What SharePoint Admins need to know about SQL-Cinncinati
 
Taking SharePoint to the Cloud
Taking SharePoint to the CloudTaking SharePoint to the Cloud
Taking SharePoint to the Cloud
 
Tipstricksandbestpracticesformanagingmicrosoftofficesharepointserver2007 0905...
Tipstricksandbestpracticesformanagingmicrosoftofficesharepointserver2007 0905...Tipstricksandbestpracticesformanagingmicrosoftofficesharepointserver2007 0905...
Tipstricksandbestpracticesformanagingmicrosoftofficesharepointserver2007 0905...
 

Dernier

Why Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businessWhy Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire business
panagenda
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Safe Software
 
Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Victor Rentea
 
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
?#DUbAI#??##{{(☎️+971_581248768%)**%*]'#abortion pills for sale in dubai@
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Safe Software
 

Dernier (20)

Why Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businessWhy Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire business
 
Spring Boot vs Quarkus the ultimate battle - DevoxxUK
Spring Boot vs Quarkus the ultimate battle - DevoxxUKSpring Boot vs Quarkus the ultimate battle - DevoxxUK
Spring Boot vs Quarkus the ultimate battle - DevoxxUK
 
Cyberprint. Dark Pink Apt Group [EN].pdf
Cyberprint. Dark Pink Apt Group [EN].pdfCyberprint. Dark Pink Apt Group [EN].pdf
Cyberprint. Dark Pink Apt Group [EN].pdf
 
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWEREMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
 
Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...
Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...
Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processors
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdf
 
Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...
Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...
Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
 
Corporate and higher education May webinar.pptx
Corporate and higher education May webinar.pptxCorporate and higher education May webinar.pptx
Corporate and higher education May webinar.pptx
 
AWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of TerraformAWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of Terraform
 
Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024
 
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
 
"I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ..."I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ...
 
Exploring Multimodal Embeddings with Milvus
Exploring Multimodal Embeddings with MilvusExploring Multimodal Embeddings with Milvus
Exploring Multimodal Embeddings with Milvus
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
 
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
 
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdf
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdfRising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdf
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdf
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
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
  • 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