sharepoint and sql server database management
DESCRIPTION
If you are an DBA or and Systems Administrator at an organisation where SharePoint has been deployed you may wonder why it needs so many databases. This session covers what these are and what you should be doing to look after them.This session will outline the SharePoint 2010 architecture and what planning you'll need to do to keep SharePoint performing by ensuring that your exsisting SQL server deployments can cope with SharePoint demands.TRANSCRIPT
![Page 1: SharePoint and SQL Server Database Management](https://reader034.vdocument.in/reader034/viewer/2022051109/5484fd7cb47959d30c8b4d48/html5/thumbnails/1.jpg)
Chandima Kulathilake MCTS/MVP (SharePoint) www.chandima.net/blog www.knowledgecue.com
![Page 2: SharePoint and SQL Server Database Management](https://reader034.vdocument.in/reader034/viewer/2022051109/5484fd7cb47959d30c8b4d48/html5/thumbnails/2.jpg)
Chandima – aka “Chan” @chandimak on twitter
Solutions Architect @ Knowledge Cue - SharePoint Consulting in New Zealand
Started with SharePoint 2001... It‟s been a great journey
SharePoint MVP since 2007
www.chandima.net/blog
![Page 3: SharePoint and SQL Server Database Management](https://reader034.vdocument.in/reader034/viewer/2022051109/5484fd7cb47959d30c8b4d48/html5/thumbnails/3.jpg)
Help with strategy and planning for SharePoint Sense making for large enterprise projects Pre RFP stage expectation setting SharePoint best practices/ “real world” balancing act Consulting and deployment support Microsoft certified SharePoint experts @knowledgecue on twitter www.knowledgecue.co.nz
![Page 4: SharePoint and SQL Server Database Management](https://reader034.vdocument.in/reader034/viewer/2022051109/5484fd7cb47959d30c8b4d48/html5/thumbnails/4.jpg)
Introduction to SharePoint 2010
Introduction to how SharePoint uses SQL
Planning for the SQL databases
SP2010 Deployment Planning Guidelines
![Page 5: SharePoint and SQL Server Database Management](https://reader034.vdocument.in/reader034/viewer/2022051109/5484fd7cb47959d30c8b4d48/html5/thumbnails/5.jpg)
SharePoint Server 2010 64-bit only
Requires 64-bit Windows Server 2008 or 64-bit Windows Server 2008 R2
Requires 64-bit SQL Server 2008 SP1 or SQL Server 2008R2
SQL Server 2005 + SP3 and CU (64bit)
http://tinyurl.com/SPSysReq
![Page 6: SharePoint and SQL Server Database Management](https://reader034.vdocument.in/reader034/viewer/2022051109/5484fd7cb47959d30c8b4d48/html5/thumbnails/6.jpg)
WFE – Some changes, mostly optimization
App Server – Many changes
SQL – Some changes, heavy optimization
Sum total is:
Architecture is familiar, but there are many more design choices now
2010 is far more flexible than 2007 (yet complex)
Web Tier
Application Tier
SQL Tier
![Page 7: SharePoint and SQL Server Database Management](https://reader034.vdocument.in/reader034/viewer/2022051109/5484fd7cb47959d30c8b4d48/html5/thumbnails/7.jpg)
Access Services
Business Data Catalog
Excel Services
Managed Metadata Service
People
Search Service Application
Secure Store Service
State Service
Usage and Health data collection
Visio Graphics Service
Web Analytics Service Application
Word Conversion Service Application
http://hrweb/ http://itweb/
Search User
Profiles Excel
Calc
Visio
3rd
party
Service
BDC
WAC
![Page 8: SharePoint and SQL Server Database Management](https://reader034.vdocument.in/reader034/viewer/2022051109/5484fd7cb47959d30c8b4d48/html5/thumbnails/8.jpg)
No longer a separate SSP web site SA‟s managed via central admin
Pick and choose your service apps (SA) If you don‟t need a service app, don‟t add it
Web apps can consume SAs on an individual basis
Each web app can use any combination of all available SA‟s
Deploy multiple instances of the same SA Just give each one a unique name
Reuse SA instances across multiple web apps in farm
![Page 9: SharePoint and SQL Server Database Management](https://reader034.vdocument.in/reader034/viewer/2022051109/5484fd7cb47959d30c8b4d48/html5/thumbnails/9.jpg)
SSP
MOSS 2007 Model
http://hrweb/
Search User
Profiles
Excel
Calc
Corp Farm
BDC
http://hrweb/
Corp Farm
SP2010 Model
http://itweb/ http://itweb/
Search User
Profiles
Excel
Calc
Visio
3rd party
Service
BCS
WAC
![Page 10: SharePoint and SQL Server Database Management](https://reader034.vdocument.in/reader034/viewer/2022051109/5484fd7cb47959d30c8b4d48/html5/thumbnails/10.jpg)
Foundation Services
App Discovery
and Load
Balancing
Security Token Secure Store Managed
Metadata
Structural Services
Office Web Apps Excel Services User Profiles Business Data
Connectivity
Word Automation Web Analytics Access Services Performance
Point
Enterprise
Search FAST Search Visio Graphics
Functional Services
![Page 11: SharePoint and SQL Server Database Management](https://reader034.vdocument.in/reader034/viewer/2022051109/5484fd7cb47959d30c8b4d48/html5/thumbnails/11.jpg)
Service Applications with their own DB: Search (3)
User Profile (3)
Managed Metadata
Secure Store
State Service (2*) aspnet_sessiondb
Business Data Connectivity
Web Analytics (2)
Performance Point
Usage and Health data collection
Word Automation
![Page 12: SharePoint and SQL Server Database Management](https://reader034.vdocument.in/reader034/viewer/2022051109/5484fd7cb47959d30c8b4d48/html5/thumbnails/12.jpg)
Service Application Database * Relative Size
Usage and Health Data Collection Service Application Usage Extra Large
Business Data Connectivity (BCS) Service Application Business Data Connectivity Small
Application Registry Service Application Application Registry Small
SharePoint Foundation Subscription Settings Service Subscription Settings Small
Search Service Application Search Administration Medium
Search Service Application Crawl Extra Large
Search Service Application Property Large > Extra
Large
Web Analytics Service Application Reporting Extra Large
Web Analytics Service Application Staging Medium
State Service Application, Visio Service Application, InfoPath
Forms Services
State Medium > Large
User Profile Service Application Profile Medium > Large
User Profile Service Application Synchronization Medium > Large
User Profile Service Application Social Tagging Small > Extra
Large
Managed Metadata Service Application Managed Metadata Medium
Secure Store Service Application Secure Store Small
Word Automation Service Application Word Automation Services Small
PerformancePoint Service Application PerformancePoint Small
![Page 13: SharePoint and SQL Server Database Management](https://reader034.vdocument.in/reader034/viewer/2022051109/5484fd7cb47959d30c8b4d48/html5/thumbnails/13.jpg)
Many more databases to manage Most service applications will have their own database
People service has 3, Search can have multiple crawl and property store databases
Snapshot management You can force snapshots during backup
Content Deployment will support working off snapshots
Unattached content database restore Browse through a content database that isn‟t joined to a farm to find content to restore
Remote Blob Storage API Replaces External Blob Storage (EBS) from SharePoint 2007
Supports file stream providers for external storage
![Page 14: SharePoint and SQL Server Database Management](https://reader034.vdocument.in/reader034/viewer/2022051109/5484fd7cb47959d30c8b4d48/html5/thumbnails/14.jpg)
SharePoint content/configuration settings are stored in SQL databases
A deployment may have multiple content databases
A site collection must exist completely in a single content database
A content database may have multiple site collections
Service applications get their own content databases
![Page 15: SharePoint and SQL Server Database Management](https://reader034.vdocument.in/reader034/viewer/2022051109/5484fd7cb47959d30c8b4d48/html5/thumbnails/15.jpg)
How does that GUID stuff happen?
![Page 16: SharePoint and SQL Server Database Management](https://reader034.vdocument.in/reader034/viewer/2022051109/5484fd7cb47959d30c8b4d48/html5/thumbnails/16.jpg)
Plan before you Install...
As DBA you can create the DB‟s before the install (Give proper names)
![Page 17: SharePoint and SQL Server Database Management](https://reader034.vdocument.in/reader034/viewer/2022051109/5484fd7cb47959d30c8b4d48/html5/thumbnails/17.jpg)
Service account for SQL Services
SharePoint Setup Account
SharePoint Farm Service Account
Used by the CA web site application pool
![Page 18: SharePoint and SQL Server Database Management](https://reader034.vdocument.in/reader034/viewer/2022051109/5484fd7cb47959d30c8b4d48/html5/thumbnails/18.jpg)
SharePoint Setup Account (Used to setup SP2010)
dbcreator
public
securityadmin
Rest of it is applied per Service Application/Managed account via provisioning
![Page 19: SharePoint and SQL Server Database Management](https://reader034.vdocument.in/reader034/viewer/2022051109/5484fd7cb47959d30c8b4d48/html5/thumbnails/19.jpg)
![Page 20: SharePoint and SQL Server Database Management](https://reader034.vdocument.in/reader034/viewer/2022051109/5484fd7cb47959d30c8b4d48/html5/thumbnails/20.jpg)
Created when a new SharePoint web application is created
Container for all site specific data
Site Collections
Lists
Libraries
etc
![Page 21: SharePoint and SQL Server Database Management](https://reader034.vdocument.in/reader034/viewer/2022051109/5484fd7cb47959d30c8b4d48/html5/thumbnails/21.jpg)
Establish target sizes
Plan to put one or more site collections in dedicated databases
Avoid more than 250 site collections in a single database
Max content databases per web app : 100
Number of site collections per content database keep it less than 250*
![Page 22: SharePoint and SQL Server Database Management](https://reader034.vdocument.in/reader034/viewer/2022051109/5484fd7cb47959d30c8b4d48/html5/thumbnails/22.jpg)
Number of documents = D
Average size of documents = S
Number of List items = L
Number of versions = V (must be above zero)
10KB = Constant for Meta data values
DB Size = ((D x V) x S) + (10KB X (L + (V x D)))
![Page 23: SharePoint and SQL Server Database Management](https://reader034.vdocument.in/reader034/viewer/2022051109/5484fd7cb47959d30c8b4d48/html5/thumbnails/23.jpg)
Input Value
Number of documents (D) 200,000
Average size of documents (S) 250KB
List items (L) 600,000
Number of non-current versions (V) 2 (Assuming most number of versions
allowed is 10)
Database size = (((200,000 x 2)) × 250) +
((10 KB × (600,000 + (200,000 x 2))) =
110,000,000 KB or 105 GB
![Page 24: SharePoint and SQL Server Database Management](https://reader034.vdocument.in/reader034/viewer/2022051109/5484fd7cb47959d30c8b4d48/html5/thumbnails/24.jpg)
Content Database Size per Database Instance Recommendation 50-100 GIG: It‟s all about your SLA. If something goes down, how long can you be offline for?
Backup and Restore take time in two ways:
Backup: The larger the database the longer the backup.
Restore: The larger the database the longer the restore process.
![Page 25: SharePoint and SQL Server Database Management](https://reader034.vdocument.in/reader034/viewer/2022051109/5484fd7cb47959d30c8b4d48/html5/thumbnails/25.jpg)
Quotas at Web App > Site Collection level
Autogrow at DB level
Can pregrow the content databases
http://tinyurl.com/SP2010SQLPlan
![Page 26: SharePoint and SQL Server Database Management](https://reader034.vdocument.in/reader034/viewer/2022051109/5484fd7cb47959d30c8b4d48/html5/thumbnails/26.jpg)
Make sure that your Business engages with you for the next SharePoint deployment
Understand your storage and High Availability solutions and what it means in terms of $$$ and sense to provide that
![Page 27: SharePoint and SQL Server Database Management](https://reader034.vdocument.in/reader034/viewer/2022051109/5484fd7cb47959d30c8b4d48/html5/thumbnails/27.jpg)
2005? 2008?
32 bit or 64 bit?
Standard or Enterprise
2005 > 2008 is recommended
2008 R2 is best (as they say)
![Page 28: SharePoint and SQL Server Database Management](https://reader034.vdocument.in/reader034/viewer/2022051109/5484fd7cb47959d30c8b4d48/html5/thumbnails/28.jpg)
SP3 is required when using SQL 2005
Major improvements in maintenance wizard
Data Compression
Analysis Services improvements
![Page 29: SharePoint and SQL Server Database Management](https://reader034.vdocument.in/reader034/viewer/2022051109/5484fd7cb47959d30c8b4d48/html5/thumbnails/29.jpg)
Enterprise offers the following advantages
Full SQL 2005 functionality (DB+AS+IS+RS)
Supports more than 4 CPUs
Support for up to OS Max RAM
Database Partitioning
Online restore
Active failover for mirrors
Comparison chart of all the versions at http://www.microsoft.com/sql/prodinfo/features/compare-features.mspx
![Page 30: SharePoint and SQL Server Database Management](https://reader034.vdocument.in/reader034/viewer/2022051109/5484fd7cb47959d30c8b4d48/html5/thumbnails/30.jpg)
Use a custom maintenance plan to perform the following maintenance tasks against SharePoint databases:
Check database integrity > DBCC CHECKDB Impacts performance (safe to run at low load times)
Reorganize indexes
Reduce size of database files > DBCC SHRINKFILE
Monthly or quarterly as part of maintenance
![Page 31: SharePoint and SQL Server Database Management](https://reader034.vdocument.in/reader034/viewer/2022051109/5484fd7cb47959d30c8b4d48/html5/thumbnails/31.jpg)
Don‟t include DBCC SHRINKDATABASE as an auto step in your plans
DBCC SHRINKFILE is the way to go for SharePoint
http://www.sqlskills.com/BLOGS/KIMBERLY/post/Database-Maintenance-Best-Practices-Part-I-e28093-clarifying-ambiguous-recommendations-for-Sharepoint.aspx
Kimberly Tripp – sqlskills.com
![Page 32: SharePoint and SQL Server Database Management](https://reader034.vdocument.in/reader034/viewer/2022051109/5484fd7cb47959d30c8b4d48/html5/thumbnails/32.jpg)
Content databases (Very Important)
Databases required for Service applications
Search databases
Consider use of System Centre Data Protection Manager http://www.microsoft.com/systemcenter/dpm/workloads/sharepoint.mspx
![Page 33: SharePoint and SQL Server Database Management](https://reader034.vdocument.in/reader034/viewer/2022051109/5484fd7cb47959d30c8b4d48/html5/thumbnails/33.jpg)
Backup
Can be done as part of maintenance plan.
Three types Full
Partial
Differential
Can use built in software or third party. Redgate, Quest software allow for database compression and encryption.
Results in smaller backups
Could also result in faster backups, if drive speed is the bottleneck
![Page 34: SharePoint and SQL Server Database Management](https://reader034.vdocument.in/reader034/viewer/2022051109/5484fd7cb47959d30c8b4d48/html5/thumbnails/34.jpg)
Clean up History
Cleans up old information from Maintenance Plans, SQL Agents and Backup and Restore Operations
Leave as many jobs as you‟d like
T-SQL is shown in properties
Maintenance plans can be altered via the UI
Set up maintenance plans for different intervals; daily, weekly, monthly, quarterly, etc.
![Page 35: SharePoint and SQL Server Database Management](https://reader034.vdocument.in/reader034/viewer/2022051109/5484fd7cb47959d30c8b4d48/html5/thumbnails/35.jpg)
Should you shrink databases or logs?
Database size is reduced by dropping unused space.
Uses T SQL command DBCC SHRINKFILE instead of DBCC SHRINKDATABASE
Do not shrink databases unless something drastic has happened
Massive site or content deletions
Removing site collections from old content databases
Abandoning databases
Has a heavy impact on the server
Databases grow, it is what they do
Grow operations can be slow in SQL and will likely result in a fragmented database file
Create database with enough space for one year‟s worth of growth
Size on Disk
120GB
Size on Disk
100GB
Used Space
Free Space
![Page 36: SharePoint and SQL Server Database Management](https://reader034.vdocument.in/reader034/viewer/2022051109/5484fd7cb47959d30c8b4d48/html5/thumbnails/36.jpg)
For example, if your SQL server name is „SQLSERVER1‟, use something like „SPSQL‟ to connect, and have DNS point to the proper server location. This makes it MUCH more flexible.
![Page 37: SharePoint and SQL Server Database Management](https://reader034.vdocument.in/reader034/viewer/2022051109/5484fd7cb47959d30c8b4d48/html5/thumbnails/37.jpg)
Tier C – Phase 3
x86 (MOSSWEB1) x86 (MOSSWEB2) x64 (SPWEB1) x64 (SPWEB2)
Tier A – Phase 1
x64 (SQLSERVER08) x86 (SQL)
SOURCE (32bit) FARM A DESTINATION (64bit) FARM B
Tier B – Phase 2
x86 (MOSSAPP1) x64 (SPAPP1)
![Page 38: SharePoint and SQL Server Database Management](https://reader034.vdocument.in/reader034/viewer/2022051109/5484fd7cb47959d30c8b4d48/html5/thumbnails/38.jpg)
Web Front End
Servers (WFE)
Good
Dual/Quad Core Processors
4GB for WFE (Virtualised)
8GB for APP (Virtualised)
8-12GB for SQL < Dedicated
Suitable for typical medium size organisation in NZ (200-500 users)
• Collaboration sites
• Project Sites
• Intranet
Application
Servers (WFE)
Database
Backend (Shared)
![Page 39: SharePoint and SQL Server Database Management](https://reader034.vdocument.in/reader034/viewer/2022051109/5484fd7cb47959d30c8b4d48/html5/thumbnails/39.jpg)
Web Front End
Servers (WFE)
Better
Dual/Quad Core Processors
4GB for WFE (Virtualised)
6>8GB for APP
8-12GB for SQL on a cluster or log shipping
Can support more than 1000 users
Application
Servers (WFE)
Database
Backend (Shared)
![Page 40: SharePoint and SQL Server Database Management](https://reader034.vdocument.in/reader034/viewer/2022051109/5484fd7cb47959d30c8b4d48/html5/thumbnails/40.jpg)
Web Front End
Servers (WFE)
Best (Large high availability)
Quad Core Processors
8GB for WFE x 2
8>12GB for APP x 2
16>32GB for SQL on a cluster with log shipping/mirror
10k users
Application
Servers (WFE)
Database
Backend
(Dedicated)
NLB
![Page 41: SharePoint and SQL Server Database Management](https://reader034.vdocument.in/reader034/viewer/2022051109/5484fd7cb47959d30c8b4d48/html5/thumbnails/41.jpg)
Mostly like this…
Slow perf
Ad-hoc backups
No planning
Mixed expectations
Dissatisfied users/business
Web /App
Server
Virtualised all in
one box!
Database
Backend
(Shared with lots
of other apps)
![Page 42: SharePoint and SQL Server Database Management](https://reader034.vdocument.in/reader034/viewer/2022051109/5484fd7cb47959d30c8b4d48/html5/thumbnails/42.jpg)
Mike Watson –
www.sharepointmadscientist.com
![Page 43: SharePoint and SQL Server Database Management](https://reader034.vdocument.in/reader034/viewer/2022051109/5484fd7cb47959d30c8b4d48/html5/thumbnails/43.jpg)
SQL and SharePoint page on TechNet
http://tinyurl.com/SQLSP2010
I will put a link and do a summary of this talk on my blog
http://www.chandima.net/Blog/
![Page 44: SharePoint and SQL Server Database Management](https://reader034.vdocument.in/reader034/viewer/2022051109/5484fd7cb47959d30c8b4d48/html5/thumbnails/44.jpg)