View
232
Download
0
Category
Preview:
Citation preview
Understanding SQL Server Database Options for Microsoft Office SharePoint Server 2007 Todd Klindt, WSS MVPSolanite Consultingwww.toddklindt.com/blogwww.solanite.com
WSS MVP since 2006Speaker, writer, consultant, aquariusPersonal Blogwww.toddklindt.com/blogCompany web sitewww.solanite.comE-mailtodd@solanite.com
All around good guy
Who is this Todd guy?
Introduction to how SharePoint uses SQLComparison of different versions of SQL and which is bestThe proper care and feeding of SQL Server for the SharePoint administratorMaybe a SQL 2008 demo or two
Session Objectives And Agenda
How does SharePoint use SQL?WSS & MOSS
Farm configuration is stored in SQL. All SharePoint content is stored in SQL. No exceptions! *
A farm may have multiple Content DatabasesA Site Collection must exist completely in a single Content DatabaseA Content Database may have multiple Site Collections* Except this one.
Central Admin is a site collection and is in its own content databaseSearch gets its own database
SQL? I’m a SharePoint Admin!
MOSS OnlyEach SSP gets a database to store settingsEach SSP gets a Search databaseEach SSP gets a Content database
How SharePoint uses SQL
2000? 2005? 2008?32 bit or 64 bit?Express, Workgroup, Standard or Enterprise
2000 or 2005/2008 is easy, NOT 2000!Reporting ServicesScales better with processors and RAMHas native SMTP mail supportSupports Database Mirroring
Which version of SQL should I use?
Decisions, Decisions....
Consider SP2 if using SQL 2005Major improvements in maintenance wizardData CompressionAnalysis improvements that benefit Excel ServicesImproves integration between MOSS 2007 Report Center and SQL Reporting ServicesFixes reindex problem
Test in test environment first
SQL 2005 SP2
32 bit advantagesBetter supported by existing hardware and softwareExisting SQL servers are likely 32 bitExisting corporate standard is likely 32 bit
64 bit excitementHandles more RAM, up to 16 ExabytesMore efficient which means fewer servers, less energy, less space, fewer licensesCan attach 32 bit databases directlyAny hardware purchased recently probably supports itIt is the wave of the futureMOSS also installs on 64 bit
How many bits, 32 or 64?
The decision ultimately depends on your scalability and availability needs
ExpressSupports 1 CPUSupports up to 1 GB of RAMNo native 64 bit support4 GB Database size limit
MOSS uses SQL 2005 Express if you do the single server install.
Express, Workgroup, Standard or Enterprise?
Download Express Edition Toolkit from https://www.microsoft.com/downloads/details.aspx?familyid=3C856B93-369F-4C6F-9357-C35384179543&displaylang=enDownload Management Studio, https://www.microsoft.com/downloads/details.aspx?familyid=C243A5AE-4BD1-4E3D-94B8-5A0F62BF7796&displaylang=enCan be upgraded to Standard or Enterprise
Install Standard or Enterprise with the following syntax: setup.exe SKUUPGRADE=1
SQL Express options
WorkgroupSupports 2 CPUsMaximum of 3 GB of RAMNo native 64 bit supportNo database size limitNo partitioningCannot be a member of a clusterIncludes Management Studio
SQL 2005 Workgroup Edition
Standard featuresSupports up to 4 CPUs (including cores)Supports OS Maximum RAM, 4 GB of RAM on 32 bit OSFailover is manual and restricted to two nodesSupports Database MirroringNo partitioningNo Analysis ServicesNative 64 bit support
SQL 2005 Standard Edition
Enterprise offers the following advantages
Full SQL 2005 functionalitySupports more than 4 CPUsSupport for up to 32 GB of RAM on 32 bit OS.
OS limitation, not SQL’s
Database PartitioningOnline restoreActive failover for mirrorsKPI and Analysis Server built in
Comparison chart of all the versions at http://www.microsoft.com/sql/prodinfo/features/compare-features.mspx
SQL 2005 Enterprise Edition
Improved Maintenance Plan supportCan be created manually or with the new wizardMaintenance plans can be easily modified with a graphical interfaceMaintenance plans can include a variety of operations, including backupsPlans can use SMTP to email plan success
Check Database IntegrityReindex or Rebuild database IndexesUpdate StatisticsBackupsDefrag the file system
How to keep your SQL server happy
Check Database IntegrityVerifies integrity of databasesUses T-SQL command DBCC checkdbVery disk and CPU intensive
Update StatisticsStatistics help the DB engine decide the most optimal execution pathUpdating these statistics improves the efficiency of queriesYou might trigger it manually if there were a lot of records added or deletedHappens automatically, you should not have to run manuallyUses T-SQL command UPDATE STATISTICS
Maintain Databases
Reindex databasesDefragments database indexesUses T-SQL command DBCC INDEXDEFRAG
Rebuild IndexCompletely recreates the database indexNot needed as oftenCan cause problems with SharePoint
Fixed in SQL 2005 SP2
Uses T-SQL command ALTER INDEXShrinking databases fragments your indexes and your data.
Working with Indexes
BackupCan be done as part of maintenance plan.Three types
FullPartialDifferential
Can use built in software or third party.Red-Gate software allow for database compression and encryption.Results in smaller backupsCould also result in faster backups, if drive speed is the bottleneck
Consider backing up to drive then tape
Doing Backups in your maintenance
Clean up HistoryCleans up old information from Maintenance Plans, SQL Agents and Backup and Restore OperationsLeave as many jobs as you’d likeT-SQL is shown in properties
Maintenance plans can be altered via the UISet up maintenance plans for different intervals; daily, weekly, monthly, quarterly, etc.
Clean up History and maintenance notes
History Cleanup Screenshots
Defrag file systemSQL will be faster if the database files are contiguous in the file systemUsing the built in defrag tool will have performance ramificationsConsider using something like Diskeeper and its intelligent defrag.Consider stopping SQL if possible
Defragment File System
Should you shrink databases or logs?Database size is reduced by dropping unused space.Uses T SQL command DBCC SHRINKDATABASEDo not shrink databases unless something drastic has happened
Massive site or content deletionsRemoving site collections from v2 databasesAbandoning databasesHas a heavy impact on the server
Databases grow, it is what they doGrow operations are slow in SQL and will likely result in a fragmented database fileCreate database with enough space for one year’s worth of growth
To Shrink or not to shrink
Properly configure SQL Surface Area for SharePointUse SP2 if possible, it has improvements for SharePointDo not change SharePoint databases via SQL Queries. Microsoft hates that.Can use SharePoint farm backups to back up SQLDon’t forget to include your System databases in your maintenance plans.SharePoint Service Pack 1 supports SQL 2008
Random SQL and SharePoint notes
My Bloghttp://www.toddklindt.com/blog
Real World SharePointhttp://www.wrox.com/WileyCDA/WroxTitle/productCd-0470168358.html
Prepare your database servers for SharePointhttp://technet2.microsoft.com/windowsserver/WSS/en/library/f7772626-cc01-4698-9dd8-958e60f7cb201033.mspx?mfr=true
Diskeeper white paper on SQL file defragmentationhttp://files.diskeeper.com/pdf/SQLdefragmented.pdfRed-Gate Softwarehttp://www.red-gate.com/Database Maintenance for SharePoint white paper by Bill Baerhttp://go.microsoft.com/fwlink/?LinkId=111531&clcid=0x409
Resources
Questions?
© 2008 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.
Recommended