SharePoint and theInvoluntary DBACOM715Thomas Vochten
 Thomas Vochten @thomasvochten thomasvochten.com mail@thomasvochten.com SharePoint consultant. Platform architect.Spe...
Agenda SharePoint & SQL Server SQL Server Fundamentals Preparing the platform Performing a deliberate installation Re...
I’m not a professionally trained DBA
Meet the involuntary DBASomeone who is made to assume a DBArole or take on DBA responsibilities, usuallyagainst their will...
The Dynamic DuoSharePoint & SQL Server
Importance to SharePoint SharePoint performance impact Almost everything is stored in SQL Support for your HA/DR strategy
SharePoint 2013 Many schema optimizations Reduced IO operations Distributed Cache Shredded Storage
Shredded Storage Evolution from SharePoint 2010 Document is stored as separate BLOB’sin SQL Server Only changed BLOB’s ...
Database, anyone? A lot of SharePoint databases Each with different needs
Limits & boundariesContent database sizing 200 GB still the sweet spot 4 TB if you know what you’re doing … or even unl...
Limits & boundariesContent database limits 500 content databases per farm 60 million items in a content database 10.000...
Supported Versions of SQL SQL Server 2012 x64 SQL Server 2008 R2 Service Pack 1 x64 Editions supported:Standard, Enterp...
SharePoint makes DBA’s cry Unconventional practices Support policy GUIDS all over the place
Get rid of the GUIDGrey wizardGOODWhite wizardBAD
PowerShell to the rescue New-SPConfigurationDatabase AutoSPInstaller Naming convention matters!http://autospinstaller.c...
SQL Server Fundamentals
SQL Server Storage Primer Use of 8K pages in data files Use of 64K as basic unit of space Database files (.mdf) & Log f...
SQL Server databases System databasesmaster, model, msdb, tempdb User databases (SharePoint)config, content, search, …
TempDB Give it proper care Initial sizing Number of data files Dedicated drive Tune autogrowth
Recovery ModelsEssential reading:Understanding Logging & Recoveryhttp://technet.microsoft.com/en-us/magazine/2009.02.loggi...
Simple or full“Why does this log file grow forever?”
CONTROL LOG FILE GROWTHLearning about the full recovery mode
Simple or full“Why does this log file grow forever?”Full recovery model requires log backups
Preparing the platform
General considerations SQL is all about mem/disk IO/cpu Dedicate a SQL instance to SharePoint Virtualizing SQL Server?
Plan your disks Differentiate & prioritize based on IOneeds1. tempdb2. logs3. search4. other databases
Prepare your disksCheck/modify:Up to 50% io performance gains measured!Partition alignment 1024K everywhereAllocation unit...
diskpartlist diskselect disk <DiskNumber>create partition primary align=1024assign letter=<DriveLetter>format fs=ntfs unit...
Prepare your disks Test the disks you get offered Sqlio to the rescue (or evenCrystalDiskMark)
PREPARE YOUR DISKSPartition alignment & allocation unit size
Deliberate Installation
Running Setup Only install the features you need Use domain user as service account Don’t lock out other admins Config...
Patching SQL Server Service Pack Cumulative Updates
Post setupEnable instant file initialization Speeds up data file creation enormously Disables zeroing out data files Do...
INSTANT FILE INITIALIZATIONSpeeding up your data file operations
Configuration Tips
Don’t forget Start SQL Server Agent Set up alerting for specific events Don’t forget about Windows Firewall(open port 1...
Instance level settings Determine maximum memory Set fill factor to 80 Turn on backup compression Set MAXDOP to 1
Setting MAXDOP is now mandatory in SharePoint 2013
Database level settings Consider multiple data files Tune autogrowth settings Presize databases Recovery model (simple...
Connecting SharePoint to SQL Use SQL aliases for added flexibility Test your connection beforehand Grant the correct ri...
CONFIGURATION TIPSSQL Agent, Instance & Database level settings, Aliases
Operational Guidance
Required Reading KB841057supported & unsupported actions to databases Database Maintenance for SharePoint2010 Products* ...
Regular maintenance Check database integrity (dbcc checkdb) Check index fragmentation Learn about maintenance plans
Index fragmentationCheck “sys.dm_db_index_physical_stats”Illustration by Paul Randal* Illustration by Paul Randal
Reducing fragmentation SharePoint Health Analyzer Perform index rebuild manually Set the fill factor to 80Consider rebu...
Watch out for the shrinkJust because you can,doesn’t mean you should Causes massive fragmentation Rebuild indexes & keep...
OPERATIONAL GUIDANCEDatabase maintenance and the danger of shrinking
Tools & Resources
Database Maintenance Invaluable scripts for backup &consistency checkshttp://ola.hallengren.com/
Counter Intelligence Blitz! scripts by Brent Ozarhttp://brentozar.com/blitz Diagnostic scripts by Glenn Berryhttp://sqls...
COUNTER INTELLIGENCEUsing scripts to quickly assess the health of a SQL Server
Tuning SQL Server 2012 for SharePoint2013 Jump Start4 hours of video by Bill Baer & BrianAldermanhttps://www.microsoftvirt...
ResourcesWhere do I go for SQL help?Paul Randal (blog | twitter)Kimberly Tripp (blog| twitter)Brent Ozar (blog| twitter)Gl...
Key Takeaways Know limits & boundaries Understand logging & recovery Plan disk layout & configuration Enable instant f...
Thank you for attending!@thomasvochten
SharePoint and the involuntary DBA
SharePoint and the involuntary DBA
SharePoint and the involuntary DBA
SharePoint and the involuntary DBA
Upcoming SlideShare
Loading in …5
×

SharePoint and the involuntary DBA

989 views
835 views

Published on

0 Comments
1 Like
Statistics
Notes
  • Be the first to comment

No Downloads
Views
Total views
989
On SlideShare
0
From Embeds
0
Number of Embeds
8
Actions
Shares
0
Downloads
13
Comments
0
Likes
1
Embeds 0
No embeds

No notes for slide

SharePoint and the involuntary DBA

  1. 1. SharePoint and theInvoluntary DBACOM715Thomas Vochten
  2. 2.  Thomas Vochten @thomasvochten thomasvochten.com mail@thomasvochten.com SharePoint consultant. Platform architect.Speaker. Trainer. Accidental DBA.
  3. 3. Agenda SharePoint & SQL Server SQL Server Fundamentals Preparing the platform Performing a deliberate installation Real world configuration tips Operational guidance Useful tools & resources
  4. 4. I’m not a professionally trained DBA
  5. 5. Meet the involuntary DBASomeone who is made to assume a DBArole or take on DBA responsibilities, usuallyagainst their will (*)(*) Paul Randal
  6. 6. The Dynamic DuoSharePoint & SQL Server
  7. 7. Importance to SharePoint SharePoint performance impact Almost everything is stored in SQL Support for your HA/DR strategy
  8. 8. SharePoint 2013 Many schema optimizations Reduced IO operations Distributed Cache Shredded Storage
  9. 9. Shredded Storage Evolution from SharePoint 2010 Document is stored as separate BLOB’sin SQL Server Only changed BLOB’s will be sent back toSQL Server Reduced IO & Storage needs
  10. 10. Database, anyone? A lot of SharePoint databases Each with different needs
  11. 11. Limits & boundariesContent database sizing 200 GB still the sweet spot 4 TB if you know what you’re doing … or even unlimited
  12. 12. Limits & boundariesContent database limits 500 content databases per farm 60 million items in a content database 10.000 site collections in a contentdatabase** 5000 is recommended
  13. 13. Supported Versions of SQL SQL Server 2012 x64 SQL Server 2008 R2 Service Pack 1 x64 Editions supported:Standard, Enterprise, Datacenter
  14. 14. SharePoint makes DBA’s cry Unconventional practices Support policy GUIDS all over the place
  15. 15. Get rid of the GUIDGrey wizardGOODWhite wizardBAD
  16. 16. PowerShell to the rescue New-SPConfigurationDatabase AutoSPInstaller Naming convention matters!http://autospinstaller.codeplex.com
  17. 17. SQL Server Fundamentals
  18. 18. SQL Server Storage Primer Use of 8K pages in data files Use of 64K as basic unit of space Database files (.mdf) & Log files (.ldf) Indexes
  19. 19. SQL Server databases System databasesmaster, model, msdb, tempdb User databases (SharePoint)config, content, search, …
  20. 20. TempDB Give it proper care Initial sizing Number of data files Dedicated drive Tune autogrowth
  21. 21. Recovery ModelsEssential reading:Understanding Logging & Recoveryhttp://technet.microsoft.com/en-us/magazine/2009.02.logging.aspx Simple recovery model - last full backup Full recovery model - up to the minute
  22. 22. Simple or full“Why does this log file grow forever?”
  23. 23. CONTROL LOG FILE GROWTHLearning about the full recovery mode
  24. 24. Simple or full“Why does this log file grow forever?”Full recovery model requires log backups
  25. 25. Preparing the platform
  26. 26. General considerations SQL is all about mem/disk IO/cpu Dedicate a SQL instance to SharePoint Virtualizing SQL Server?
  27. 27. Plan your disks Differentiate & prioritize based on IOneeds1. tempdb2. logs3. search4. other databases
  28. 28. Prepare your disksCheck/modify:Up to 50% io performance gains measured!Partition alignment 1024K everywhereAllocation unit size 64K for SQL data & logs
  29. 29. diskpartlist diskselect disk <DiskNumber>create partition primary align=1024assign letter=<DriveLetter>format fs=ntfs unit=64K label="<label>" nowaitPrepare your disks
  30. 30. Prepare your disks Test the disks you get offered Sqlio to the rescue (or evenCrystalDiskMark)
  31. 31. PREPARE YOUR DISKSPartition alignment & allocation unit size
  32. 32. Deliberate Installation
  33. 33. Running Setup Only install the features you need Use domain user as service account Don’t lock out other admins Configure data & log file placement Set the right collation:Latin1_General_CI_AS_KS_WS
  34. 34. Patching SQL Server Service Pack Cumulative Updates
  35. 35. Post setupEnable instant file initialization Speeds up data file creation enormously Disables zeroing out data files Does not work for log files Set “Perform volume maintenance tasks”
  36. 36. INSTANT FILE INITIALIZATIONSpeeding up your data file operations
  37. 37. Configuration Tips
  38. 38. Don’t forget Start SQL Server Agent Set up alerting for specific events Don’t forget about Windows Firewall(open port 1433)
  39. 39. Instance level settings Determine maximum memory Set fill factor to 80 Turn on backup compression Set MAXDOP to 1
  40. 40. Setting MAXDOP is now mandatory in SharePoint 2013
  41. 41. Database level settings Consider multiple data files Tune autogrowth settings Presize databases Recovery model (simple or full) Read-only databases
  42. 42. Connecting SharePoint to SQL Use SQL aliases for added flexibility Test your connection beforehand Grant the correct rights to the setupaccount (dbcreator, securityadmin)
  43. 43. CONFIGURATION TIPSSQL Agent, Instance & Database level settings, Aliases
  44. 44. Operational Guidance
  45. 45. Required Reading KB841057supported & unsupported actions to databases Database Maintenance for SharePoint2010 Products* Still relevant for SharePoint 2013
  46. 46. Regular maintenance Check database integrity (dbcc checkdb) Check index fragmentation Learn about maintenance plans
  47. 47. Index fragmentationCheck “sys.dm_db_index_physical_stats”Illustration by Paul Randal* Illustration by Paul Randal
  48. 48. Reducing fragmentation SharePoint Health Analyzer Perform index rebuild manually Set the fill factor to 80Consider rebuilding indexes whenfragmented over 30% (for contentdatabases)
  49. 49. Watch out for the shrinkJust because you can,doesn’t mean you should Causes massive fragmentation Rebuild indexes & keep free space Autoshrink is the root of all evil!
  50. 50. OPERATIONAL GUIDANCEDatabase maintenance and the danger of shrinking
  51. 51. Tools & Resources
  52. 52. Database Maintenance Invaluable scripts for backup &consistency checkshttp://ola.hallengren.com/
  53. 53. Counter Intelligence Blitz! scripts by Brent Ozarhttp://brentozar.com/blitz Diagnostic scripts by Glenn Berryhttp://sqlserverperformance.wordpress.com/ PAL Toolhttp://pal.codeplex.com
  54. 54. COUNTER INTELLIGENCEUsing scripts to quickly assess the health of a SQL Server
  55. 55. Tuning SQL Server 2012 for SharePoint2013 Jump Start4 hours of video by Bill Baer & BrianAldermanhttps://www.microsoftvirtualacademy.com/training-courses/tuning-sql-server-2012-for-sharepoint-2013-jump-start
  56. 56. ResourcesWhere do I go for SQL help?Paul Randal (blog | twitter)Kimberly Tripp (blog| twitter)Brent Ozar (blog| twitter)Glenn Berry (blog| twitter)Fancy some blogs?http://thomaslarock.com/rankingsGet help – fast!#sqlhelp on Twitter
  57. 57. Key Takeaways Know limits & boundaries Understand logging & recovery Plan disk layout & configuration Enable instant file initialization Use PowerShell for more control Tune instance & database settings Use SQL aliases Check for consistency (weekly)
  58. 58. Thank you for attending!@thomasvochten

×