• Share
  • Email
  • Embed
  • Like
  • Save
  • Private Content
SharePoint - From Denial to Acceptance
 

SharePoint - From Denial to Acceptance

on

  • 947 views

Remember the day your boss pulled you aside for what seemed a friendly chat? “Oh, there’s one more thing… We’re getting SharePoint.” You probably had to run to the shower to wash off the ...

Remember the day your boss pulled you aside for what seemed a friendly chat? “Oh, there’s one more thing… We’re getting SharePoint.” You probably had to run to the shower to wash off the dirty feeling – but hey, it isn’t so bad you know. In this session we’ll explore the ins and outs of SharePoint for DBA’s. Why does SharePoint likes to do things its own way? What can and can’t you do to SharePoint databases? What SharePoint specific settings do you have to know about? How to maintain SharePoint databases without ruining it with Microsoft support?

Statistics

Views

Total Views
947
Views on SlideShare
947
Embed Views
0

Actions

Likes
1
Downloads
30
Comments
2

0 Embeds 0

No embeds

Accessibility

Categories

Upload Details

Uploaded via as Microsoft PowerPoint

Usage Rights

© All Rights Reserved

Report content

Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel

12 of 2 previous next

  • Full Name Full Name Comment goes here.
    Are you sure you want to
    Your message goes here
    Processing…
