Transcript
Page 1: Mehta - SharePoint Data And Database Management

Data & Database ManagementJanuary 7th, 2009

NYC SharePoint User Group

Presenter: Nilesh Mehta – Sr. SharePoint Architect – NGenious Solutions, Inc.

Page 2: Mehta - SharePoint Data And Database Management

SharePoint TrainingProject Server Training

Page 3: Mehta - SharePoint Data And Database Management

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

Page 4: Mehta - SharePoint Data And Database Management

Target AudienceTarget Audience

Mid-scale to large-scale SharePoint implementations Business / Platform Owners SharePoint Administrators SharePoint Developers Need to understand Production limitations

Page 5: Mehta - SharePoint Data And Database Management

AgendaAgenda

Page 6: Mehta - SharePoint Data And Database Management

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

Page 7: Mehta - SharePoint Data And Database Management

Understanding your Understanding your SharePoint SitesSharePoint Sites

Page 8: Mehta - SharePoint Data And Database Management

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

Page 9: Mehta - SharePoint Data And Database Management

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)

Page 10: Mehta - SharePoint Data And Database Management

Organizing Content Organizing Content Databases at SharePoint Databases at SharePoint LevelLevel Where is my site collection?

How many sites in a content database?

Page 11: Mehta - SharePoint Data And Database Management

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

Page 12: Mehta - SharePoint Data And Database Management

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

Page 13: Mehta - SharePoint Data And Database Management

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

Page 14: Mehta - SharePoint Data And Database Management

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)

Page 15: Mehta - SharePoint Data And Database Management

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

Page 16: Mehta - SharePoint Data And Database Management

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)

Page 17: Mehta - SharePoint Data And Database Management

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

Page 18: Mehta - SharePoint Data And Database Management

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

Page 19: Mehta - SharePoint Data And Database Management

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

Page 20: Mehta - SharePoint Data And Database Management

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.

Page 21: Mehta - SharePoint Data And Database Management

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

Page 22: Mehta - SharePoint Data And Database Management

Moving Sites: Batch Site Moving Sites: Batch Site ManagerManager

Page 23: Mehta - SharePoint Data And Database Management

Moving Sites: Batch Site Moving Sites: Batch Site ManagerManager

Page 24: Mehta - SharePoint Data And Database Management

Moving Sites: Batch Site Moving Sites: Batch Site ManagerManager

Page 25: Mehta - SharePoint Data And Database Management

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

Page 26: Mehta - SharePoint Data And Database Management

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

Page 27: Mehta - SharePoint Data And Database Management

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

Page 28: Mehta - SharePoint Data And Database Management

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 


Recommended