SlideShare a Scribd company logo
May 7th, 2016
SharePoint Saturday
Madrid
Getting SQL Spinning with SharePoint –
Best Practices for the Back End
Knut Relbe-Moe
Knut Relbe-Moe
Chief Technical Architect
Advania Knowledge Factory
http://sharepointblog.no
@shareptkarm
Knut is a Office Server & Services MVP, Nintex vTE, SharePoint and migration expert,
conference speaker and blogger. Knut is MCSE SharePoint, MCSA Office 365 and MCT.
He delivers both engaging keynotes and highly technical sessions (level 400) on many
different subjects in the Office 365 space. His job as an architect is to engage people and
companies in evaluating and adopting new technologies as well as running key projects
as a consultant. His core competence is to explain complex scenarios and make it
understandable by combining technical insight and business value.
Gold sponsors
Silver sponsors
Bronze sponsors
Collaborate
Okay… Something is wrong with this picture…
MS SQL Server is like the brain of your SharePoint
environment
So if the brain works slow, everything else will be
slow….
99.9% of SharePoint content stored in SQL Server
 Farm Configuration information stored in configuration db
 Central Administration content stored in seperate content db
 Most Service Applications have at least one db
 All Web Applications have at least one content db
How to fix this
 Follow the guidelines in this presentation
 Read and understand this whitepaper from Vlad Catrienscu
 Maximizing SQL 2012 Performance for SharePoint 2013 WhitePaper
 If you have to reinstall MS SQL server as a new instance with the correct
settings.
Agenda
 Foundamentals
 13 tips to get your SQL Spinning
 Summary
SPSMadrid Get sql spinning with SharePoint. Best practice for the back end
SQL Server configuration
For SharePoint 2013:
• SQL Server 2008 R2 SP1
• SQL Server 2012 (SP1 for BI)
• SQL Server 2014 (SP2013 SP1 & April CU)
For SharePoint 2016:
• SQL Server 2014
• SQL Server 2016
Use a dedicated instance
Run the service with a Managed account
•No specific permission
Use named
instances
 SharePoint
SPSMadrid Get sql spinning with SharePoint. Best practice for the back end
Physical SQL Server will always outperform a virtual SQL server with the
same specs, but what shall you choose.
Pros :
High availability because of the hypervisor, not because of clustering
Easier to scale up & down
Can be easier to recover at Disaster Recovery
Cons:
Very heavily loaded VMs have seen disk I/O issues
Over allocation of a virtual host. If you have too much running on a host, it's not just I/O that could be impacted.
Harder to protect
Physical vs Virtual
SPSMadrid Get sql spinning with SharePoint. Best practice for the back end
DISKS
 You should invest in as fast disk as possible
 If you run on a Virtual Server, consider physical disks for the SQL server
 SSD or SAN
 If you have physical SQL server you should use at least 6 Disks:
1. TempDB
2. TempDB Logs
3. SharePoint Databases
4. SharePoint Databases Logs
5. OS
6. SQL binaries and other application Installs
DISKS
• You have a farm where most of the content is only read and downloaded
• Your users will be collaborating, uploading documents, content
Speed/Scenario Read Intensive Scenario (ex Public Website)
Fastest Tempdb data files and transaction logs
. Database data files
. Search databases, except for the Search administration database
Slowest Database transaction log files
Speed/Scenario Write Intensive Scenario ( collaborative workspace)
Fastest Tempdb data files and transaction logs
. Database transaction log files
. Search databases, except for the Search administration database
Slowest Database data files
SPSMadrid Get sql spinning with SharePoint. Best practice for the back end
RAM & CPU
• Your SQL Server needs to have enough RAM to function properly.
• If your SQL Server runs only SharePoint, here are the minimum
requirements
Small Farm
Deployment
(0-500GB of
Data)
Medium
Farm
Deployment
(501-1TB of
data)
Large Farm
Deployment
(1-2TB of
Data)
Very Large
Farm Deployment
(2-5 TB of Data)
Special
Cases
Ram
Required
8GB 16GB 32 GB 64GB 64GB+
CPU 4 4 8 8 8
SPSMadrid Get sql spinning with SharePoint. Best practice for the back end
DISKS
 SQL server reads and writes 64k at a time
 So change your allocation size from the 4K default to 64K.
 This small change alone, will improve your SQL performance by up to
