What every SharePoint consultant should know about SQL Server
-
Upload
gokan-ozcifci-mvp -
Category
Technology
-
view
8.055 -
download
1
Transcript of What every SharePoint consultant should know about SQL Server
![Page 1: What every SharePoint consultant should know about SQL Server](https://reader031.fdocuments.us/reader031/viewer/2022012923/586f96571a28abcc238b470f/html5/thumbnails/1.jpg)
1
Deep dive to SQL Server for SharePoint 2013
SharePoint Saturday JerseySeptember 27th 2014
Gokan OzcifciSharePoint MVPManaging Consultant Neoxy
@gokanozcifci
![Page 2: What every SharePoint consultant should know about SQL Server](https://reader031.fdocuments.us/reader031/viewer/2022012923/586f96571a28abcc238b470f/html5/thumbnails/2.jpg)
2
Deep dive to SQL Server for SharePoint 2013
SharePoint Saturday JerseySeptember 27th 2014Patrick Guimonet
Abalon
Benoit JesterSPasipe
![Page 3: What every SharePoint consultant should know about SQL Server](https://reader031.fdocuments.us/reader031/viewer/2022012923/586f96571a28abcc238b470f/html5/thumbnails/3.jpg)
I’m from Belgium – a French speaking guy and they are Frenchie's!
Apologies for accent
![Page 4: What every SharePoint consultant should know about SQL Server](https://reader031.fdocuments.us/reader031/viewer/2022012923/586f96571a28abcc238b470f/html5/thumbnails/4.jpg)
I’m not a real DBA!My role: Install the SharePoint farm Manage solutions developed by developers Administer the Farm Architectural changes as decisions …
Your role: Managing the SharePoint Databases
Maintenance Plans Performance
Installation and Configuration of SQL Server Backups and Maintain
![Page 5: What every SharePoint consultant should know about SQL Server](https://reader031.fdocuments.us/reader031/viewer/2022012923/586f96571a28abcc238b470f/html5/thumbnails/5.jpg)
![Page 6: What every SharePoint consultant should know about SQL Server](https://reader031.fdocuments.us/reader031/viewer/2022012923/586f96571a28abcc238b470f/html5/thumbnails/6.jpg)
![Page 7: What every SharePoint consultant should know about SQL Server](https://reader031.fdocuments.us/reader031/viewer/2022012923/586f96571a28abcc238b470f/html5/thumbnails/7.jpg)
![Page 8: What every SharePoint consultant should know about SQL Server](https://reader031.fdocuments.us/reader031/viewer/2022012923/586f96571a28abcc238b470f/html5/thumbnails/8.jpg)
Iceberg SharePoint
![Page 9: What every SharePoint consultant should know about SQL Server](https://reader031.fdocuments.us/reader031/viewer/2022012923/586f96571a28abcc238b470f/html5/thumbnails/9.jpg)
SharePoint++
C# Silverlight ASP.NET
CSS JQuery XML
Web Services
SharePoint is not only DEV!
![Page 10: What every SharePoint consultant should know about SQL Server](https://reader031.fdocuments.us/reader031/viewer/2022012923/586f96571a28abcc238b470f/html5/thumbnails/10.jpg)
SQL Server, only for IT-PRO?
T-SQL Linq C#
Design Modelisation MDX/DAX
Still Dev?
![Page 11: What every SharePoint consultant should know about SQL Server](https://reader031.fdocuments.us/reader031/viewer/2022012923/586f96571a28abcc238b470f/html5/thumbnails/11.jpg)
SharePoint
SQL Server
![Page 12: What every SharePoint consultant should know about SQL Server](https://reader031.fdocuments.us/reader031/viewer/2022012923/586f96571a28abcc238b470f/html5/thumbnails/12.jpg)
SharePoint makes you guys -DBA’s- crazy! Many DB’s for SharePoint Server Many Guids (Product Configuration Wizard)
PowerShell, SPAutoInstaller Rename DB – Well, not so easy if governance is
there Don’t touch policy
If you touch the DB Loose your support SharePoint does his way. The SQL best practices are
not the same as SQL for SharePoint Complex to manage Every update changes the schema! Zero downtime is not achievable
![Page 13: What every SharePoint consultant should know about SQL Server](https://reader031.fdocuments.us/reader031/viewer/2022012923/586f96571a28abcc238b470f/html5/thumbnails/13.jpg)
The SharePoint tree Farm Service Application Service Application DB Servers Web Applications Site Collections Sites Lists Elements Content Database
Site Collectionhttps://intranet.contoso.com
Content Database
Subsite
SharePoint Farm
Web Applicationhttps://intranet.contoso.com
Web Applicationhttps://extranet.contoso.com
Content Database
Content Database
Other Databases
Site Collectionhttps://intranet.contoso.com/projects/1
Site Collectionhttps://intranet.contoso.com/customers/1
Subsite
Subsite
![Page 14: What every SharePoint consultant should know about SQL Server](https://reader031.fdocuments.us/reader031/viewer/2022012923/586f96571a28abcc238b470f/html5/thumbnails/14.jpg)
Hardware Requirements (SQL) Processor
64 bits, 4 cores for small deployments (< 1.000 users)
64 bits, 8 cores for medium deployments (between 1.000 and 10.000 users)
RAM 8 GB for small deployments
(less than 1.000 users) 16GB for medium deployments
(between 1.000 and 10.000 users)
Hard Disk 80 Go minimum
![Page 15: What every SharePoint consultant should know about SQL Server](https://reader031.fdocuments.us/reader031/viewer/2022012923/586f96571a28abcc238b470f/html5/thumbnails/15.jpg)
(G) SharePoint et SQL – What to know
Content Databases are in SQL
Configuration is on SQL
Service Applications
are in SQL with their own Database
SharePoint sites can have
several DB
32 or even more
databases for a simple farm
![Page 16: What every SharePoint consultant should know about SQL Server](https://reader031.fdocuments.us/reader031/viewer/2022012923/586f96571a28abcc238b470f/html5/thumbnails/16.jpg)
SQL use for SharePoint Databases to SharePoint 2013 are automatically created with the SharePoint
Products Configuration Wizard Use PowerShell to create a naming convention
SVR_DOMAIN_ENV_PRODUCT V_NEOXY_P_SharePoint V_NEOXY_D_SharePoint
Microsoft does not support direct questioning or changing databases SharePoint 2013
SharePoint databases have different « best practices » and limitations that are not standard for SQL Server
![Page 17: What every SharePoint consultant should know about SQL Server](https://reader031.fdocuments.us/reader031/viewer/2022012923/586f96571a28abcc238b470f/html5/thumbnails/17.jpg)
SQL Server 2012 SharePoint Foundation 2013 is not compatible for BI. You need the Enterprise
version
SSRS is now a dedicated service in the: Central Administration Or via PowerShell.
AlwaysOn
![Page 18: What every SharePoint consultant should know about SQL Server](https://reader031.fdocuments.us/reader031/viewer/2022012923/586f96571a28abcc238b470f/html5/thumbnails/18.jpg)
SharePoint and SQL is great if …
CPU RAM HD
ABCK
![Page 19: What every SharePoint consultant should know about SQL Server](https://reader031.fdocuments.us/reader031/viewer/2022012923/586f96571a28abcc238b470f/html5/thumbnails/19.jpg)
In a few wordsIMHO = The SQL Server is the hart of your SharePoint Farm.
4 Layers
o SQL Servero Application Server
o Index Servero Excel Application
Servero Others…
o Web Front-Endso Workstations
![Page 20: What every SharePoint consultant should know about SQL Server](https://reader031.fdocuments.us/reader031/viewer/2022012923/586f96571a28abcc238b470f/html5/thumbnails/20.jpg)
Before the installation You need to choose:
SQL Server: Express, Datacenter, Standard, … SharePoint Server : Stand alone or not?
Hardware P V
Service Applications that Business requires User Profile Service Application = 3 DB Search Service Application = ??
How to configure the Service Applications = PowerShell or UI? Naming convention…
At least 2 farms ( D and P )= Otherwise you don’t have a Production env.
Not more ideologies like Next > Next > Finish
![Page 21: What every SharePoint consultant should know about SQL Server](https://reader031.fdocuments.us/reader031/viewer/2022012923/586f96571a28abcc238b470f/html5/thumbnails/21.jpg)
Prerequisites for SharePoint 2013
Supported SQL Servers : Express, Standard, Enterprise, DatacenterNice to knows:
• SQL Server 2014 needs CU of may 2014 for SharePoint 2013• Windows 2012 R2 is only supported with SharePoint 2013 SP1
SQL Server 2008• Windows Server 2008
R2 Service Pack 1 or Windows Server 2012 et supérieur
• Microsoft SQL Server 2008 R2 Service Pack 1
• 64 bit
SQL Server 2012• Windows Server 2008
R2 Service Pack 1 or Windows Server 2012 et supérieur
• Microsoft SQL Server 2012
• 64 bit
SQL Server 2014• Windows Server 2008
R2 Service Pack 1 or Windows Server 2012 et supérieur
• Microsoft SQL Server 2014
• 64 bit
![Page 22: What every SharePoint consultant should know about SQL Server](https://reader031.fdocuments.us/reader031/viewer/2022012923/586f96571a28abcc238b470f/html5/thumbnails/22.jpg)
Plan your Installation
SP_Installsecurityadm
inLocal
Administrator
Domain user
dbcreator
Accounts to plan for a SharePoint farm installation• Install account• Farm account• SQL Server accountPlan for least-privileged administration in SharePoint 2013 Plan for administrative and service accounts in SharePoint 2013
![Page 23: What every SharePoint consultant should know about SQL Server](https://reader031.fdocuments.us/reader031/viewer/2022012923/586f96571a28abcc238b470f/html5/thumbnails/23.jpg)
Plan, plan and plan againThis is the golden formula: DB size= ((D × V) × S) + (10 KB × (L + (V × D)))
D = Number of Documents V = Number of Versions S = Average Size of documents. Must be above Zero! L = Number of List items
(D) 200,000 (S) 250KB (L) 600,000 (V) 2DB size= (((200,000 x 2)) × 250) + ((10 KB × (600,000 + (200,000 x 2))) = 110,000,000 KB or 105 GB
![Page 24: What every SharePoint consultant should know about SQL Server](https://reader031.fdocuments.us/reader031/viewer/2022012923/586f96571a28abcc238b470f/html5/thumbnails/24.jpg)
SQL Server Conception
BDD systèmes
Master Model
TempDBMSDB
User DB SharePoint DB
![Page 25: What every SharePoint consultant should know about SQL Server](https://reader031.fdocuments.us/reader031/viewer/2022012923/586f96571a28abcc238b470f/html5/thumbnails/25.jpg)
How to install SQL Install only the necessary SQL services
SharePoint only needs Database Engine Services (ref. Image) Always follow the best practices of Microsoft
If you have corporate best practices; that’s another story Use dedicated accounts (ref. Image) Configure the paths of data and log file
Log Farm Try to avoid mixed mode
Only Windows Authentication Configure the alerting for specific events has SQL
SCOM …
Windows Firewall 1433 1434
![Page 26: What every SharePoint consultant should know about SQL Server](https://reader031.fdocuments.us/reader031/viewer/2022012923/586f96571a28abcc238b470f/html5/thumbnails/26.jpg)
Installation Settings(1/2)
Reference: Thomas Vochten slides
![Page 27: What every SharePoint consultant should know about SQL Server](https://reader031.fdocuments.us/reader031/viewer/2022012923/586f96571a28abcc238b470f/html5/thumbnails/27.jpg)
Installation Settings (2/2)
Reference: Thomas Vochten slides
![Page 28: What every SharePoint consultant should know about SQL Server](https://reader031.fdocuments.us/reader031/viewer/2022012923/586f96571a28abcc238b470f/html5/thumbnails/28.jpg)
Disk SetupDrive Letter
Purpose LUN
C:\ System (OS) 1D:\ User Data 2L:\ SQL Log Files 3P:\ Page File 4R:\ Local Backup Store 5S:\ SQL Server System
Databases6
T:\ TempDB 7
![Page 29: What every SharePoint consultant should know about SQL Server](https://reader031.fdocuments.us/reader031/viewer/2022012923/586f96571a28abcc238b470f/html5/thumbnails/29.jpg)
SharePoint’s way – more frustrations! Auto Create Statistics = off Auto Update Statistics = off Model Database is not really used by SharePoint Naming conventions Impact of SharePoint creating databases:
Backups HA & DR techniques database options
![Page 30: What every SharePoint consultant should know about SQL Server](https://reader031.fdocuments.us/reader031/viewer/2022012923/586f96571a28abcc238b470f/html5/thumbnails/30.jpg)
(B) Best practices of the instance MAXDOP should be set to 1 Collation Latin1_General_CI_AS_KS_WS for SharePoint DB
If not, you cannot change it Format disk is the only way
Use a dedicated SQL Instance Limite the mémoire (*0,80)
max. min.
Fill Factor at 80% For SP2013 not anymore
Create a maintenance plan tempdb to modify
On a speedy disk! Autogrowth in MB
Enable backup compression NO auto-shrink ! Re-index
![Page 31: What every SharePoint consultant should know about SQL Server](https://reader031.fdocuments.us/reader031/viewer/2022012923/586f96571a28abcc238b470f/html5/thumbnails/31.jpg)
Monitor SQL and SPMonitoring : Health Analyzer, SCOM, PowerShell, LogsCertaines bases de données de contenu deviennent trop volumineuses (SharePoint 2013)Content databases contain orphaned Apps (SharePoint 2013)La base de données dispose de trop d’espace inutilisé (SharePoint 2013)Des bases de données existent sur des serveurs exécutant SharePoint Foundation (SharePoint 2013)Des bases de données fonctionnent en mode plage de compatibilité, mise à niveau recommandée (SharePoint 2013)Des bases de données nécessitent une mise à niveau ou ne sont pas prises en charge (SharePoint 2013)Les bases de données dans cette batterie de serveurs sont configurées en lecture seule. Pour être mises à niveau, elles doivent être définies en lecture-écriture. (SharePoint 2013)Des lecteurs utilisés pour les bases de données SQL manquent d’espace libre (SharePoint 2013)Des bases de données utilisées par SharePoint contiennent des statistiques d’index obsolètes (SharePoint 2013)Rechercher - Une ou plusieurs bases de données d’analyse peuvent contenir des index fragmentés (SharePoint 2013)ULS Viewer
![Page 32: What every SharePoint consultant should know about SQL Server](https://reader031.fdocuments.us/reader031/viewer/2022012923/586f96571a28abcc238b470f/html5/thumbnails/32.jpg)
Backup - Principles Try to backup as much as possible
Content DB’s are the most important But they are not alone…
Windows level backup still needed Recovery model : Simple or Full
model = full tempDB = simple content= full configuration = full services Applications = simple / full
![Page 33: What every SharePoint consultant should know about SQL Server](https://reader031.fdocuments.us/reader031/viewer/2022012923/586f96571a28abcc238b470f/html5/thumbnails/33.jpg)
Backups: Best Practices (1/2) SQL backup locally preferred
On a different hard disk SQL Server SSD? If network drive, latency of 1 ms
Do not save all databases simultaneously Plan
Datacenter Is there something else already running Performance Usage
Avoid having too large BDD Respect the best practices
For collection site, the strategy differs according to size (PowerShell, SQL Server or DPM)
![Page 34: What every SharePoint consultant should know about SQL Server](https://reader031.fdocuments.us/reader031/viewer/2022012923/586f96571a28abcc238b470f/html5/thumbnails/34.jpg)
Backups : Best Practices (2/2) Make sure you have enough disk space Periodically test the backups AND restores Save the ULS logs Keep three backups, including one off-site Save the installation data for SharePoint Have an iso-prod environment (Disaster Recovery) Use PowerShell scripts Schedules
![Page 35: What every SharePoint consultant should know about SQL Server](https://reader031.fdocuments.us/reader031/viewer/2022012923/586f96571a28abcc238b470f/html5/thumbnails/35.jpg)
Use a dedicated SQL ServerFor optimal performance when operating server farms, we recommend that you install SQL Server 2008 R2 with SP1 and SQL Server 2012 on a dedicated server that is not running other roles of farm and n 'not host databases for other applications
35
![Page 36: What every SharePoint consultant should know about SQL Server](https://reader031.fdocuments.us/reader031/viewer/2022012923/586f96571a28abcc238b470f/html5/thumbnails/36.jpg)
Parameters specific to SQL Server Do not enable the automatic creation of statistics on a server that
hosts SQL Server and SharePoint Server. This is not supported by SharePoint Server. Manual activation of the automatic generation of statistics on a SharePoint database can radically change the execution plan for a query
Set the maximum degree of parallelism (MAXDOP) of 1 for instances of SQL Server that host SharePoint databases to a single SQL Server process is associated with each request.
To simplify maintenance, as to facilitate moving databases to another server, create DNS alias that points to the IP address of all instances of SQL Server.
![Page 37: What every SharePoint consultant should know about SQL Server](https://reader031.fdocuments.us/reader031/viewer/2022012923/586f96571a28abcc238b470f/html5/thumbnails/37.jpg)
Disks in SQL Server Improve their performance (from 30 to 50% !)
Format with 64K NTFS allocation Check partition alignment (1024K) with PowerShell scripts
Test the disks (Disk Seconds Per Read/Write < 20 ms) SQLIO CrystalDiskMark
Some databases are used intensively (tempdb, logs, search, …) RAID 10 Defragment the disks where content databases are hosted
![Page 38: What every SharePoint consultant should know about SQL Server](https://reader031.fdocuments.us/reader031/viewer/2022012923/586f96571a28abcc238b470f/html5/thumbnails/38.jpg)
SQL Server : Disks configuration Databases must reside on separate disks
Tempdb Bases de contenu Usage Search Logs SQL Server
Prioritize data on disks (from the more to the less fast) Tempdb Databases (logs) Search databases Databases (data)
If SharePoint is mainly used for reading, prioritize data on logs Separate data and logs on different disks
![Page 39: What every SharePoint consultant should know about SQL Server](https://reader031.fdocuments.us/reader031/viewer/2022012923/586f96571a28abcc238b470f/html5/thumbnails/39.jpg)
High disponibility SharePoint supports:
SQL Server mirroring, log shipping, clustering, availability groups
Analysis Service instance for SharePoint mode does not support clustering
![Page 40: What every SharePoint consultant should know about SQL Server](https://reader031.fdocuments.us/reader031/viewer/2022012923/586f96571a28abcc238b470f/html5/thumbnails/40.jpg)
Always On Availability Groups & SharePoint (HA)
SQL 1
FARM 1
SQL 2
ProductionJersey
High Availabilty
Synchronous
![Page 41: What every SharePoint consultant should know about SQL Server](https://reader031.fdocuments.us/reader031/viewer/2022012923/586f96571a28abcc238b470f/html5/thumbnails/41.jpg)
Always On Availability Groups & SharePoint (HA)
SQL 1
FARM 1
SQL 2
Synchronous
ProductionJersey
High Availabilty
![Page 42: What every SharePoint consultant should know about SQL Server](https://reader031.fdocuments.us/reader031/viewer/2022012923/586f96571a28abcc238b470f/html5/thumbnails/42.jpg)
Database Support – Sync CommitDatabase Supported
Admin Content YesApp Management YesBDC YesConfig YesContent YesManaged Metadata YesPerformancePoint YesPowerPivot Not TestedProject YesSearch Analytic Reporting YesSearch Admin Yes
Database SupportedSearch Crawl YesSearch Links YesSecure Store YesState Service YesSubscription Settings YesTranslation Services YesUPA Profile YesUPA Social YesUPA Sync YesUsage(=loggingDB) Yes – NRWord Automation Yes
WE
![Page 43: What every SharePoint consultant should know about SQL Server](https://reader031.fdocuments.us/reader031/viewer/2022012923/586f96571a28abcc238b470f/html5/thumbnails/43.jpg)
Always On Availability Groups & SharePoint (DR)
SQL 1
FARM 1
SQL 2
FARM 2
SQL 3
ProductionJersey
DRParis
AsynchronousSynchronous
![Page 44: What every SharePoint consultant should know about SQL Server](https://reader031.fdocuments.us/reader031/viewer/2022012923/586f96571a28abcc238b470f/html5/thumbnails/44.jpg)
Database Support – Async CommitDatabase Supported
Admin Content NoApp Management YesBDC YesConfig NoContent YesManaged Metadata YesPerformancePoint YesPowerPivot Not Tested*Project YesSearch Analytic Reporting NoSearch Admin No
Database SupportedSearch Crawl NoSearch Links NoSecure Store YesState Service NoSubscription Settings YesTranslation Services YesUPA Profile YesUPA Social YesUPA Sync NoUsage Yes – NRWord Automation Yes
WE
![Page 45: What every SharePoint consultant should know about SQL Server](https://reader031.fdocuments.us/reader031/viewer/2022012923/586f96571a28abcc238b470f/html5/thumbnails/45.jpg)
This is a journey0 – Memory and CPU prerequisite1 – page file
3 – Disks configuration
3.1 Allocation size3.2 Alignment
2 – Power Options
4.1 A dedicated server4.2 consider RBS4.3 an alias
5 – Instance parameters5.1 Collation5.2 Installation directory5.3 Memory5.4 Compress backup5.5 Default directories5.6 MAXDOP = 1
6 –System DBs5.1 TEMPDB5.2 MODEL
6 –SharePoint DBs6.1 Autogrowth6.2 Recovery model6.3 Auto*
![Page 46: What every SharePoint consultant should know about SQL Server](https://reader031.fdocuments.us/reader031/viewer/2022012923/586f96571a28abcc238b470f/html5/thumbnails/46.jpg)
Takeaways SharePoint is what it is, do not try to change Work with your SharePoint administrators Be aware of the limitations Know what is supported or not Get involved when they are considering using
SharePoint!
![Page 47: What every SharePoint consultant should know about SQL Server](https://reader031.fdocuments.us/reader031/viewer/2022012923/586f96571a28abcc238b470f/html5/thumbnails/47.jpg)
47
Thank You!
Raffle Prizes at 16:00
1st #SharePint in the Hotel Bar sponsored by Cloudshare 16:30
Gokan, Patrick and Benoit!SharePoint MVP