Data & Database ManagementJanuary 7th, 2009
NYC SharePoint User Group
Presenter: Nilesh Mehta – Sr. SharePoint Architect – NGenious Solutions, Inc.
SharePoint TrainingProject Server Training
Challenge: Managing Challenge: Managing Unexpected data Issues with Unexpected data Issues with SharePointSharePoint• Number of SharePoint Sites• Size of your SharePoint farm• SharePoint Site Backup / Restores• SharePoint Site Corruptions - especially with host header sites
Target AudienceTarget Audience
Mid-scale to large-scale SharePoint implementations Business / Platform Owners SharePoint Administrators SharePoint Developers Need to understand Production limitations
AgendaAgenda
Key messages to remember:Key messages to remember: Think and plan upfront: How big could
your SharePoint environment be in the next two years?
Organize your content databases for easy management, moving and restoring sites
Prepare for potential site corruption: Don’t put too many eggs in one basket
Understanding your Understanding your SharePoint SitesSharePoint Sites
SQL Server ConfigurationSQL Server Configuration
Deciding on the SQL Cluster Configuration
Number of nodes in the Cluster
Number of instances in the cluster
Deciding drives per instance and drive size
SQL Server Configuration - SQL Server Configuration - ExampleExampleTotal data size = 1 TB
2 nodes in the ClusterNumber of instances in the cluster
= 1Deciding drives per instance and drive size
Drives:C: = OSD: = 250 GB (Data)E: = 250 GB (Data)F: = 250 GB (Data)G: = 250 GB (Data)H: = 500 GB (Log)I: = 1 TB (Backup)
Drives:C: = OSD: = 500 GB (Data)E: = 500GB (Data)F: = 500 GB (Log)G: = 1 TB (Backup)
Drives:C: = OSD: = 1 TB (Data)E: = 500 GB (Log)F: = 1 TB (Backup)
Organizing Content Organizing Content Databases at SharePoint Databases at SharePoint LevelLevel Where is my site collection?
How many sites in a content database?
Organizing Content Organizing Content Databases at SharePoint Databases at SharePoint LevelLevel Number of sites in a content database Size of content databases
Best Practices: Naming conventions for Content Database Setting maximum site count in Content
Database Setting site quota on content database
Organizing Content Organizing Content Databases at SharePoint Databases at SharePoint LevelLevel Collaboration Web Application:
Target Content DB sizes around 100 GB for easier management
@ 1 GB Quota = 100 Sites / Content DB. Lock Site Max @ 100 Sites
Custom Content Databases for larger sites above 20 GB. Lock site maximum to single site
Assigning Site Quota 500 Mb, 1 GB, 2GB, 5 GB or larger
Managing Corresponding Managing Corresponding Databases on SQL ServerDatabases on SQL Server•Sites increase, so does database Size•Too many databases •Usage increases, CPU & Memory Usage increases • Get better performance by upgrading to 64-bit
Managing Corresponding Managing Corresponding Databases on SQL ServerDatabases on SQL Server Consider 1st Scenario in Drive Configuration:
@ 1 GB quota & 100 sites, you can have a maximum of two Content DB’s / Drive
Highly possible that some sites will need more than 1GB from these sites
Drives:C: = OSD: = 250 GB (Data) – Collaboration Team sitesE: = 250 GB (Data) – Collaboration Team sitesF: = 250 GB (Data) – Portal sitesG: = 250 GB (Data) – Application sitesH: = 500 GB (Log)I: = 1 TB (Backup)
Managing Corresponding Managing Corresponding Databases on SQL ServerDatabases on SQL Server Options: 1. Add extra drives to the SQL Server 2. Moving Databases between Drives:
Detach database from SQL Server. Move database files as necessary on the
same server Attach database back to SQL Server
No issues from the SharePoint side. SharePoint auto-detects the databases
Cons: You can only add so many drives and will soon run out of drives
Managing Corresponding Managing Corresponding Databases on SQL ServerDatabases on SQL Server Consider 2nd Scenario in Drive Configuration:
@ 1 GB quota & 100 sites, you can have a maximum of four Content DB’s / Drive. Here you do have room to grow in some manner
Tape backup of these drives take more time
Drives:C: = OSD: = 500 GB (Data) – Collaboration Team SitesE: = 500GB (Data) – Portal and Application Team SitesF: = 500 GB (Log)G: = 1 TB (Backup)
Managing Corresponding Managing Corresponding Databases on SQL ServerDatabases on SQL Server Data grows more than 1 TB:
Add more drives to the same cluster instance Based on SQL Server performance, create
another SQL Instance on passive node and add drives there
Create a brand new Cluster and add drives there
Restore sites from SQL backups: Need space to restore SQL backups – twice
the size of the database
Managing Corresponding Managing Corresponding Databases on SQL ServerDatabases on SQL Server Moving Databases across SQL
Cluster: Perform full SQL Backups Perform stsadm –o preparetomove Perform stsadm –o detachcontentdb Copy SQL backup files to new cluster Attach content db’s to the new SQL
Cluster Perform stsadm –o addcontentdb
Moving Sites across Web Moving Sites across Web Applications / Content Applications / Content Databases : STSADM BackupDatabases : STSADM Backup Number of site collections increase Site collections need more space Options:
STSADM Backup / restore – Best Solution for moving sites. Create a batch file for backups, deletes and
restore. Dependency on local file system for backups.
NOTE: Do not delete large sites from central administration. Always use STSADM utility
Moving Sites across Web Moving Sites across Web Applications / Content Applications / Content Databases : Merge Content Databases : Merge Content DBDB Merge Content Database Command
good option for moving large number of sites, but has issues with Multi-Valued columns .
It does not keep the values. Does not work across SQL Instances.
Can move sites only in the same SQL Server Instance.
Moving Sites : Batch Site Moving Sites : Batch Site ManagerManager Batch Site Manager – Another option to
move sites from the Central Administration.
Pros: Allows you to select which database to restore sites in. Works across clusters
Cons – I have had very little success with this. Moved 5 sites and ended up with about 3 corrupt sites. Dependency on local file system disk space for backups and can cause corruption when you run out of disk space either on local server or SQL Server
Moving Sites: Batch Site Moving Sites: Batch Site ManagerManager
Moving Sites: Batch Site Moving Sites: Batch Site ManagerManager
Moving Sites: Batch Site Moving Sites: Batch Site ManagerManager
Special – Managing Host Special – Managing Host Header SitesHeader Sites Syntax for creating Host Header Sites:
Stsadm –o createsite –url http://abc.mycompany.com –ownerlogin –owneremail –sitetemplate –hhurl
Possible corruption caused when moving host header sites from development to staging to production
Example: Host Header Site in Development: http://devabc.mycompany.com Restore site in QA as http://qaabc.mycompany.com (Database keeps
reference to devabc.mycompany.com) Restore site in Production as http://abc.mycompany.com (Database
keeps reference to http://devabc.mycompany.com) Imagine creating multiple sites based on same backup because you
want to keep template. They all will have reference to http://devabc.mycompany.com
When you perform content database detach / attach , configuration database does not know which site was which because they all have same Host Header column value
Special – Managing Host Special – Managing Host Header Sites, Avoiding Header Sites, Avoiding CorruptionsCorruptions Avoiding corruption with Host Header
Sites: When you restore site from Development to
QA or Prod, restore with the same URL http://devabc.mycompany.com
Once restored, perform stsadm –o renamesite command on this URL and it modifies the host header information in database properly
Perform similar action if you have multiple sites coming in from same template
Key messages to remember:Key messages to remember: Think and plan upfront: How big could
your SharePoint environment be in the next two years?
Organize your content databases for easy moving, management and restoring
Prepare for potential site corruption: Don’t put too many eggs in one basket
Questions?Questions?
Thank you & best regardsNilesh MehtaNGenious Solutions, Inc.1075 Easton Ave., Tower1, Suite #6Somerset, NJ 08873Ph: (732) 873-3385Cell: (201) 230-7922Fax: (413) 803-8749E-mail: [email protected]: www.ngenioussolutions.com