30%
Use chkdsk
<drive>to Verify
Use Format to Configure:
• Format <drive> /Q /FS:NTFS /A:64K /V:<volume>
/Y
SPSMadrid Get sql spinning with SharePoint. Best practice for the back end
Server Configuration – Collation
 SharePoint server 2013 is built to use Latin1_General_CI_AS_KS_WS. This
is a quote from Microsoft to prove it:
 “We support any CI collation for the SQL instance (for master, tempdb
databases). However we recommend using
Latin1_General_CI_AS_KS_WS as the instance default collation (master,
tempdb databases).”
 CI – (Case Insensitive) A and a ARE treated as the same character.
 AS – (Accent Sensitive) a and á are NOT treated as the same character.
 KS – (Kana Sensitive) Japanese Hirakana and Katakana characters which look the same are NOT treated as
the same character.
 WS – (Width Sensitive) Single-Byte and Double-Byte versions of the same character are NOT treated as
the same character.
Server Configuration
For SharePoint 2013:
• SQL Server 2008 R2 SP1
• SQL Server 2012 (SP1 for BI)
• SQL Server 2014 (SP2013 SP1 & April CU)
For SharePoint 2016:
• SQL Server 2014
• SQL Server 2016
Use named
instances
 SharePoint
Use a dedicated
instance
Run the service
with a Managed
account
•No specific permission
Server Configuration
Use alias for the connection string
• Client alias or DNS alias (preferred)
Good practice : every SP Content db must be created (and documented) by a DBA
after a strict capacity plan
Server Configuration
Use alias for the connection string
• Client alias or DNS alias (preferred)
Good practice : every SP Content db must be created (and documented) by a DBA
after a strict capacity plan
Server Configuration
 Backups
 Compression
SPSMadrid Get sql spinning with SharePoint. Best practice for the back end
Thomas Larock from SQL Rockstar explains this:
SQL Server (and other database systems such as Oracle and Sybase)
need to read data pages into their internal memory before they can be
used. Of course your server needs memory to operate as well. When
your database engine and your server are competing for the same
memory resources, you get bad performance. You want your server and
your database engine to be like dancing partners, and less like my kids
fighting over the last cupcake.
Max Memory
SPSMadrid Get sql spinning with SharePoint. Best practice for the back end
Optimize TempdB
 Split across n locations
 N = total number of physical cores > super myth
 All temp files need to have the same size
 Size of largest content dB or 10 % of Total Content DB’s Size whichever is bigger
 The fastest disk possible | Place on a different Drive than the Content Database
 Simple Recovery mode
 Place on Different Drive Than Content Databases
Model Database
 SQL Server uses the Model database as a template for creating new
user databases
 So therefor make sure that Model database have correct initial size and
growth settings.
 The log should be around 25% of the initial size.
 The auto growth is your insurance policy if your current database size has been reached.
Script
SPSMadrid Get sql spinning with SharePoint. Best practice for the back end
Auto Create Statistics
 Do not enable auto-create statistics on a server that hosts SQL Server
and SharePoint Server
 Enabling auto-create statistics is not supported for SharePoint Server
SPSMadrid Get sql spinning with SharePoint. Best practice for the back end
USE “DBA” created databases
 Sizing
 Autogrowth
 DO NOT USE SIMPLE RECOVERY
 Unless you understand the implications
SPSMadrid Get sql spinning with SharePoint. Best practice for the back end
Maintenance Plan
 Create a maintenance plan to backup databases, rebuild indexes and
checking the logical and physical integrity of your database
 Make sure you don’t run backup when heavy timer jobs runs in the
SharePoint environment, like midnight
Recovery mode
Model db : recovery
model = full
Tempdb : recovery
model = simple
SharePoint DB :
recovery model ?
Contend DB = full Config DB= simple
Services App DBs= it
depends :
•http://technet.micro
soft.com/en-
us/library/cc678868.
aspx
SPSMadrid Get sql spinning with SharePoint. Best practice for the back end
Script your SQL Server installation
 https://sqlserverfinebuild.codeplex.com/
SPSMadrid Get sql spinning with SharePoint. Best practice for the back end
Always install SQL Alias in SharePoint
Use alias for the connection string
• Client alias or DNS alias (preferred)
SPSMadrid Get sql spinning with SharePoint. Best practice for the back end
Using SQL Server Resource Governor to optimize
Search Database usage
 Part of SQL Server Enterprise (since SQL 2008)
 Limits CPU and memory usage on some DBs (and IO in SQL
Server 2014)
 like search DBs
 Allow less CPU & mem & IO usage during work hours
 Allow more CPU & mem & IO usage during off hours
