30
SQL Server Database Administration for SharePoint Hope Foley Jim Grabinski

SQL Server Database Administration for SharePoint · 2010-02-01 · SQL Server Database Administration for SharePoint Hope Foley Jim Grabinski

  • Upload
    dohanh

  • View
    227

  • Download
    0

Embed Size (px)

Citation preview

SQL Server Database Administration for SharePoint

Hope Foley

Jim Grabinski

Hope Foley

• SQL Server DBA (MCITP: DBA 2005/2008)

• MCTS: MOSS 2007, Configuration

• Principle Microsoft Consultant

Jim Grabinski

• MCTS: SQL Server 2005/2008

• MCTS: MOSS 2007, Configuration

• 4 years working with SharePoint starting with WSS 2.0

• IT Delivery Manager

• Founded in 1997

• IT Professional Services

• Specialization in Oracle and SQL Server Managed Services

• Oracle and Microsoft Gold Partner

• Best Practices and Repeatable Processes

SharePoint database maintainability begins with . . .

• a solid SharePoint architecture

• based a well-defined governance strategy

• and a well-planned deployment

Information Architecture

Web Application

Content Database Content Database

Site Collection

Site Collection

Site Collection

Site Collection

Default Database Names

• SharePoint_AdminContent_a11f2b67-db6d-4556-9ab8-ec6e7b14042e

• SharePoint_Config

• SharedServices1_DB

• SharedServices1_Search_DB

• WSS_Content

• WSS_Content_9a9ae377-0042-4c52-8b46-ef4ee71715f0

• WSS_Content_3d90d4a5-b8b0-4151-adb5-02da7697b5f4

• WSS_Search_DC1

Database Naming ConventionDatabase Initial Size What are all these databases for?

SharePoint_Admin_Content 60 MB Site collection content for the Central Administration

SharePoint_Config 10 MB Hosts configuration information that is common to all members of the farm

SharePoint_Content_Intranet 14 MB Intranet content database

SharePoint_Content_MySite 14 MB MySite content database

SharePoint_Content_SSP1 14 MB Content database for SSP administration site

SharePoint_Search_DC1 60 MB Crawl database of SharePoint help file

SharePoint_SSP1_DB 10 MB Shared services specific data

SharePoint_SSP1_Search_DB 3 MB Search related data from indexing (Property Store, URL Maps)

Service Accounts

• Setup/Configuration Account (spadmin)

– Used to run the psconfig utility, SharePoint Product and Technologies Wizard, and to create Web applications

– Member of the local Administrators group on the SharePoint servers

– Member of the dbcreator and securityadmin roles in SQL Server

• Farm Database Access Account (spfarm)

– Identity of the SharePoint Central Administration application pool

– Identity of the Windows SharePoint Services Timer service

– Member of the db_owner role on all Office SharePoint Server 2007 databases within the instance

– Only account with write access to the SharePoint configuration database

• Search service, content access, SSP service, Web application process accounts . . .

• Windows Authentication strongly recommended for all database access accounts

SharePoint Products and Technologies Configuration Wizard

• "%PROGRAMFILES%\Common Files\Microsoft Shared\Web Server Extensions\12\BIN"

• psconfig -cmd configdb -create -server ALIAS-DC1 -database SharePoint_Config -user DEMO\spfarm -password ""-admincontentdatabaseSharePoint_Admin_Content

Show and Tell

• Database naming convention

• Database roles and security

• Web application settings

• Default quota templates

• Content databases

• SharePoint native backup and restore

• Windows scheduled tasks

If you have the luxury of being in on and having a say in the configuration of the

database…pinch yourself.

Important pieces to consider when setting things up from scratch:

• RAID levels

• File Locations

• Disk Configuration

• File sizing

RAID Levels

• RAID 0, 1, 5, 1+0 are ones typically used for SQL Server

• RAID 0 (striping) – not fault tolerant• RAID 1 (mirroring) – better for writes• RAID 5 (striping with parity) – most often used

due to cost. Great read performance – more write overhead

• RAID 1+0 (striped mirrors) – most expensive and of course best for database performance

File Locations

• Databases all have data and log files

• Separating data files from log files on separate arrays can give great boosts to performance

• Can set default locations for data and log files

Optimal Disk Configuration

C:\OS files

D:\SQL Server data files

E:\SQL Server log files

F:\SQL Server tempdb files (one file per processor)

G:\SQL Server backups

Data/Log File Sizing

Best Practice warning:

You should size your databases appropriately from the very beginning and do not allow autogrowth. This will eliminate fragmentation of disk.

Things to do after setup…

• Maintenance plans

• Database mail and operators

• Setup alerts

• Job failure notifications

Integrity checks

• End all be all vital thing that must be done no matter what

• Detects corruption (torn pages)

• If corruption occurs the last step in the fix it book is to restore from backup. If you have never done a integrity check…good luck figuring out when corruption occurred

• I recommend daily

Reindexing

• SharePoint uses GUIDs for primary keys – this can lead to heavy fragmentation

• If on 2005 prior to SP2 – don’t do via maintenance plan

• Conditional reindexing best

• Fill factor – 70 said to be best for SharePoint (general rule for dbs is 80 or even 90)

Give me some warning…

You can get alerts/notifications for all kinds of bad mojo going on in SQL Server.

1. Setup Database Mail

2. Setup an operator

3. Setup alerts (17 – 25, log full, io, memory)

4. Job failure notifications

5. Threshold alerts if need calls for it

Show and Tell

• Defaults for data/log files

• Change file growth/max

• Add files for tempdb

• Setup Maintenance plans

• Setup operator and alerts

• Additional things can do with alerts

• Time permitting: Database mail

Please free to contact us

• E-mail:

[email protected]

[email protected]

• Twitter:

– @PerpetualTech

– @grabinski