SlideShare a Scribd company logo
1 of 51
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
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
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
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
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
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
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
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
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
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
USE “DBA” created databases
 Sizing
 Autogrowth
 DO NOT USE SIMPLE RECOVERY
 Unless you understand the implications
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
Script your SQL Server installation
 https://sqlserverfinebuild.codeplex.com/
Always install SQL Alias in SharePoint
Use alias for the connection string
• Client alias or DNS alias (preferred)
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
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

What SQL DBAs need to know about SharePoint
What SQL DBAs need to know about SharePointWhat SQL DBAs need to know about SharePoint
What SQL DBAs need to know about SharePoint
J.D. Wade
 

What's hot (20)

SharePoint & SQL Server Working Together Efficiently
SharePoint & SQL Server Working Together EfficientlySharePoint & SQL Server Working Together Efficiently
SharePoint & SQL Server Working Together Efficiently
 
Tuning SQL Server for Sharepoint 2013- What every sharepoint consultant need...
Tuning SQL Server for Sharepoint 2013-  What every sharepoint consultant need...Tuning SQL Server for Sharepoint 2013-  What every sharepoint consultant need...
Tuning SQL Server for Sharepoint 2013- What every sharepoint consultant need...
 
Diving into sql server 2016
Diving into sql server 2016Diving into sql server 2016
Diving into sql server 2016
 
SQLIO - measuring storage performance
SQLIO - measuring storage performanceSQLIO - measuring storage performance
SQLIO - measuring storage performance
 
Hardware planning & sizing for sql server
Hardware planning & sizing for sql serverHardware planning & sizing for sql server
Hardware planning & sizing for sql server
 
SQL Server 2014 New Features (Sql Server 2014 Yenilikleri)
SQL Server 2014 New Features (Sql Server 2014 Yenilikleri)SQL Server 2014 New Features (Sql Server 2014 Yenilikleri)
SQL Server 2014 New Features (Sql Server 2014 Yenilikleri)
 
Introduction to SQL Server Internals: How to Think Like the Engine
Introduction to SQL Server Internals: How to Think Like the EngineIntroduction to SQL Server Internals: How to Think Like the Engine
Introduction to SQL Server Internals: How to Think Like the Engine
 
An overview of snowflake
An overview of snowflakeAn overview of snowflake
An overview of snowflake
 
Amazon Aurora: The New Relational Database Engine from Amazon
Amazon Aurora: The New Relational Database Engine from AmazonAmazon Aurora: The New Relational Database Engine from Amazon
Amazon Aurora: The New Relational Database Engine from Amazon
 
Azure Databases with IaaS
Azure Databases with IaaSAzure Databases with IaaS
Azure Databases with IaaS
 
Introduction to Amazon Relational Database Service
Introduction to Amazon Relational Database ServiceIntroduction to Amazon Relational Database Service
Introduction to Amazon Relational Database Service
 
Amazon Aurora Getting started Guide -level 0
Amazon Aurora Getting started Guide -level 0Amazon Aurora Getting started Guide -level 0
Amazon Aurora Getting started Guide -level 0
 
Brk3043 azure sql db intelligent cloud database for app developers - wash dc
Brk3043 azure sql db   intelligent cloud database for app developers - wash dcBrk3043 azure sql db   intelligent cloud database for app developers - wash dc
Brk3043 azure sql db intelligent cloud database for app developers - wash dc
 
SQL Server 2016 Editions
SQL Server 2016 Editions SQL Server 2016 Editions
SQL Server 2016 Editions
 
Migrating and Running DBs on Amazon RDS for Oracle
Migrating and Running DBs on Amazon RDS for OracleMigrating and Running DBs on Amazon RDS for Oracle
Migrating and Running DBs on Amazon RDS for Oracle
 
