Knowing the vast majority of the content accessed via SharePoint is stored in SQL Server, and also knowing an incorrect configuration of SQL Server can have a detrimental impact on the performance of SharePoint it is important to understand the integration of these two products. Regardless of whether you have a dedicated DBA, or the SharePoint administrator is also the DBA, there are critical SQL Server configurations that can be made that will improve the performance of SharePoint. Often DBA’s are familiar with how to manage SQL Server, but may not be familiar with some nuances that SQL Server has when integrated with SharePoint. In this session we will demonstrate how some default SQL Server settings negatively impact SharePoint and what changes can be made to improve the performance of SharePoint. These changes include database file settings and SQL Server instance settings. We'll also examine how to properly install SQL Server and SharePoint so they work together as efficiently as possible. This discussion will introduce the Best Practices framework that will allow your SharePoint administrator and/or your DBA to configure SharePoint and SQL Server to provide optimal performance for your SharePoint implementation
8. SQL Server Introduction
SharePoint and SQL Server Integration
Demo: SQL Server Configurations to Optimize SharePoint
SQL Server Instance Configurations
Database Configurations
Avoiding Ginormous Transaction Logs
SQL Server Best Practices for Optimizing SharePoint
Session Agenda
10. Multiple Instances of SQL Server on One Server
One Default Instance with Multiple Name Instances
Each Instance Managed Individually
Share SQL Server Management Tools
Each Instance Shares Windows Server Resources
Two Types of Databases: System and User
Minimum of Two Files Created Per Database
MDF (Master Data File)
LDF (Transaction Log File)
NDF (Optional for Extending Database)
SQL Server Introduction
11. SQL Server Transaction Log Process
Modification is sent by
application to SQL Server 1
Data pages are located in,
or read into the buffer cache
and then modified
2
Buffer
Cache
Modification is recorded
in transaction log on disk 3
Later, checkpoint writes
dirty pages to database 4
12. Working with Recovery Models
Recovery Model Description
Simple Does NOT permit transaction log (t-log)
backups. Automatically truncates log to
reduce space requirements
Full Requires LOG BACKUPS to manage t-log
space requirements. Avoids data loss if
damaged or missing database file occurs.
Permits point-in-time recovery.
Bulk Logged Requires log backups to manage t-log
space requirements. Improves
performance during bulk copy
operations. Reduces t-log space usage by
using minimal logging of operations.
13. Master
Configuration Database of SQL Server Instance
Msdb
Storage of SQL Server Automation Configuration Information
Resource (Hidden)
Read-Only Database Containing All SQL Server System Objects
Tempdb
Temporary Work Storage Area
Model
Template Used to Create All New Databases
SQL Server Instance Databases
15. All SQL Server Versions and SharePoint Versions
Large Majority of SharePoint Data Stored in SQL Server
Farm Configuration Information Stored in SharePoint
Configuration Database in SQL Server
Central Administration Content Stored in Own Content Database
in SQL Server (Blog on how to rename)
Every Web Application Minimum of One Content Database
Most Service Applications Have at Least One Database
SharePoint and SQL Server Integration
16. SharePoint Farm Creates Several Databases (20 DB’s if Spousal
Installation and Run Configuration Wizard)
Content Database Contains Several Site Collections
Site Collection Resides in Only One Content Database
Use Full Recovery Model on Production Databases
Control Size of Database (Recommended 200GB)
Site Collection Quota Templates
Maximum Number of Site Collections per Database
SharePoint Content Databases
17. Web Application
200GB
200GB
200GB
200GB
Site Collections
Site Collections
Site Collections
Site Collections
Project
Sites
Department
Sites
HR
Sites
Marketing
Sites
750mb X 250 = 187,500mb / 1024 = 183gb
250
250
250
250
18. Default File Locations (Move off C: Drive)
Minimum and Maximum Memory Settings
Max Degree of Parallelism (MAXDOP) Set to 1
Have DBA Create Alias for SharePoint SQL Instance
SharePoint Collation – Latin1_General_CI_AS_KS_WS
During Installation of SQL Server Hosting SharePoint Content
During Creation of Content Database in SQL Server
SQL Server Instance Configuration
19. Model Database File Settings
Increase Initial Size of Data and Log Files
Increase Autogrowth Settings (Use MB not %)
Tempdb Database File Settings
Increase Initial Size of Data and Log Files
Increase Autogrowth Settings (Use MB not %)
Use Simple Recovery Model
Place Files on Different Drive from Content Databases
SQL Server Database Configuration
22. Simple Recovery Model
Data pages are located in,
or read into, the buffer cache
and then modified
2
Modification is sent by
application to SQL Server
1
Modification is recorded
3 in transaction log on disk
Later, checkpoint writes
dirty pages to database
and FLUSHES transactions
from T-log.
4
Buffer
Cache
23. Full Recovery Model
Data pages are located in,
or read into, the buffer cache
and then modified
2
Modification is sent by
application to SQL Server
1
Modification is recorded
3 in transaction log on disk
Later, checkpoint writes
dirty pages to database
but RETAINS transactions
in T-log.
4
Buffer
Cache
24. mdf
ldf
Sunday
Full Backup
mdf
ldf
Tuesday
Differential
mdf
ldf
Differential
Monday
mdf
ldf
Differential
Wednesday
You Lose mdffile of database on Thursday at 4:00pm
(1) BACKUP LOG DB_NameTO D:SQLBackupsTempBackup.Bak WITH NORECOVERY
(2)
(3)
(4) RESTORE LOG FROM D:SQLBackupsTempBackup.Bak
BACKUP LOG DB_NameTO D:SQLBackupsWeekly_T_Log.Bak WITH INIT
26. Dedicated SQL Server Instance / Server
No Spousal Installations of SQL Server or SharePoint
Database Size Should Not Exceed 200GB
Max Degree of Parallelism (MAXDOP) Set to 1
Modify Model System Database Settings
Avoid Auto-Shrinking Databases
Use Database Autogrowth Sparingly
Reduces Fragmentation
Improves Data Entry Performance
Best Practices for SharePoint’s SQL Server
27. Spread Data Files and Transaction Log Files Across Multiple Drives
or Locate them on RAID 5/10
Create Multiple Tempdb Files on Multiple Drives
Generate Database Maintenance Plans
Defragment Drives Containing Content Database Files
Perform Regular Backups of Database and T-Logs
Perform DBCC CHECKDB Operations Regularly
Just Say NO to Simple Recovery Model
Best Practices for SharePoint’s SQL Server