SPSMadrid Get sql spinning with SharePoint. Best practice for the back end
10 simple tips to maximize performance
http://www.sharepointblog.no/?p=85
1. SSD Disk or better
2. Formating disk with 64K
3. Language corralation Latin_CI_AS_KS_WS
4. Maximum memory
5. Changed Sizes on Model database
6. Default fill factor to 80
7. Switched of autocreate statistics
8. Max Degree of Parallelism – set to 1 (it has to be)
9. Changed Initial Size & Autogrow on temp database, and created extra temp files for the amount
of processors.
10. Don’t do backups at midnight.
Maximizing SQL 2012 Performance for SharePoint 2013 WhitePaper by Vlad Catrinescu
Questions?
@shareptkarm
Office Server &
Services
Knut Relbe-Moe
Chief Technical Architect
Knut.relbe-moe@knowledgefactory.com
shareptkarm@outlook.com
Gold sponsors
Silver sponsors
Bronze sponsors
Collaborate
Raffle
Please, fill your SPS Madrid passport if
you want to participate.
You must get signature from sponsors
and complete the poll.
Give us the passport at 6:00 PM in the
Auditorium room.
You can win one Sphero BB-8 or a mini
drone:

More Related Content

What's hot (14)

PPTX
SQLIO - measuring storage performance
valerian_ceaus
 
PPTX
Hardware planning & sizing for sql server
Davide Mauri
 
PPTX
SQL Server 2014 New Features (Sql Server 2014 Yenilikleri)
BT Akademi
 
PPTX
Introduction to SQL Server Internals: How to Think Like the Engine
Brent Ozar
 
PPT
An overview of snowflake
Sivakumar Ramar
 
PPTX
Azure Databases with IaaS
Kellyn Pot'Vin-Gorman
 
PPTX
Amazon Aurora Getting started Guide -level 0
kartraj
 
PPTX
Brk3043 azure sql db intelligent cloud database for app developers - wash dc
Bob Ward
 
PDF
SQL Server 2016 Editions
Onomi
 
PDF
Migrating and Running DBs on Amazon RDS for Oracle
Maris Elsins
 
PPTX
JSSUG: SQL Sever Performance Tuning
Kenichiro Nakamura
 
PPTX
SQL Server 2016: Just a Few of Our DBA's Favorite Things
Hostway|HOSTING
 
PPTX
What SQL DBAs need to know about SharePoint
J.D. Wade
 
PPTX
What's new in SQL Server 2017
Hasan Savran
 
SQLIO - measuring storage performance
valerian_ceaus
 
Hardware planning & sizing for sql server
Davide Mauri
 
SQL Server 2014 New Features (Sql Server 2014 Yenilikleri)
BT Akademi
 
Introduction to SQL Server Internals: How to Think Like the Engine
Brent Ozar
 
An overview of snowflake
Sivakumar Ramar
 
Azure Databases with IaaS
Kellyn Pot'Vin-Gorman
 
Amazon Aurora Getting started Guide -level 0
kartraj
 
Brk3043 azure sql db intelligent cloud database for app developers - wash dc
Bob Ward
 
SQL Server 2016 Editions
Onomi
 
Migrating and Running DBs on Amazon RDS for Oracle
Maris Elsins
 
JSSUG: SQL Sever Performance Tuning
Kenichiro Nakamura
 
SQL Server 2016: Just a Few of Our DBA's Favorite Things
Hostway|HOSTING
 
What SQL DBAs need to know about SharePoint
J.D. Wade
 
What's new in SQL Server 2017
Hasan Savran
 

Viewers also liked (6)

PDF
SharePoint Storage Best Practices
Mark Ginnebaugh
 
PPT
Large Scale SQL Considerations for SharePoint Deployments
Joel Oleson
 
PPTX
UnityConnect - Office 365 Groups Deep Dive With Planner
Knut Relbe-Moe [MVP, MCT]
 
PPTX
SEF Unity Connect 2016 Office 365 Groups
Knut Relbe-Moe [MVP, MCT]
 
PPTX
SPSToronto: SharePoint 2016 - Hybrid, right choice for you and your organizat...
Knut Relbe-Moe [MVP, MCT]
 
PPTX
WF 101 - SharePoint Designer 2013 Workflows: An Introduction
Knut Relbe-Moe [MVP, MCT]
 
SharePoint Storage Best Practices
Mark Ginnebaugh
 
Large Scale SQL Considerations for SharePoint Deployments
Joel Oleson
 
