SQL Best Practices for SharePoint admins, the reluctant DBA ITP324 - - PowerPoint PPT Presentation

sql best practices for sharepoint admins the reluctant dba
SMART_READER_LITE
LIVE PREVIEW

SQL Best Practices for SharePoint admins, the reluctant DBA ITP324 - - PowerPoint PPT Presentation

SQL Best Practices for SharePoint admins, the reluctant DBA ITP324 Todd Klindt Todd Klindt, MVP Solanite Consulting, Inc. http://www.solanite.com http://www.toddklindt.com/blog todd@solanite.com Author, Inside SharePoint


slide-1
SLIDE 1

SQL Best Practices for SharePoint admins, the reluctant DBA

ITP324 Todd Klindt

slide-2
SLIDE 2

 Todd Klindt, MVP

  • Solanite Consulting, Inc.
  • http://www.solanite.com
  • http://www.toddklindt.com/blog
  • todd@solanite.com
  • Author, Inside SharePoint 2007

Administration and Real World SharePoint

  • 2007. Speaker at many conferences
slide-3
SLIDE 3

Session Agenda

 Overview of how SharePoint uses SQL  Overview of SQL versions and which you

would use for what

 Care and feeding Best Practices for your

SQL server

 A couple of cool SQL 2008 features to

consider

slide-4
SLIDE 4

SQL? I’m a SharePoint admin!

 WSS & MOSS  Farm configuration is stored in SQL.  All SharePoint content is stored in SQL.

No exceptions! *

 Central Admin is a site collection and is in

its own content database

 Search gets its own database

  • * Except one.
slide-5
SLIDE 5

Content Databases

 A farm may have multiple Content

Databases

 A Site Collection must exist completely in

a single Content Database

 A Content Database may have multiple

Site Collections

 Multiple SSP databases

slide-6
SLIDE 6

Which version of SQL?

 SQL 2005 or 2008  64 bit  SQL 2000  32 bit  Basic Install

slide-7
SLIDE 7

Standard or Enterprise?

 Standard features

  • Supports up to 4 CPUs (including cores)
  • Supports OS Maximum RAM, 4 GB of RAM
  • n 32 bit OS
  • Failover is manual and restricted to two

nodes

  • Supports Database Mirroring
  • Native 64 bit support
slide-8
SLIDE 8

Movin’ on up.

 Full SQL 2005 functionality

  • Supports more than 4 CPUs
  • Support for up to 32 GB of RAM on 32 bit

OS, OS limitation, not SQL’s

  • Active failover for mirrors
  • KPI and Analysis Server built in
  • Comparison chart of all the versions at

http://www.microsoft.com/sql/prodinfo/feature s/compare-features.mspx

slide-9
SLIDE 9

Keep your SQL server happy

 Maintenance Plans

  • Can be created manually or with a wizard
  • Easily modified with a graphical interface
  • Can include a variety of operations, including

backups

  • Can use SMTP to email plan success
slide-10
SLIDE 10

What should I do in these?

 Check Database Integrity  Reindex or Rebuild database Indexes  Update Statistics  Backups  Defrag the file system

slide-11
SLIDE 11

Things you should do

 Check Database Integrity

  • Verifies integrity of databases
  • Uses T-SQL command DBCC checkdb
  • Very disk and CPU intensive
slide-12
SLIDE 12

Statistics

 Update Statistics

  • Statistics help the DB engine decide the

most optimal execution path

  • Updating these statistics improves the

efficiency of queries

  • You might trigger it manually if there were a

lot of records added or deleted

  • Happens automatically, you should not have

to run manually

slide-13
SLIDE 13

Indexes

 Reindex databases

  • Defragments database indexes

 Rebuild Index

  • Completely recreates the database index
  • Not needed as often
  • Shrinking databases fragments your indexes

and your data.

slide-14
SLIDE 14

Backups

 Can be part of maintenance plan.  Three types

  • Full
  • Partial
  • Differential

 Transaction logs

slide-15
SLIDE 15

More Backup best practices

 Can use built in software or third party.

  • Idera and Quest software allow for database

compression and encryption.

  • Results in smaller backups
  • Could also result in faster backups, if drive

speed is the bottleneck

 SQL 2008 Enterprise support

compression and encryption out of the box

slide-16
SLIDE 16

File system fragmentation

  • SQL will be faster if the database files are

contiguous in the file system

  • Using the built in defrag tool will have

performance ramifications

  • Consider using something like Diskeeper

and its intelligent defrag.

  • Consider stopping SQL if possible
slide-17
SLIDE 17

Drink me

 Database size is reduced by dropping

unused space.

 Do not shrink databases unless

something drastic has happened

  • Massive site or content deletions
  • Removing site collections from v2 databases
  • Abandoning databases

 Has a heavy impact on the server

slide-18
SLIDE 18

Eat me

 Databases grow, it is what they do  Grow operations are slow in SQL and will

likely result in a fragmented database file

 Create database with enough space for

  • ne year’s worth of growth
slide-19
SLIDE 19

Database Best Practices

 Create multiple TempDB files  Put database and corresponding

transaction logs on different spindles

 Arrange databases according to speed  Use autogrow sparingly  Keep your databases under 100 GB  Use multiple content databases

slide-20
SLIDE 20

More points to ponder

 Do not alter databases. Microsoft HATES

that

 If using SQL 2005, install SP2  Can use SharePoint farm backups to

back up SQL

 Don’t forget your System databases  SharePoint SP1 supports SQL 2008

slide-21
SLIDE 21

A LITTLE NOODLING AROUND IN SQL

Here we’ll look at some of the things we’ve covered

slide-22
SLIDE 22

Thank you for attending! (This slide must always be the last slide in your deck)

Please be sure to fill out your session evaluation!