SQL Server for SharePoint Geeks

1,800 views

Published on

Presentation from my #BIWUG session on September 8, 2011 aimed at accidental/involuntary DBA's.

Published in: Technology
0 Comments
0 Likes
Statistics
Notes
  • Be the first to comment

  • Be the first to like this

No Downloads
Views
Total views
1,800
On SlideShare
0
From Embeds
0
Number of Embeds
323
Actions
Shares
0
Downloads
28
Comments
0
Likes
0
Embeds 0
No embeds

No notes for slide

SQL Server for SharePoint Geeks

  1. 1. SQL Server for SharePoint geeks<br />A gentle introduction<br />Thomas Vochten • September 8, 2011<br />
  2. 2. About Me<br />SharePoint Infrastructure Consultant atAtos (before Siemens IT Solutions & Services)<br />Accidental DBA<br />Lousy .NET developer<br />thomasvochten.com<br />@thomasvochten<br />
  3. 3. What we’ll cover<br />Disclaimer<br />Who needs a DBA anyway?<br />Importance of SQL for SharePoint<br />The SQL Landscape<br />Configuration tips<br />Common problems<br />Troubleshooting Tips<br />Counter Intelligence<br />Resources<br />
  4. 4. Disclaimer<br />There are no exact truths in SQL<br />The standard answer always is...<br />It Depends<br />Always!<br />Except maybe in 1 case it doesn’t<br />
  5. 5. Part 1 - setting the scene<br />
  6. 6. Who needs a DBA anyway?<br />A quick poll...<br />Who manages a production SQL instancethat isn’t a *real* DBA?<br />Don’t worry - you’re not alone...<br />Meet the “Accidental” or“Involuntary” DBA<br />
  7. 7. Common Problems<br />Data and log file management<br />Backups<br />Corruption<br />Performance troubleshooting<br />Index fragmentation<br />Configuration issues<br />
  8. 8. Importance for SharePoint<br />SharePoint performance = SQL performance<br />All your data is in a database<br />The’re a lot of them:<br />
  9. 9. SharePoint Databases<br />Other Important Considerations<br />Capacity planning<br />Performance planning<br />HA / DR requirements<br />Information Architecture<br />Limits & Boundaries: from 100 GB to 200 GB to 4 TB and beyond<br />
  10. 10. Why SharePoint makes DBAs cry<br />GUIDs all over the place<br />Don’t touch! support policy<br />
  11. 11. Getting rid of the GUID<br />Grey wizard is good<br />White wizard is bad<br />
  12. 12. SQL Landscape<br />Software Requirements<br />SharePoint 2010 requires 64 bit all the way<br />SQL Server 2008 R2 is your best friend<br />Other 2008 or 2005 editions are supported too<br />Editions<br />Standard or Enterprise?<br />
  13. 13. Standard vs Enterprise<br />Hardware<br />Enterprise-Only<br />Snaphots<br />TDE<br />More online operations<br />PowerPivot<br />
  14. 14. What about RBS?<br />Just because you can, doesn’t mean you should<br />Pro<br />Potentially cheaper storage<br />Move-SPSite (after SP1)<br />Disk I/O optimizations<br />Cons<br />Backup / restore complexity<br />Not supported together with mirroring<br />General operational burden<br />3rd party software<br />
  15. 15. A case for RBS<br />Heavily focused on document libraries<br />The vast majority ( >70%) of those files exceed 1MB in size.<br />The SharePoint content databases holding these files are relatively large ( >200GB) now or in the immediately foreseeable future<br />You have Disaster Recovery tools that are either directly RBS aware, or have processes designed to synchronize backups<br />You have highly skilled, expert SQL and Windows administration staff that is currently or has the capacity and directive to be well trained in RBS use, administration, and troubleshooting<br />[Source: Chris Mullendore, MSFT PFE]<br />
  16. 16. PART 2 - Configuration tips<br />
  17. 17. Pre Setup (1)<br />Use the latest service pack<br />Consider the latest cumulative update<br />Different databases: different I/O needs<br />
  18. 18. Pre Setup (2)<br />Use a normal domain user account as service account<br />Learn about instant file initialization <br />Learn about “lock pages in memory”<br />Check partition alignment<br />Perform a stresstest with sqlio<br />demo<br />demo<br />
  19. 19. Setup<br />Choose the right product features<br />Change the default database paths<br />Put TempDB in the right place immediately<br />Only use Windows Authentication Mode<br />
  20. 20. Post Setup<br />Make sure SQL Server Agent is started<br />Check Windows Firewall<br />Explore server & database options<br />Minimum & maximum memory usage<br />Set fill factor to 80% for SharePoint<br />MAXDOP to 1 for SharePoint<br />Backup compression<br />Autogrowth settings<br /># of database files per database<br />Model database (not for SharePoint)<br />Create and test SQL aliases on your SharePoint servers<br />Pregrow your SharePoint databases! <br />demo<br />demo<br />
  21. 21. Maintaining SQL<br />Check database integrity weekly with DBCC CHECKDB<br />Look at index fragmentation<br />Learn about Maintenance Plans<br />[Source: “Database Maintenance for Microsoft SharePoint 2010 Products” (revised)]<br />
  22. 22. Caution<br />Shrinking database files: are you sure?<br />Autoshrink: the exception to the “it depends” rule<br />demo<br />It’s evil!<br />
  23. 23. Common Problems, Revisited<br />Most common issues<br />Data and log file management<br />Backups<br />Due to lack of understanding of<br /><ul><li>Recovery modelsand their influence on space and backups
  24. 24. Backup types (full, differential & logs)</li></ul>Recovery models<br />Choosing between SIMPLE or FULL recovery model and what they bring to the table<br />demo<br />
  25. 25. Troubleshooting Tips<br />Learn how to use the tools<br />Perfmon<br />Activity Monitor<br />PAL<br />Profiler<br />Learn the basics, like<br />Don’t restart SQL server in case of corruption<br />Don’t detach and reattach problematic databases<br />
  26. 26. Counter Intelligence<br />Get to know your SQL server, fast!<br />Blitz! scripts by Brent Ozar<br />Diagnostic scripts by Glenn Berry<br />demo<br />
  27. 27. Resources<br />Where do I go for SQL help?<br />Paul Randal (blog | twitter)<br />Kimberly Tripp (blog| twitter)<br />Brent Ozar (blog| twitter)<br />Glenn Berry (blog| twitter)<br />Fancy some blogs?<br />http://thomaslarock.com/rankings<br />Get help – fast!<br />#sqlhelp on Twitter<br />We now have #sphelp too you know <br />
  28. 28. Quick Wins Summary<br />Partition Alignment<br />Instant File Initialization<br />Databases & logs on different spindles<br />Multiple datafiles, but not for TempDB or for logfiles<br />Tune server memory usage<br />Fill factor to 80%<br />MAXDOP to 1<br />Tune autogrowth settings<br />Use SQL aliases<br />Presize your databases<br />Check integrity often<br />No shrinking of data files (autoshrink is evil)<br />Know the recovery models & their impact on drive space<br />
  29. 29. Thank you<br />

×