Best Practices for NoSQL Workloads on Amazon EC2 and Amazon EBS - February 20...
Best Practices for NoSQL Workloads on Amazon EC2 and Amazon EBS - February 20...Best Practices for NoSQL Workloads on Amazon EC2 and Amazon EBS - February 20...
Best Practices for NoSQL Workloads on Amazon EC2 and Amazon EBS - February 20...
 
JSSUG: SQL Sever Performance Tuning
JSSUG: SQL Sever Performance TuningJSSUG: SQL Sever Performance Tuning
JSSUG: SQL Sever Performance Tuning
 
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
 
What SQL DBAs need to know about SharePoint
What SQL DBAs need to know about SharePointWhat SQL DBAs need to know about SharePoint
What SQL DBAs need to know about SharePoint
 
What's new in SQL Server 2017
What's new in SQL Server 2017What's new in SQL Server 2017
What's new in SQL Server 2017
 

Viewers also liked

Viewers also liked (6)

SharePoint Storage Best Practices
SharePoint Storage Best PracticesSharePoint Storage Best Practices
SharePoint Storage Best Practices
 
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
 
UnityConnect - Office 365 Groups Deep Dive With Planner
UnityConnect - Office 365 Groups Deep Dive With PlannerUnityConnect - Office 365 Groups Deep Dive With Planner
UnityConnect - Office 365 Groups Deep Dive With Planner
 
SEF Unity Connect 2016 Office 365 Groups
SEF Unity Connect 2016 Office 365 GroupsSEF Unity Connect 2016 Office 365 Groups
SEF Unity Connect 2016 Office 365 Groups
 
SPSToronto: SharePoint 2016 - Hybrid, right choice for you and your organizat...
SPSToronto: SharePoint 2016 - Hybrid, right choice for you and your organizat...SPSToronto: SharePoint 2016 - Hybrid, right choice for you and your organizat...
SPSToronto: SharePoint 2016 - Hybrid, right choice for you and your organizat...
 
WF 101 - SharePoint Designer 2013 Workflows: An Introduction
WF 101 - SharePoint Designer 2013 Workflows: An IntroductionWF 101 - SharePoint Designer 2013 Workflows: An Introduction
WF 101 - SharePoint Designer 2013 Workflows: An Introduction
 

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

Sql And Storage Considerations For Share Point Server 2010
Sql And Storage Considerations For Share Point Server 2010Sql And Storage Considerations For Share Point Server 2010
Sql And Storage Considerations For Share Point Server 2010
Mike Watson
 
Pass chapter meeting dec 2013 - compression a hidden gem for io heavy databas...
Pass chapter meeting dec 2013 - compression a hidden gem for io heavy databas...Pass chapter meeting dec 2013 - compression a hidden gem for io heavy databas...
Pass chapter meeting dec 2013 - compression a hidden gem for io heavy databas...
Charley Hanania
 
Tipstricksandbestpracticesformanagingmicrosoftofficesharepointserver2007 0905...
Tipstricksandbestpracticesformanagingmicrosoftofficesharepointserver2007 0905...Tipstricksandbestpracticesformanagingmicrosoftofficesharepointserver2007 0905...
Tipstricksandbestpracticesformanagingmicrosoftofficesharepointserver2007 0905...
corin29
 

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

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
 
Optimize SQL server performance for SharePoint
Optimize SQL server performance for SharePointOptimize SQL server performance for SharePoint
Optimize SQL server performance for SharePoint
 
Taking SharePoint to the Cloud
Taking SharePoint to the CloudTaking SharePoint to the Cloud
Taking SharePoint to the Cloud
 