UnityConnect - Office 365 Groups Deep Dive With Planner
Knut Relbe-Moe [MVP, MCT]
 
SEF Unity Connect 2016 Office 365 Groups
Knut Relbe-Moe [MVP, MCT]
 
SPSToronto: SharePoint 2016 - Hybrid, right choice for you and your organizat...
Knut Relbe-Moe [MVP, MCT]
 
WF 101 - SharePoint Designer 2013 Workflows: An Introduction
Knut Relbe-Moe [MVP, MCT]
 
Ad

Similar to SPSMadrid Get sql spinning with SharePoint. Best practice for the back end (20)

PPTX
Get your SharePoint spinning with SQL Server
Knut Relbe-Moe [MVP, MCT]
 
PDF
Introduction to SharePoint for SQLserver DBAs
Steve Knutson
 
PPT
Sql And Storage Considerations For Share Point Server 2010
Mike Watson
 
PDF
SQL Server and SharePoint - Best Practices presented by Steffen Krause, Micro...
European SharePoint Conference
 
PPTX
SPS Kansas City: What SharePoint Admin need to know about SQL
J.D. Wade
 
PPTX
1. SQL Server forSharePoint geeksA gentle introductionThomas Vochten • Septem...
BIWUG
 
PPTX
Sql Server Tuning for SharePoint : what every consultant must know (Office 36...
serge luca
 
PPTX
Espc17 make your share point fly by tuning and optimising sql server
Isabelle Van Campenhoudt
 
PPTX
Make your SharePoint fly by tuning and optimizing SQL Server
serge luca
 
PPTX
What SQL DBAs need to know about SharePoint-Indianapolis 2013
J.D. Wade
 
PPTX
What SQL DBAs need to know about SharePoint-Kansas City, Sept 2013
J.D. Wade
 
PPTX
What SQL DBA's need to know about SharePoint
J.D. Wade
 
PPTX
Optimize SQL server performance for SharePoint
serge luca
 
PPTX
What SQL DBA's need to know about SharePoint-St. Louis 2013
J.D. Wade
 
PPTX
What SharePoint Admins need to know about SQL-Cinncinati
J.D. Wade
 
PPTX
SharePoint Saturday St. Louis 2014: What SharePoint Admins need to know about...
J.D. Wade
 
PPTX
Sql Health in a SharePoint environment
Enrique Lima
 
PPTX
SharePoint Performance
Jeroen Schoenmakers
 
PDF
Tuning Sql Server for SharePoint--- Community Day Belgium 2013
Isabelle Van Campenhoudt
 
PPTX
SharePoint Intelligence Real World Business Workflow With Share Point Designe...
Ivan Sanders
 
Get your SharePoint spinning with SQL Server
Knut Relbe-Moe [MVP, MCT]
 
Introduction to SharePoint for SQLserver DBAs
Steve Knutson
 
Sql And Storage Considerations For Share Point Server 2010
Mike Watson
 
SQL Server and SharePoint - Best Practices presented by Steffen Krause, Micro...
European SharePoint Conference
 
SPS Kansas City: What SharePoint Admin need to know about SQL
J.D. Wade
 
1. SQL Server forSharePoint geeksA gentle introductionThomas Vochten • Septem...
BIWUG
 
Sql Server Tuning for SharePoint : what every consultant must know (Office 36...
serge luca
 
Espc17 make your share point fly by tuning and optimising sql server
Isabelle Van Campenhoudt
 
Make your SharePoint fly by tuning and optimizing SQL Server
serge luca
 
What SQL DBAs need to know about SharePoint-Indianapolis 2013
J.D. Wade
 
What SQL DBAs need to know about SharePoint-Kansas City, Sept 2013
J.D. Wade
 
What SQL DBA's need to know about SharePoint
J.D. Wade
 
Optimize SQL server performance for SharePoint
serge luca
 
What SQL DBA's need to know about SharePoint-St. Louis 2013
J.D. Wade
 
What SharePoint Admins need to know about SQL-Cinncinati
J.D. Wade
 
SharePoint Saturday St. Louis 2014: What SharePoint Admins need to know about...
J.D. Wade
 
Sql Health in a SharePoint environment
Enrique Lima
 
SharePoint Performance
Jeroen Schoenmakers
 
Tuning Sql Server for SharePoint--- Community Day Belgium 2013
Isabelle Van Campenhoudt
 
SharePoint Intelligence Real World Business Workflow With Share Point Designe...
Ivan Sanders
 
Ad

More from Knut Relbe-Moe [MVP, MCT] (20)

PPTX
Knut relbe moe - teams-tips
Knut Relbe-Moe [MVP, MCT]
 
PPTX
How to build a Project Hub with Hubsites and Sitedesign and Sitescripts
Knut Relbe-Moe [MVP, MCT]
 
PPTX
Mobility with Office 365 How to make use of it (different apps) in your organ...
Knut Relbe-Moe [MVP, MCT]
 
PPTX
How to build a Project Hub with Hubsites and Sitedesign and Sitescripts
Knut Relbe-Moe [MVP, MCT]
 
PPTX
How hubsites raise SharePoint Intranet potential
Knut Relbe-Moe [MVP, MCT]
 
PPTX
How hubsites raise SharePoints intranet potential
Knut Relbe-Moe [MVP, MCT]
 
PPTX
SPSNYC: How Hub Sites Raise SharePoint's Intranet Potential
Knut Relbe-Moe [MVP, MCT]
 
PPTX
How to automate the SharePoint Provisioning
Knut Relbe-Moe [MVP, MCT]
 
PPTX
Can you build a Intranet with Modern SharePoint
Knut Relbe-Moe [MVP, MCT]
 
PPTX
Knut wf 203 get started with designer workflows
Knut Relbe-Moe [MVP, MCT]
 
PPTX
SharePoint 2016 The Future is Hybrid, what you need to know about it
Knut Relbe-Moe [MVP, MCT]
 
PPTX
Migrate from Lotus Notes to SharePoint 2013 or SharePoint Online - Tips, Tric...
Knut Relbe-Moe [MVP, MCT]
 
PPTX
How to create a Windows app with Project Siena, SharePoint and Office 365
Knut Relbe-Moe [MVP, MCT]
 
PPTX
ESPC15 Power BI - The New Way to Quickly Build Powerful Dashboards (Level 300)
Knut Relbe-Moe [MVP, MCT]
 
PPTX
ESPC15 Th30 Microsoft Office 365 Groups Deep Dive
Knut Relbe-Moe [MVP, MCT]
 
PPTX
SharePoint Migrering unngå fallgruver
Knut Relbe-Moe [MVP, MCT]
 
PPTX
How to Create a Windows App with Project Siena, SharePoint & Office 365
Knut Relbe-Moe [MVP, MCT]
 
PPTX
Legacy SharePoint Platform Migrations (2003/2007)
Knut Relbe-Moe [MVP, MCT]
 
PPTX
How to create a Windows app with Project Siena, SharePoint and Office 365
Knut Relbe-Moe [MVP, MCT]
 
PPTX
Speakers slidedeckwidescreen sp-biz
Knut Relbe-Moe [MVP, MCT]
 
Knut relbe moe - teams-tips
Knut Relbe-Moe [MVP, MCT]
 
How to build a Project Hub with Hubsites and Sitedesign and Sitescripts
Knut Relbe-Moe [MVP, MCT]
 
Mobility with Office 365 How to make use of it (different apps) in your organ...
Knut Relbe-Moe [MVP, MCT]
 
How to build a Project Hub with Hubsites and Sitedesign and Sitescripts
Knut Relbe-Moe [MVP, MCT]
 
How hubsites raise SharePoint Intranet potential
Knut Relbe-Moe [MVP, MCT]
 
How hubsites raise SharePoints intranet potential
Knut Relbe-Moe [MVP, MCT]
 
SPSNYC: How Hub Sites Raise SharePoint's Intranet Potential
Knut Relbe-Moe [MVP, MCT]
 
How to automate the SharePoint Provisioning
Knut Relbe-Moe [MVP, MCT]
 
Can you build a Intranet with Modern SharePoint
Knut Relbe-Moe [MVP, MCT]
 
Knut wf 203 get started with designer workflows
Knut Relbe-Moe [MVP, MCT]
 
SharePoint 2016 The Future is Hybrid, what you need to know about it
Knut Relbe-Moe [MVP, MCT]
 
Migrate from Lotus Notes to SharePoint 2013 or SharePoint Online - Tips, Tric...
Knut Relbe-Moe [MVP, MCT]
 
How to create a Windows app with Project Siena, SharePoint and Office 365
Knut Relbe-Moe [MVP, MCT]
 
ESPC15 Power BI - The New Way to Quickly Build Powerful Dashboards (Level 300)
Knut Relbe-Moe [MVP, MCT]
 
ESPC15 Th30 Microsoft Office 365 Groups Deep Dive
Knut Relbe-Moe [MVP, MCT]
 
SharePoint Migrering unngå fallgruver
Knut Relbe-Moe [MVP, MCT]
 
How to Create a Windows App with Project Siena, SharePoint & Office 365
Knut Relbe-Moe [MVP, MCT]
 
Legacy SharePoint Platform Migrations (2003/2007)
Knut Relbe-Moe [MVP, MCT]
 
How to create a Windows app with Project Siena, SharePoint and Office 365
Knut Relbe-Moe [MVP, MCT]
 
Speakers slidedeckwidescreen sp-biz
Knut Relbe-Moe [MVP, MCT]
 

Recently uploaded (20)

PDF
Mining RACE Newsletter 10 - first half of 2025
Mining RACE
 
PPTX
Sample pitch deck: know what to keep in your pitch deck (for competitions only)
Ujjwaal G
 
PPTX
BARRIERS TO EFFECTIVE COMMUNICATION.pptx
shraddham25
 
PDF
Medical Technology Corporation: Supply Chain Strategy
daretruong
 
PPTX
A brief History of counseling in Social Work.pptx
Josaya Injesi
 
PDF
Cloud Computing Service Availability.pdf
chakrirocky1
 
PPTX
Inspired by VeinSense: Supercharge Your Hackathon with Agentic AI
ShubhamSharma2528
 
PPTX
some leadership theories MBA management.pptx
rkseo19
 
PPTX
Pastor Bob Stewart Acts 21 07 09 2025.pptx
FamilyWorshipCenterD
 
PPT
Wireless Communications Course lecture1.ppt
abdullahyaqot2015
 
PDF
From 0 to Gemini: a Workshop created by GDG Firenze
gdgflorence
 
PPTX
2025-07-13 Abraham 07 (shared slides).pptx
Dale Wells
 
PPTX
A Mother's Love - Helen Steiner Rice.pptx
AlbertoTierra
 
PPTX
AI presentation for everyone in every fields
dodinhkhai1
 
PDF
Generalization predition MOOCs - Conference presentation - eMOOCs 2025
pmmorenom01
 
PPTX
Food_and_Drink_Bahasa_Inggris_Kelas_5.pptx
debbystevani36
 
PPTX
Bob Stewart Humble Obedience 07-13-2025.pptx
FamilyWorshipCenterD
 
PDF
What should be in a Leadership and Motivation Plan?
Writegenic AI
 
PDF
FINAL ZAKROS - UNESCO SITE CANDICACY - PRESENTATION - September 2024
StavrosKefalas1
 
PPTX
677697609-States-Research-Questions-Final.pptx
francistiin8
 
Mining RACE Newsletter 10 - first half of 2025
Mining RACE
 
Sample pitch deck: know what to keep in your pitch deck (for competitions only)
Ujjwaal G
 
BARRIERS TO EFFECTIVE COMMUNICATION.pptx
shraddham25
 
Medical Technology Corporation: Supply Chain Strategy
daretruong
 
A brief History of counseling in Social Work.pptx
Josaya Injesi
 
Cloud Computing Service Availability.pdf
chakrirocky1
 
Inspired by VeinSense: Supercharge Your Hackathon with Agentic AI
ShubhamSharma2528
 
some leadership theories MBA management.pptx
rkseo19
 
Pastor Bob Stewart Acts 21 07 09 2025.pptx
FamilyWorshipCenterD
 
Wireless Communications Course lecture1.ppt
abdullahyaqot2015
 
From 0 to Gemini: a Workshop created by GDG Firenze
gdgflorence
 
2025-07-13 Abraham 07 (shared slides).pptx
Dale Wells
 
A Mother's Love - Helen Steiner Rice.pptx
AlbertoTierra
 
AI presentation for everyone in every fields
dodinhkhai1
 
Generalization predition MOOCs - Conference presentation - eMOOCs 2025
pmmorenom01
 
Food_and_Drink_Bahasa_Inggris_Kelas_5.pptx
debbystevani36
 
Bob Stewart Humble Obedience 07-13-2025.pptx
FamilyWorshipCenterD
 
What should be in a Leadership and Motivation Plan?
Writegenic AI
 
FINAL ZAKROS - UNESCO SITE CANDICACY - PRESENTATION - September 2024
StavrosKefalas1
 
677697609-States-Research-Questions-Final.pptx
francistiin8
 

SPSMadrid Get sql spinning with SharePoint. Best practice for the back end

  • 1. May 7th, 2016 SharePoint Saturday Madrid Getting SQL Spinning with SharePoint – Best Practices for the Back End Knut Relbe-Moe
  • 2. Knut Relbe-Moe Chief Technical Architect Advania Knowledge Factory http://sharepointblog.no @shareptkarm Knut is a Office Server & Services MVP, Nintex vTE, SharePoint and migration expert, conference speaker and blogger. Knut is MCSE SharePoint, MCSA Office 365 and MCT. He delivers both engaging keynotes and highly technical sessions (level 400) on many different subjects in the Office 365 space. His job as an architect is to engage people and companies in evaluating and adopting new technologies as well as running key projects as a consultant. His core competence is to explain complex scenarios and make it understandable by combining technical insight and business value.
  • 4. Okay… Something is wrong with this picture…
  • 5. MS SQL Server is like the brain of your SharePoint environment
  • 6. So if the brain works slow, everything else will be slow….
  • 7. 99.9% of SharePoint content stored in SQL Server  Farm Configuration information stored in configuration db  Central Administration content stored in seperate content db  Most Service Applications have at least one db  All Web Applications have at least one content db
  • 8. How to fix this  Follow the guidelines in this presentation  Read and understand this whitepaper from Vlad Catrienscu  Maximizing SQL 2012 Performance for SharePoint 2013 WhitePaper  If you have to reinstall MS SQL server as a new instance with the correct settings.
  • 9. Agenda  Foundamentals  13 tips to get your SQL Spinning  Summary
  • 11. SQL Server configuration For SharePoint 2013: • SQL Server 2008 R2 SP1 • SQL Server 2012 (SP1 for BI) • SQL Server 2014 (SP2013 SP1 & April CU) For SharePoint 2016: • SQL Server 2014 • SQL Server 2016 Use a dedicated instance Run the service with a Managed account •No specific permission Use named instances SharePoint
  • 13. Physical SQL Server will always outperform a virtual SQL server with the same specs, but what shall you choose. Pros : High availability because of the hypervisor, not because of clustering Easier to scale up & down Can be easier to recover at Disaster Recovery Cons: Very heavily loaded VMs have seen disk I/O issues Over allocation of a virtual host. If you have too much running on a host, it's not just I/O that could be impacted. Harder to protect Physical vs Virtual
  • 15. DISKS  You should invest in as fast disk as possible  If you run on a Virtual Server, consider physical disks for the SQL server  SSD or SAN  If you have physical SQL server you should use at least 6 Disks: 1. TempDB 2. TempDB Logs 3. SharePoint Databases 4. SharePoint Databases Logs 5. OS 6. SQL binaries and other application Installs
  • 16. DISKS • You have a farm where most of the content is only read and downloaded • Your users will be collaborating, uploading documents, content Speed/Scenario Read Intensive Scenario (ex Public Website) Fastest Tempdb data files and transaction logs . Database data files . Search databases, except for the Search administration database Slowest Database transaction log files Speed/Scenario Write Intensive Scenario ( collaborative workspace) Fastest Tempdb data files and transaction logs . Database transaction log files . Search databases, except for the Search administration database Slowest Database data files
  • 18. RAM & CPU • Your SQL Server needs to have enough RAM to function properly. • If your SQL Server runs only SharePoint, here are the minimum requirements Small Farm Deployment (0-500GB of Data) Medium Farm Deployment (501-1TB of data) Large Farm Deployment (1-2TB of Data) Very Large Farm Deployment (2-5 TB of Data) Special Cases Ram Required 8GB 16GB 32 GB 64GB 64GB+ CPU 4 4 8 8 8
  • 20. DISKS  SQL server reads and writes 64k at a time  So change your allocation size from the 4K default to 64K.  This small change alone, will improve your SQL performance by up to 30% Use chkdsk <drive>to Verify Use Format to Configure: • Format <drive> /Q /FS:NTFS /A:64K /V:<volume> /Y
  • 22. Server Configuration – Collation  SharePoint server 2013 is built to use Latin1_General_CI_AS_KS_WS. This is a quote from Microsoft to prove it:  “We support any CI collation for the SQL instance (for master, tempdb databases). However we recommend using Latin1_General_CI_AS_KS_WS as the instance default collation (master, tempdb databases).”  CI – (Case Insensitive) A and a ARE treated as the same character.  AS – (Accent Sensitive) a and á are NOT treated as the same character.  KS – (Kana Sensitive) Japanese Hirakana and Katakana characters which look the same are NOT treated as the same character.  WS – (Width Sensitive) Single-Byte and Double-Byte versions of the same character are NOT treated as the same character.
  • 23. Server Configuration For SharePoint 2013: • SQL Server 2008 R2 SP1 • SQL Server 2012 (SP1 for BI) • SQL Server 2014 (SP2013 SP1 & April CU) For SharePoint 2016: • SQL Server 2014 • SQL Server 2016 Use named instances SharePoint Use a dedicated instance Run the service with a Managed account •No specific permission
  • 24. Server Configuration Use alias for the connection string • Client alias or DNS alias (preferred) Good practice : every SP Content db must be created (and documented) by a DBA after a strict capacity plan
  • 25. Server Configuration Use alias for the connection string • Client alias or DNS alias (preferred) Good practice : every SP Content db must be created (and documented) by a DBA after a strict capacity plan
  • 28. Thomas Larock from SQL Rockstar explains this: SQL Server (and other database systems such as Oracle and Sybase) need to read data pages into their internal memory before they can be used. Of course your server needs memory to operate as well. When your database engine and your server are competing for the same memory resources, you get bad performance. You want your server and your database engine to be like dancing partners, and less like my kids fighting over the last cupcake. Max Memory
  • 30. Optimize TempdB  Split across n locations  N = total number of physical cores > super myth  All temp files need to have the same size  Size of largest content dB or 10 % of Total Content DB’s Size whichever is bigger  The fastest disk possible | Place on a different Drive than the Content Database  Simple Recovery mode  Place on Different Drive Than Content Databases
  • 31. Model Database  SQL Server uses the Model database as a template for creating new user databases  So therefor make sure that Model database have correct initial size and growth settings.  The log should be around 25% of the initial size.  The auto growth is your insurance policy if your current database size has been reached.
  • 34. Auto Create Statistics  Do not enable auto-create statistics on a server that hosts SQL Server and SharePoint Server  Enabling auto-create statistics is not supported for SharePoint Server
  • 36. USE “DBA” created databases  Sizing  Autogrowth  DO NOT USE SIMPLE RECOVERY  Unless you understand the implications
  • 38. Maintenance Plan  Create a maintenance plan to backup databases, rebuild indexes and checking the logical and physical integrity of your database  Make sure you don’t run backup when heavy timer jobs runs in the SharePoint environment, like midnight
  • 39. Recovery mode Model db : recovery model = full Tempdb : recovery model = simple SharePoint DB : recovery model ? Contend DB = full Config DB= simple Services App DBs= it depends : •http://technet.micro soft.com/en- us/library/cc678868. aspx
  • 41. Script your SQL Server installation  https://sqlserverfinebuild.codeplex.com/
  • 43. Always install SQL Alias in SharePoint Use alias for the connection string • Client alias or DNS alias (preferred)
  • 45. Using SQL Server Resource Governor to optimize Search Database usage  Part of SQL Server Enterprise (since SQL 2008)  Limits CPU and memory usage on some DBs (and IO in SQL Server 2014)  like search DBs  Allow less CPU & mem & IO usage during work hours  Allow more CPU & mem & IO usage during off hours
  • 47. 10 simple tips to maximize performance http://www.sharepointblog.no/?p=85 1. SSD Disk or better 2. Formating disk with 64K 3. Language corralation Latin_CI_AS_KS_WS 4. Maximum memory 5. Changed Sizes on Model database 6. Default fill factor to 80 7. Switched of autocreate statistics 8. Max Degree of Parallelism – set to 1 (it has to be) 9. Changed Initial Size & Autogrow on temp database, and created extra temp files for the amount of processors. 10. Don’t do backups at midnight. Maximizing SQL 2012 Performance for SharePoint 2013 WhitePaper by Vlad Catrinescu
  • 50. Gold sponsors Silver sponsors Bronze sponsors Collaborate
  • 51. Raffle Please, fill your SPS Madrid passport if you want to participate. You must get signature from sponsors and complete the poll. Give us the passport at 6:00 PM in the Auditorium room. You can win one Sphero BB-8 or a mini drone:

Editor's Notes

  • #2: This slide is mandatory. Please do not remove.
  • #4: This slide is mandatory. Please do not remove and try to use it during Q&A at the end of your session. Thank you!
  • #51: This slide is mandatory. Please do not remove and try to use it during Q&A at the end of your session. Thank you!