Post Comment
Edit your comment

    SharePoint - From Denial to Acceptance SharePoint - From Denial to Acceptance Presentation Transcript

    • SHAREPOINT FROM DENIAL TO ACCEPTANCE THOMAS VOCHTEN SQL SERVER DAYS 2013
    • ABOUT ME • • • • SharePoint MVP SQL Server enthousiast Platform architect Trainer @thomasvochten http://thomasvochten.com http://linkedin.com/in/thomasvochten
    • AGENDA • • • • • • Introducing SharePoint & SQL Planning for SharePoint Setup Good Practices Maintenance Tasks Backup & Restore High Availability & Disaster Recovery
    • CONFESSIONS
    • I’M NOT A REAL DBA
    • MEET THE INVOLUNTARY DBA Someone who is made to assume a DBA role or take on DBA (*) responsibilities, usually against their will (*) Paul Randal
    • WHY ARE WE TALKING ABOUT SHAREPOINT? • • • • It’s everywhere! Used by 80% of the Fortune 500 Microsoft’s fastest selling server product Importance of SQL for SharePoint is huge Many frustrations among SQL Server professionals
    • WHICH FRUSTRATIONS? • • • • • • • • • The support policies The strange schema The database settings The default database names The server rights they ask for The unconventional maintenance practices The GUID’s all over the place SharePoint likes to create its databases itself …
    • ABOUT SHAREPOINT & SQL The Dynamic Duo
    • SHAREPOINT 2007
    • SHAREPOINT 2010
    • SHAREPOINT 2013
    • DATABASES VS SHAREPOINT VERSIONS SharePoint Foundation SharePoint Standard SharePoint Enterprise
    • SHAREPOINT - THE LEGACY • • • • • Database schema concept goes way back Every SharePoint update modifies the schema! The newer the version, the more databases Many improvements with SharePoint 2013 What is stored inside SQL Server?
    • THE SHAREPOINT OBJECT HIERARCHY • • • • • • • • • • Farm Service Applications Service Application Databases Servers Web applications Content Databases Site collections Sites Lists Items
    • SITES AND THEIR DATABASES SharePoint Farm Other Databases Web Application https://intranet.contoso.com Content Database Site Collection https://intranet.contoso.com Site Collection https://intranet.contoso.com/projects/1 Subsite Web Application https://extranet.contoso.com Content Database Site Collection https://intranet.contoso.com/customers/1 Subsite Subsite Content Database
    • CONTROLLING CONTENT DATABASE SIZE • Site collection can only live in 1 content database • Balance site collections across content databases • Use site collection quota’s to control growth and size
    • DATABASE, ANYONE? • A lot of SharePoint databases • Each with different needs
    • THE (ALMOST) DEFINITIVE LIST • Configuration Database • Central Administration Content Database • Content Database • App Mgmt Database • Business Connectivity Services Database • Search Administration Database • Analytics Reporting Database • Crawl Database • Links Database • • • • • • • • • • • Secure Store Database Usage Database Subscription Settings Database Profile Database Synchronization Database Social Database Word Automation Database Managed Metadata Database Machine Translation Database PerformancePoint Database State Service Database
    • DATABASE TYPES Configuration Database 1 Service Application Databases Multiple Content Databases Multiple
    • DATABASES WITH SPECIAL NEEDS IOPS intensive databases in a SharePoint environment: • TempDB • Logging database • Search databases > Effect on storage planning!
    • SAY WHAT?
    • GET RID OF THE GUID Grey wizard GOOD White wizard BAD
    • POWERSHELL TO THE RESCUE • New-SPConfigurationDatabase • AutoSPInstaller • Naming convention matters! http://autospinstaller.codeplex.com
    • NEW WITH SHAREPOINT 2013 • • • • • • Many schema optimizations Reduced IO operations Distributed Cache Less need for the dbo role Sparse columns Shredded Storage
    • SHREDDED STORAGE • • • • • • Performance & Sizing impact SharePoint feature Evolution from the Cobalt protocol in SharePoint 2010 Document is stored as separate BLOB’s in SQL Server Only changed BLOB’s will be sent back to SQL Server Reduced IO & Storage needs
    • PLANNING FOR SHAREPOINT
    • IMPORTANCE TO SHAREPOINT • SharePoint performance impact • Almost everything is stored in SQL
    • LIMITS & BOUNDARIES Content database sizing revisited General purpose 200 GB Controlled < 4 TB Structured > 4 TB
    • ESTIMATE CONTENT DATABASE SIZE • ((D × V) × S) + (10 KB × (L + (V × D))) - Number of documents (D) - Average size of documents (S) - List items (L) - Number of non-current versions (V)
    • LIMITS & BOUNDARIES Content database limits • 500 content databases per farm • 60 million items in a content database • 10.000 site collections in a content database* * 5000 is recommended
    • SUPPORTED VERSIONS OF SQL For SharePoint 2013 • SQL Server 2012 x64 • SQL Server 2008 R2 Service Pack 1 x64 Editions supported: • Express, Standard, Enterprise, Datacenter
    • SHAREPOINT BENEFITS WITH SQL ENTERPRISE • • • • • • • • • Online index rebuilds Availability Groups Transparent Data Encryption Table Partitioning Snapshots Remote BLOB Storage Resource Governor PowerPivot …
    • SQL SYSTEM REQUIREMENTS WITH SHAREPOINT • CPU 64 bit, 4 cores for small deployments 64 bit, 8 cores for medium deployments • Memory 8 GB for small deployments 16 GB for medium deployments
    • VIRTUALIZATION Supported for SharePoint across the board Best Candidates Web Servers Lightweight Application Severs Good Candidates Search Application Servers Possible Candidates SQL Servers
    • PLAN YOUR DISKS Differentiate & prioritize based on IO needs 1. 2. 3. 4. tempdb logs search other databases
    • SETUP GOOD PRACTICES
    • DISK PREPPING The usual suspects… • • • • Partition alignment (1024K) NTFS cluster sizes (64K) TempDB importance SQLIO to the rescue!
    • 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” Not only for SharePoint!
    • INSTANCE PREPPING • • • • • • • • • Latin1_General_CI_AS_KS_WS collation MAXDOP must be set to 1 FILL FACTOR to 80% (for 2007 or 2010 only) Use a domain account as service account Set MAXMEM Dedicated instance for SharePoint SharePoint only needs the database engine Don’t forget to start SQL Agent Enable backup compression
    • MEMORY
    • DATABASE SETTINGS
    • ADVANCED (MAXDOP)
    • MAXDOP TO 1 IS MANDATORY IN 2013
    • DATABASE TUNING • • • • • Multiple database files per database Realistic autogrowth settings, don’t use % Choose your recovery model wisely SharePoint supports read-only content databases Pregrow database & log files
    • OPTIONS
    • PERMISSIONS SharePoint setup/admin user needs: • dbcreator • securityadmin Why do SharePoint admins ask for sysadmin role membership?
    • PRE-CREATING DATABASES • By default, SharePoint creates its own databases • DBA’s can pre-create databases for more control • Latin1_General_CI_AS_KS_WS collation for SharePoint What do you do after the farm has been created?
    • SHAREPOINT’S WAY - OR MORE FRUSTRATIONS • • • • • Auto Create Statistics = off Auto Update Statistics = off GUIDS as clustered indexes No referential integrity Model Database is not used by SharePoint
    • SQL ALIASES • Use SQL Aliases to connect SharePoint to SQL Server • Use multiple aliases for different database types: core databases content databases search databases logging database
    • WORK WITH YOUR SHAREPOINT PEOPLE • • • • Naming conventions Precreation of databases Site collections placement Impact of SharePoint creating databases: backups HA & DR techniques naming conventions database options
    • DEMO Anatomy of a SharePoint database system
    • MAINTENANCE TASKS How not to ruin it with Microsoft support
    • REQUIRED READING • KB841057 supported & unsupported actions to databases • Database Maintenance for SharePoint 2010 Products * Still relevant for SharePoint 2013 and SQL Server 2012
    • DON’T • • • • • • • • • • • • • • • Adding database triggers Adding new indexes or changing existing indexes within tables Adding, changing, or deleting any primary or foreign key relationships Changing or deleting existing stored procedures Calling existing stored procedures directly Adding new stored procedures Adding, changing, or deleting any data in any table of any of the databases Adding, changing, or deleting any columns in any table Making any modification to the database schema Adding tables to any of the databases Changing the database collation Running DBCC_CHECKDB WITH REPAIR_ALLOW_DATA_LOSS Enabling SQL Server change data capture (CDC) Enabling SQL Server transactional replication Enabling SQL Server merge replication
    • DO • Operations that are initiated from the SharePoint administrative user interface • SharePoint specific tools and utilities that are provided directly by Microsoft (PowerShell) • Changes that are made programmatically through the SharePoint Object Model and that are in compliance with the SharePoint SDK documentation • Activities that are in compliance with the SharePoint Protocols documentation
    • REDUCING FRAGMENTATION • SharePoint Health Analyzer checks configuration database content databases some application databases • • • • • • • Perform index rebuild manually Consider rebuilding indexes when fragmented over 30% SharePoint uses a non-default Fill Factor Not all databases are checked by SharePoint however AllDocs table is the most likely candidate SQL Enterprise for online index rebuild (<> table locks) Offline rebuild for many tables anyhow (BLOB’s)
    • HEALTH ANALYZER RULES & STORED PROCEDURES • Databases used by SharePoint have fragmented indices exec proc_DefragmentIndices (trigger is 30%) • Search - One or more crawl databases may have fragmented indices exec proc_MSS_DefragGathererIndexes (trigger is 10%) • Some content databases are growing too large • Database has large amounts of unused space • Databases used by SharePoint have outdated index statistics
    • MANAGE INDEXES MANUALLY DO ALTER INDEX DON’T DROP INDEX CREATE INDEX Examples: ALTER INDEX AllDocs_Url ON dbo.AllDocs REBUILD WITH (ONLINE=ON) GO ALTER INDEX tp_SiteId ON dbo.AllLists REORGANIZE GO
    • WATCH OUT FOR THE SHRINK Just because you can, doesn’t mean you should • Causes massive fragmentation • Autoshrink is the root of all evil! • Rebuild indexes & keep free space Can be considered after special SharePoint operations like moving a site from one database to another
    • CHECK FOR CONSISTENCY • • • • Run DBCC CHECKDB regularly WITH REPAIR_FAST & WITH_REPAIR_REBUILD is supported WITH REPAIR_ALLOW_DATA_LOSS is not supported WITH PHYSICAL_ONLY on very demanding environments
    • BACKUP & RESTORE
    • BACKING UP SHAREPOINT • • • • Backup all databases frequently Content databases are the most important ones File system backups are still needed Simple or Full recovery model
    • FRUSTRATIONS… AGAIN! • Configuration database cannot be restored • SharePoint built-in backups may break the backup chain! does a normal full backup does not do WITH COPY_ONLY Know what goes on in your environment
    • HIGH AVAILABILITY & DISASTER RECOVERY How to support SharePoint availability with SQL Server
    • SHAREPOINT HIGH AVAILABILITY SUPPORT • Clustering • Synchronous mirroring • Availability Groups synchronous commit General rule of thumb: Synchronous for HA, supported with most databases
    • SHAREPOINT DISASTER RECOVERY SUPPORT • Log Shipping • Asynchronous mirroring • Availability Groups asynchronous-commit mode General rule of thumb: Asynchronous for DR, supported with some databases
    • TYPICAL IMPLEMENTATION
    • TAKEAWAYS • • • • • SharePoint is what it is, don’t try to change it Work with your SharePoint administrators Be aware of the limits & boundaries Know what is supported and what not Get involved when they are planning SharePoint!
    • KEY RESOURCES Best practices for SQL Server in a SharePoint Server farm http://technet.microsoft.com/en-us/library/hh292622.aspx Storage and SQL Server capacity planning and configuration http://technet.microsoft.com/en-us/library/cc298801.aspx Overview of SQL Server in a SharePoint environment http://technet.microsoft.com/en-us/library/ff945791.aspx Support for changes to the databases that are used by SharePoint http://support.microsoft.com/kb/841057 Database maintenance for SharePoint http://technet.microsoft.com/en-us/library/cc262731.aspx Supported high availability and disaster recovery options for SharePoint databases http://technet.microsoft.com/en-us/library/jj841106.aspx
    • JUMPSTART Tuning SQL Server 2012 for SharePoint 2013 Jump Start 4 hours of video by Bill Baer & Brian Alderman https://www.microsoftvirtualacademy.com/training-courses/tuning-sql-server-2012-forsharepoint-2013-jump-start
    • BIWUG SharePoint User Group www.biwug.be
    • Q&A #sqlserverdays @thomasvochten
    • © 2011 Microsoft Corporation. All rights reserved. Microsoft, Windows, Windows Vista and other product names are or may be registered trademarks and/or trademarks in the U.S. and/or other countries. The information herein is for informational purposes only and represents the current view of Microsoft Corporation as of the date of this presentation. Because Microsoft must respond to changing market conditions, it should not be interpreted to be a commitment on the part of Microsoft, and Microsoft cannot guarantee the accuracy of any information provided after the date of this presentation. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.