Your SlideShare is downloading. ×
0
SharePoint 2010 Database
Maintenance
Matt Ranlett
Senior Technology Architect
@mranlett
facebook.com/mranlett
Speaker Bio
Matt Ranlett
Slalom Senior Technology Architect
Experience:
• 5-Year SharePoint Server Microsoft MVP
• MCAD an...
AGENDA
Database Maintenance for SharePoint
Server
• What are the databases involved?
• How do I ensure data integrity?
• What doe...
DATABASES
Supported Versions of SQL Server
SharePoint Server 2010
Functionality
SQL Server 2008 R2
Enterprise
SQL Server 2008 R2
Sta...
SharePoint 2010 Foundations Databases
Name Size and
Growth
Read/Write
Characteristic
s
Scaling Method Recover
y
Model
Back...
SharePoint 2010 Foundations Databases
Name Size and
Growth
Read/Write
Characteristic
s
Scaling Method Recover
y
Model
Back...
SharePoint 2010 Foundations Databases
Name Size and
Growth
Read/Write
Characteristic
s
Scaling Method Recover
y
Model
Back...
SharePoint 2010 Foundations Databases
Name Size and
Growth
Read/Write
Characteristic
s
Scaling Method Recover
y
Model
Back...
SharePoint Server 2010 Databases
• Managed Metadata Service_GUID
• PerformancePoint Service Application_GUID
• Search_Serv...
Auto-provision or DBA provision
• When to DBA provision
– guaranteed control over database names (no GUIDs in the DB
names...
DATA INTEGRITY
DB Corruption
• Physical corruption
– Tends to be caused by I/O subsystem hardware
• Logical corruption
– Caused by applic...
SPEED
Right-sizing Hardware
• 64 bit hardware and software
• 16 GB memory
• Numerous distinct spindles
• Buckets of storage capa...
Managing database files
• Separate your log and data files to different spindles
– Don’t put ANYTHING else on these spindl...
Data Fragmentation
• Data stored in database pages
– Header, record data, index, free space
– Clustered and non-clustered ...
Statistics
• Queries run on execution plans
• Execution plans are automatically create based on statistics
• Statistics *c...
DATA SIZING
How much space do you need?
• Database size = ((# Documents × # Versions) × Avg Size) + (10 KB
×(# List items + (# Version...
Adjust the fill factor
• Database pages as phone book pages
– Fill factor == blank space on each page
– Reduce fragmentati...
Shrink databases
SOLUTION AUTOMATION
Remote Blob Storage
• Store big files outside of the database
– Databases > 500 GB
– BLOB files > 256 KB
– Not good for wr...
Database Maintenance Plans pt. 1
• Remove excessive transaction log file fragmentation by ensuring the
appropriate recover...
Database Maintenance Plans pt. 2
• Put a regular process in place to detect and remove index
fragmentation.
• Turn on AUTO...
QUESTIONS
Matt Ranlett
@mranlett
facebook.com/mranlett
mranlett@devcow.com
www.devcow.com
Check out the SharePoint Pro Connections m...
Upcoming SlideShare
Loading in...5
×

SharePoint 2010 database maintenance

8,197

Published on

Presentation which accompanies the article at http://www.sharepointproconnections.com/article/microsoft-products/Database-Maintenance-for-SharePoint-.aspx

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

No Downloads
Views
Total Views
8,197
On Slideshare
0
From Embeds
0
Number of Embeds
2
Actions
Shares
0
Downloads
216
Comments
0
Likes
5
Embeds 0
No embeds

No notes for slide
  • SharePoint expert and Intellinet principal consultant, Matt Ranlett, has been a fixture of the SharePoint and .NET developer communities for many years.
     
    As a fourth-year Microsoft MVP for SharePoint Server and a founding member of the Atlanta .Net Regular Guys, Matt has formed several Atlanta user groups and organized local and national community activities such as the Free Training 1, 2, 3! series and four Atlanta Code Camps. He has also served for 2 years on the INETA Board of Directors as the Vice President of Technology; and co-authored “Professional SharePoint 2007 Development” and “Social Computing With Microsoft SharePoint 2007” as well as six cover stories for various magazines including, ASP.NET Pro, Windows IT Pro, and Exchange & Outlook Administrator. Matt lives in Atlanta with his wife Kim and son Parker.
  • A complete walkthrough of how a DBA might create various content and configuration databases can be found on TechNet - http://technet.microsoft.com/en-us/library/cc262869.aspx
  • Transcript of "SharePoint 2010 database maintenance"

    1. 1. SharePoint 2010 Database Maintenance Matt Ranlett Senior Technology Architect @mranlett facebook.com/mranlett
    2. 2. Speaker Bio Matt Ranlett Slalom Senior Technology Architect Experience: • 5-Year SharePoint Server Microsoft MVP • MCAD and MCTS (2007 & 2010) Certified • Co-founder, Atlanta Dot Net Regular Guys www.devcow.com • Past Vice President of Technology, INETA • Author and editor of books and magazines @mranlett facebook.com/mranlett I’ve lost 75 pounds since this photo was taken!
    3. 3. AGENDA
    4. 4. Database Maintenance for SharePoint Server • What are the databases involved? • How do I ensure data integrity? • What does it take to keep things as speedy as possible? • How can I impact database storage size and cost? • Can these maintenance tasks be automated?
    5. 5. DATABASES
    6. 6. Supported Versions of SQL Server SharePoint Server 2010 Functionality SQL Server 2008 R2 Enterprise SQL Server 2008 R2 Standard SQL Server 2008 R2 Express SQL Server 2008 Enterprise SQL Server 2008 Standard SQL Server 2008 Express SQL Server 2005 Enterprise SQL Server 2005 Standard SharePoint Server 2010 64-bit only 64-bit only 64-bit only 64-bit only Service Pack (SP) 1, Cumulative Update (CU) 2 required, CU5 or later recommended 64-bit only SP1, CU2 required, CU5 or later recommended 64-bit only 64-bit only SP3 CU3 required 64-bit only SP3 CU3 required Remote BLOB storage (RBS) on a non-local device Requires RBS add-in from the SQL Server 2008 R2 Feature Pack. X X RBS on a local device. Requires RBS add-in from the SQL Server 2008 R2 Feature Pack. X X X X X X Backup compression X X X Data compression for the Search Crawl and Property databases X X Table partitioning for Web Analytics Reporting databases X X Transparent data encryption X X Resource governor X X Database auditing X X Clustered database server X (faster recovery) X 2 nodes only X (faster recovery) X 2 nodes only X (faster recovery) X 2 nodes only Table taken from Microsoft whitepaper: SQL Server 2008 R2 and SharePoint 2010: Better Together whitepaper - http://technet.microsoft.com/en-us/library/cc990273.aspx
    7. 7. SharePoint 2010 Foundations Databases Name Size and Growth Read/Write Characteristic s Scaling Method Recover y Model Backup mechanisms Mirror within farm Mirror / log ship to another farm SharePoint_Admi nContent_GUID Small Varies can only scale up - one DB per farm Full SharePoint backup, SQL Server, DPM Yes No SharePoint_Confi g Small with large log files read-intensive can only scale up - one DB per farm Full SharePoint backup, SQL Server, DPM Yes No Configuration Databases
    8. 8. SharePoint 2010 Foundations Databases Name Size and Growth Read/Write Characteristic s Scaling Method Recover y Model Backup mechanisms Mirror within farm Mirror / log ship to another farm WSS_Content Recommend ed to limit size to < 200Gb* up to 1 TB supported in some scenarios Varies Can scale up or split additional site collections to new databases Full SharePoint backup, SQL Server, DPM Yes Yes Content Databases
    9. 9. SharePoint 2010 Foundations Databases Name Size and Growth Read/Write Characteristic s Scaling Method Recover y Model Backup mechanisms Mirror within farm Mirror / log ship to another farm WSS_UsageApplic ation Extra large write- intensive can only scale up - one DB per farm Simple SharePoint backup, SQL Server, DPM Yes but why bother Yes but why bother WSS_Logging Health Databases
    10. 10. SharePoint 2010 Foundations Databases Name Size and Growth Read/Write Characteristic s Scaling Method Recover y Model Backup mechanisms Mirror within farm Mirror / log ship to another farm Application_Regist ry_Service_DB_G UID Small read-intensive can only scale up - one DB per farm Full SharePoint backup, SQL Server, DPM Yes No Bdc_Service_DB_ GUID Small read-intensive can only scale up - one DB per farm Full SharePoint backup, SQL Server, DPM Yes No Application Databases
    11. 11. SharePoint Server 2010 Databases • Managed Metadata Service_GUID • PerformancePoint Service Application_GUID • Search_Service_Application_CrawlStoreDB_GUID • Search_Service_Application_DB • Search_Service_Application_PropertyStoreDB_GUID • Secure_Store_Service_DB_GUID • StateService_GUID • User Profile Service Application_ProfileDB_GUID • User Profile Service Application_SocialDB_GUID • User Profile Service Application_SyncDB_GUID • WebAnalyticsServiceApplication_ReportingDB_GUID • WebAnalyticsServiceApplication_StagingDB_GUID • WordAutomationServices_GUID
    12. 12. Auto-provision or DBA provision • When to DBA provision – guaranteed control over database names (no GUIDs in the DB names) – guaranteed control over database sizing – procedural separation of control over application and data environments • How to DBA provision – PowerShell New-SPConfigurationDatabase -DatabaseName "SharePointConfigDB1" -DatabaseServer "SQL-01" -Passphrase (ConvertTo-SecureString "MyPassword" -AsPlainText -force) -FarmCredentials (Get-Credential)
    13. 13. DATA INTEGRITY
    14. 14. DB Corruption • Physical corruption – Tends to be caused by I/O subsystem hardware • Logical corruption – Caused by application and user errors • DBCC_CHECKDB – The role of backups
    15. 15. SPEED
    16. 16. Right-sizing Hardware • 64 bit hardware and software • 16 GB memory • Numerous distinct spindles • Buckets of storage capacity
    17. 17. Managing database files • Separate your log and data files to different spindles – Don’t put ANYTHING else on these spindles • Pre-create database and log files of the appropriate size – Reduces auto-grow needs – Correctly configure auto-grow anyways! – Turn ON instant file initialization • Grant the SQL service account Perform Volume Maintenance permission
    18. 18. Data Fragmentation • Data stored in database pages – Header, record data, index, free space – Clustered and non-clustered indexes – GUID-based keys • Fragmentation through normal data manipulation – Seen as growing free space and slowing performance • Intelligently rebuild only the indexes which need it – DMV sys.dm_db_index_physical_stats
    19. 19. Statistics • Queries run on execution plans • Execution plans are automatically create based on statistics • Statistics *can* get out of synch • Remediation steps – Analyze indexes and determine which indexes to operate on and how to do the fragmentation removal. – For all indexes that were not rebuilt, update the statistics. – Update statistics for all of the non-indexed columns.
    20. 20. DATA SIZING
    21. 21. How much space do you need? • Database size = ((# Documents × # Versions) × Avg Size) + (10 KB ×(# List items + (# Versions × # Documents)))
    22. 22. Adjust the fill factor • Database pages as phone book pages – Fill factor == blank space on each page – Reduce fragmentation – Increase disk storage requirements
    23. 23. Shrink databases
    24. 24. SOLUTION AUTOMATION
    25. 25. Remote Blob Storage • Store big files outside of the database – Databases > 500 GB – BLOB files > 256 KB – Not good for write-intensive sites • Partner implementations – AvePoint – Quest
    26. 26. Database Maintenance Plans pt. 1 • Remove excessive transaction log file fragmentation by ensuring the appropriate recovery model and backup schedule • Turn off any scheduled shrink operations to reduce the risk of unnecessary index fragmentation. • Set auto-growth correctly - by a pre-determined set file size rather than a percentage. Follow this up by periodically examining database sizes and determining if manual database growth is necessary to ensure optimum performance. • Turn on instant file initialization such that a database auto-growth is an instantaneous operation rather than a slow operation which requires zero-filling new space.
    27. 27. Database Maintenance Plans pt. 2 • Put a regular process in place to detect and remove index fragmentation. • Turn on AUTO_CREATE_STATISTICS and AUTO_UPDATE_STATISTICS, plus have a regular process in place to update statistics. • Turn on page checksums • Have a regular process to run DBCC CHECKDB.
    28. 28. QUESTIONS
    29. 29. Matt Ranlett @mranlett facebook.com/mranlett mranlett@devcow.com www.devcow.com Check out the SharePoint Pro Connections magazine article this presentation is based on: http://www.sharepointproconnections.com/article/microsoft-products/Database-Maintenance-for-SharePoint-.aspx
    1. A particular slide catching your eye?

      Clipping is a handy way to collect important slides you want to go back to later.

    ×