Sql Server Tuning for SharePoint : what every consultant must know (Office 36...
Sql Server Tuning for SharePoint : what every consultant must know (Office 36...Sql Server Tuning for SharePoint : what every consultant must know (Office 36...
Sql Server Tuning for SharePoint : what every consultant must know (Office 36...
 
Espc17 make your share point fly by tuning and optimising sql server
Espc17 make your share point  fly by tuning and optimising sql serverEspc17 make your share point  fly by tuning and optimising sql server
Espc17 make your share point fly by tuning and optimising sql server
 
Make your SharePoint fly by tuning and optimizing SQL Server
Make your SharePoint  fly by tuning and optimizing SQL ServerMake your SharePoint  fly by tuning and optimizing SQL Server
Make your SharePoint fly by tuning and optimizing SQL Server
 
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
 
Tuning SQL Server for Sharepoint-Sharepoint Summit Toronto 2014
Tuning SQL Server for Sharepoint-Sharepoint Summit Toronto 2014Tuning SQL Server for Sharepoint-Sharepoint Summit Toronto 2014
Tuning SQL Server for Sharepoint-Sharepoint Summit Toronto 2014
 
Sql Health in a SharePoint environment
Sql Health in a SharePoint environmentSql Health in a SharePoint environment
Sql Health in a SharePoint environment
 
Sql And Storage Considerations For Share Point Server 2010
Sql And Storage Considerations For Share Point Server 2010Sql And Storage Considerations For Share Point Server 2010
Sql And Storage Considerations For Share Point Server 2010
 
Building the Perfect SharePoint 2010 Farm
Building the Perfect SharePoint 2010 FarmBuilding the Perfect SharePoint 2010 Farm
Building the Perfect SharePoint 2010 Farm
 
SQL Server and SharePoint - Best Practices presented by Steffen Krause, Micro...
SQL Server and SharePoint - Best Practices presented by Steffen Krause, Micro...SQL Server and SharePoint - Best Practices presented by Steffen Krause, Micro...
SQL Server and SharePoint - Best Practices presented by Steffen Krause, Micro...
 
SharePoint 2010 database maintenance
SharePoint 2010 database maintenanceSharePoint 2010 database maintenance
SharePoint 2010 database maintenance
 
Should I move my database to the cloud?
Should I move my database to the cloud?Should I move my database to the cloud?
Should I move my database to the cloud?
 
Implement SQL Server on an Azure VM
Implement SQL Server on an Azure VMImplement SQL Server on an Azure VM
Implement SQL Server on an Azure VM
 
Getting Started with Managed Database Services on AWS - September 2016 Webina...
Getting Started with Managed Database Services on AWS - September 2016 Webina...Getting Started with Managed Database Services on AWS - September 2016 Webina...
Getting Started with Managed Database Services on AWS - September 2016 Webina...
 
Selecting the Right AWS Database Solution - AWS 2017 Online Tech Talks
Selecting the Right AWS Database Solution - AWS 2017 Online Tech TalksSelecting the Right AWS Database Solution - AWS 2017 Online Tech Talks
Selecting the Right AWS Database Solution - AWS 2017 Online Tech Talks
 
Pass chapter meeting dec 2013 - compression a hidden gem for io heavy databas...
Pass chapter meeting dec 2013 - compression a hidden gem for io heavy databas...Pass chapter meeting dec 2013 - compression a hidden gem for io heavy databas...
Pass chapter meeting dec 2013 - compression a hidden gem for io heavy databas...
 
Microsoft Data Platform - What's included
Microsoft Data Platform - What's includedMicrosoft Data Platform - What's included
Microsoft Data Platform - What's included
 
Tipstricksandbestpracticesformanagingmicrosoftofficesharepointserver2007 0905...
Tipstricksandbestpracticesformanagingmicrosoftofficesharepointserver2007 0905...Tipstricksandbestpracticesformanagingmicrosoftofficesharepointserver2007 0905...
Tipstricksandbestpracticesformanagingmicrosoftofficesharepointserver2007 0905...
 

More from Knut Relbe-Moe [MVP, MCT]

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

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

Recently uploaded

Chiulli_Aurora_Oman_Raffaele_Beowulf.pptx
Chiulli_Aurora_Oman_Raffaele_Beowulf.pptxChiulli_Aurora_Oman_Raffaele_Beowulf.pptx
Chiulli_Aurora_Oman_Raffaele_Beowulf.pptx
raffaeleoman
 
If this Giant Must Walk: A Manifesto for a New Nigeria
If this Giant Must Walk: A Manifesto for a New NigeriaIf this Giant Must Walk: A Manifesto for a New Nigeria
If this Giant Must Walk: A Manifesto for a New Nigeria
Kayode Fayemi
 
No Advance 8868886958 Chandigarh Call Girls , Indian Call Girls For Full Nigh...
No Advance 8868886958 Chandigarh Call Girls , Indian Call Girls For Full Nigh...No Advance 8868886958 Chandigarh Call Girls , Indian Call Girls For Full Nigh...
No Advance 8868886958 Chandigarh Call Girls , Indian Call Girls For Full Nigh...
Sheetaleventcompany
 

Recently uploaded (20)

Introduction to Prompt Engineering (Focusing on ChatGPT)
Introduction to Prompt Engineering (Focusing on ChatGPT)Introduction to Prompt Engineering (Focusing on ChatGPT)
Introduction to Prompt Engineering (Focusing on ChatGPT)
 
Air breathing and respiratory adaptations in diver animals
Air breathing and respiratory adaptations in diver animalsAir breathing and respiratory adaptations in diver animals
Air breathing and respiratory adaptations in diver animals
 
Thirunelveli call girls Tamil escorts 7877702510
Thirunelveli call girls Tamil escorts 7877702510Thirunelveli call girls Tamil escorts 7877702510
Thirunelveli call girls Tamil escorts 7877702510
 
Mohammad_Alnahdi_Oral_Presentation_Assignment.pptx
Mohammad_Alnahdi_Oral_Presentation_Assignment.pptxMohammad_Alnahdi_Oral_Presentation_Assignment.pptx
Mohammad_Alnahdi_Oral_Presentation_Assignment.pptx
 
Andrés Ramírez Gossler, Facundo Schinnea - eCommerce Day Chile 2024
Andrés Ramírez Gossler, Facundo Schinnea - eCommerce Day Chile 2024Andrés Ramírez Gossler, Facundo Schinnea - eCommerce Day Chile 2024
Andrés Ramírez Gossler, Facundo Schinnea - eCommerce Day Chile 2024
 
Report Writing Webinar Training
Report Writing Webinar TrainingReport Writing Webinar Training
Report Writing Webinar Training
 
Re-membering the Bard: Revisiting The Compleat Wrks of Wllm Shkspr (Abridged)...
Re-membering the Bard: Revisiting The Compleat Wrks of Wllm Shkspr (Abridged)...Re-membering the Bard: Revisiting The Compleat Wrks of Wllm Shkspr (Abridged)...
Re-membering the Bard: Revisiting The Compleat Wrks of Wllm Shkspr (Abridged)...
 
Chiulli_Aurora_Oman_Raffaele_Beowulf.pptx
Chiulli_Aurora_Oman_Raffaele_Beowulf.pptxChiulli_Aurora_Oman_Raffaele_Beowulf.pptx
Chiulli_Aurora_Oman_Raffaele_Beowulf.pptx
 
If this Giant Must Walk: A Manifesto for a New Nigeria
If this Giant Must Walk: A Manifesto for a New NigeriaIf this Giant Must Walk: A Manifesto for a New Nigeria
If this Giant Must Walk: A Manifesto for a New Nigeria
 
BDSM⚡Call Girls in Sector 93 Noida Escorts >༒8448380779 Escort Service
BDSM⚡Call Girls in Sector 93 Noida Escorts >༒8448380779 Escort ServiceBDSM⚡Call Girls in Sector 93 Noida Escorts >༒8448380779 Escort Service
BDSM⚡Call Girls in Sector 93 Noida Escorts >༒8448380779 Escort Service
 
Call Girl Number in Khar Mumbai📲 9892124323 💞 Full Night Enjoy
Call Girl Number in Khar Mumbai📲 9892124323 💞 Full Night EnjoyCall Girl Number in Khar Mumbai📲 9892124323 💞 Full Night Enjoy
Call Girl Number in Khar Mumbai📲 9892124323 💞 Full Night Enjoy
 
VVIP Call Girls Nalasopara : 9892124323, Call Girls in Nalasopara Services
VVIP Call Girls Nalasopara : 9892124323, Call Girls in Nalasopara ServicesVVIP Call Girls Nalasopara : 9892124323, Call Girls in Nalasopara Services
VVIP Call Girls Nalasopara : 9892124323, Call Girls in Nalasopara Services
 
George Lever - eCommerce Day Chile 2024
George Lever -  eCommerce Day Chile 2024George Lever -  eCommerce Day Chile 2024
George Lever - eCommerce Day Chile 2024
 
No Advance 8868886958 Chandigarh Call Girls , Indian Call Girls For Full Nigh...
No Advance 8868886958 Chandigarh Call Girls , Indian Call Girls For Full Nigh...No Advance 8868886958 Chandigarh Call Girls , Indian Call Girls For Full Nigh...
No Advance 8868886958 Chandigarh Call Girls , Indian Call Girls For Full Nigh...
 
Presentation on Engagement in Book Clubs
Presentation on Engagement in Book ClubsPresentation on Engagement in Book Clubs
Presentation on Engagement in Book Clubs
 
Mathematics of Finance Presentation.pptx
Mathematics of Finance Presentation.pptxMathematics of Finance Presentation.pptx
Mathematics of Finance Presentation.pptx
 
Governance and Nation-Building in Nigeria: Some Reflections on Options for Po...
Governance and Nation-Building in Nigeria: Some Reflections on Options for Po...Governance and Nation-Building in Nigeria: Some Reflections on Options for Po...
Governance and Nation-Building in Nigeria: Some Reflections on Options for Po...
 
Night 7k Call Girls Noida Sector 128 Call Me: 8448380779
Night 7k Call Girls Noida Sector 128 Call Me: 8448380779Night 7k Call Girls Noida Sector 128 Call Me: 8448380779
Night 7k Call Girls Noida Sector 128 Call Me: 8448380779
 
ANCHORING SCRIPT FOR A CULTURAL EVENT.docx
ANCHORING SCRIPT FOR A CULTURAL EVENT.docxANCHORING SCRIPT FOR A CULTURAL EVENT.docx
ANCHORING SCRIPT FOR A CULTURAL EVENT.docx
 
BDSM⚡Call Girls in Sector 97 Noida Escorts >༒8448380779 Escort Service
BDSM⚡Call Girls in Sector 97 Noida Escorts >༒8448380779 Escort ServiceBDSM⚡Call Girls in Sector 97 Noida Escorts >༒8448380779 Escort Service
BDSM⚡Call Girls in Sector 97 Noida Escorts >༒8448380779 Escort Service
 

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
  • 10.
  • 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
  • 12.
  • 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
  • 14.
  • 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
  • 17.
  • 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
  • 19.
  • 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
  • 21.
  • 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
  • 27.
  • 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
  • 29.
  • 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.
  • 33.
  • 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
  • 35.
  • 36. USE “DBA” created databases  Sizing  Autogrowth  DO NOT USE SIMPLE RECOVERY  Unless you understand the implications
  • 37.
  • 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
  • 40.
  • 41. Script your SQL Server installation  https://sqlserverfinebuild.codeplex.com/
  • 42.
  • 43. Always install SQL Alias in SharePoint Use alias for the connection string • Client alias or DNS alias (preferred)
  • 44.
  • 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
  • 46.
  • 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
  • 49. Knut Relbe-Moe Chief Technical Architect Knut.relbe-moe@knowledgefactory.com shareptkarm@outlook.com
  • 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

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