VITALE, CATURANO & COMPANY LTD Microsoft SharePoint Databases Overview VITALE, CATURANO & COMPANY LTD SharePoint Developer Series – SharePoint Database Overview.: Michael Williams :. May 19, 2005
VITALE, CATURANO & COMPANY LTD Microsoft SharePoint Databases Overview 2 I.Hack The SharePoint Databases II.Windows SharePoint Services Database Overview i.Configuration Database ii.Content Database iii.Portal Server Databases III.Warning IV.Best Practices V.Resources VI.Questions Session Agenda
VITALE, CATURANO & COMPANY LTD Microsoft SharePoint Databases Overview 3 Hack The SharePoint Databases SQL Profiler Watch SharePoint and learn! Restart IIS to flush configuration cache Query Analyzer Show Execution Plan
VITALE, CATURANO & COMPANY LTD Microsoft SharePoint Databases Overview 4 Configuration Database Core Configuration Sites Virtual Servers Databases Web Farm Services Servers Global Configuration Tables Web DB Config Load Balancing
VITALE, CATURANO & COMPANY LTD Microsoft SharePoint Databases Overview 5 Configuration Database – Core Configuration Virtual server consists of several databases Databases are comprised of many site collections
VITALE, CATURANO & COMPANY LTD Microsoft SharePoint Databases Overview 6 Configuration Database – Web Farm Servers can host multiple services, i.e., database & web Multiple servers for every virtual server instance IIS virtual server ID maps to SharePoint ID in Windows Registry
VITALE, CATURANO & COMPANY LTD Microsoft SharePoint Databases Overview 7 Configuration Database – Global Configuration Tables Farm-wide configuration settings Anti-virus vendors Custom templates Web part packages What’s available in the farm Each virtual server Each physical machine Installed Web Part Packages
VITALE, CATURANO & COMPANY LTD Microsoft SharePoint Databases Overview 8 Content Database Core content Web parts Alerts Security Document management Web site management Global tables Web DB Config Load Balancing
VITALE, CATURANO & COMPANY LTD Microsoft SharePoint Databases Overview 9 Content Database – Core Content Sites Site collections Webs Web sites Docs Files & folders Lists List metadata User Data List items SitesWebsDocs Lists User Data
VITALE, CATURANO & COMPANY LTD Microsoft SharePoint Databases Overview 10 Content Database – Core Content - Sites ID Content ID maps to Configuration DB Full URL Creation time name Owner & 2nd Contact Information and NOT security Quotas Disk and users Bandwidth unavailable Search optimization Last change time stamps
VITALE, CATURANO & COMPANY LTD Microsoft SharePoint Databases Overview 11 Content Database – Core Content - Webs Server-relative URL Parent Web ID Site Settings Microsoft FrontPage Navigation Usage Meta-data information Theme(s) ACL (security)
VITALE, CATURANO & COMPANY LTD Microsoft SharePoint Databases Overview 12 Content Database – Core Content - Docs Path Directory name Leaf name (file) Size (quotas) Shared content Setup path Content on-demand Check-in / check-out Sandbox for edits and updates Trigger for deletes (quota)
VITALE, CATURANO & COMPANY LTD Microsoft SharePoint Databases Overview 13 Content Database – Core Content - Lists Name & description Type Document library, survey, etc. Fields ACL (security) List-level access control Event handler inserts
VITALE, CATURANO & COMPANY LTD Microsoft SharePoint Databases Overview 14 Content Database – Core Content – User Data Built-in fields Version Author / Editor Create / Modify date & time Quota (size) Custom fields Very wide table Sparsely populated Trigger for deletes (quota)
VITALE, CATURANO & COMPANY LTD Microsoft SharePoint Databases Overview 15 Content Database – Web Parts Web Parts Shared parts Personal parts View CAML (Collaborative Application Markup Language) Personalization Personalized properties Docs Web Parts Personalization
VITALE, CATURANO & COMPANY LTD Microsoft SharePoint Databases Overview 16 Content Database – Web Parts – Web Parts Page URL Which page contains web part Zone Where on the page Order within zone Personal parts (User ID) View parts CAML for SharePoint views
VITALE, CATURANO & COMPANY LTD Microsoft SharePoint Databases Overview 17 Content Database – Web Parts – Personalization User Zone Ordering Part properties Specific to part
VITALE, CATURANO & COMPANY LTD Microsoft SharePoint Databases Overview 18 Content Database – Alerts Event Cache All “alertable” events Skipped if no alerts Event Log Events for scheduled alerts (not immediate) Immed Subscriptions Immediate alerts Sched Subscriptions Daily or weekly alerts Sched Subscriptions Event Cache Immed Subscriptions Event Log
VITALE, CATURANO & COMPANY LTD Microsoft SharePoint Databases Overview 19 Content Database – Alerts – Immediate Immediate Alerts Timer Job Every 5 minutes Join cache and subscriptions Queue alerts to log Flush cache Event Cache Immed Subscriptions Alert Timer Job
VITALE, CATURANO & COMPANY LTD Microsoft SharePoint Databases Overview 20 Content Database – Alerts – Scheduled Immediate Alerts Timer Job Every 5 minutes Join cache and subscriptions Queue alerts to log Flush cache Send Alerts Daily Weekly Event Cache Sched Subscriptions Event Log Timer Jobs Alert Timer Job
VITALE, CATURANO & COMPANY LTD Microsoft SharePoint Databases Overview 21 Content Database – Security User Info Display information Site collection admin Web Members User to Web map STS Token Web Groups NT Users & Groups Site Groups NT Users and Groups Site Groups Web Members User Info Web Groups Web Group Membership Site Group Membership
VITALE, CATURANO & COMPANY LTD Microsoft SharePoint Databases Overview 22 Content Database – Security – User Info Login name Title System ID NT User Token Delete and recreate user No deletes!
VITALE, CATURANO & COMPANY LTD Microsoft SharePoint Databases Overview 23 Content Database – Security – Groups Web groups can contain: NT users and groups (User Info) Cross-site groups (Site Groups)
VITALE, CATURANO & COMPANY LTD Microsoft SharePoint Databases Overview 24 Content Database – Document Management Document hyperlinks (Links) Categories Discussions (ComMd) Dependencies (Deps) Version History (DocVersions) HTML Transformations (HT_Cache) Docs Links Categories ComMdDeps Doc Versions HT Cache
VITALE, CATURANO & COMPANY LTD Microsoft SharePoint Databases Overview 25 Content Database – Web Management NavNodes FrontPage navigation structure WebCat FrontPage web categories
VITALE, CATURANO & COMPANY LTD Microsoft SharePoint Databases Overview 26 Content Database – Global Tables Welcome Names SharePoint does not honor IIS settings Timer Lock Which web server is handling timer jobs Time of last lock refresh Disk Warning Date Time of last quota warning timer job System Version Build-to-build upgrades HT Settings HTML Transformations settings
VITALE, CATURANO & COMPANY LTD Microsoft SharePoint Databases Overview 27 Portal Server Databases Profile Database Personal profiles, audience targeting Services Database Search and indexing support Subscriptions and subscriptions results Single Sign-On Database
VITALE, CATURANO & COMPANY LTD Microsoft SharePoint Databases Overview 28 Portal Areas CatDef – Area definitions CatJoint – Area listings CatKeyword – Area Keyword CatGroup – Area group CatPath – Area hierarchy CatOrgleList – Audience targeting PortalPermDelta – Security cache CatPredefined – Cache optimization CatBucketInfo – Index optimization PortalPerm – Area ACL PortalPermInfo – Area ACE
VITALE, CATURANO & COMPANY LTD Microsoft SharePoint Databases Overview 29 W A R N I N G ! Direct database access is unsupported! Upgrades can and will break your solution Upgrades may delete your data/schema Some changes can and will break SharePoint Use the object model when possible! Windows MSDE is restricted For use by Windows system components Only signed schema allowed Upgrade Beta2 w/MSDE will delete foreign objects
VITALE, CATURANO & COMPANY LTD Microsoft SharePoint Databases Overview 30 Best Practices Read-only Editing SharePoint data directly is dangerous Data integrity is not enforced by schema Additive changes New tables Use caution when adding foreign keys to SharePoint tables Multiple-user performance testing Beware of table scan (query using indexes) Don’t mess with SharePoint indexes! Beware locking characteristics (e.g. dead locks)
VITALE, CATURANO & COMPANY LTD Microsoft SharePoint Databases Overview 31 Resources Microsoft SharePoint Microsoft SharePoint Server Customization Microsoft SQL Server
VITALE, CATURANO & COMPANY LTD Microsoft SharePoint Databases Overview 32 Questions?
VITALE, CATURANO & COMPANY LTD Microsoft SharePoint Databases Overview 33 VITALE, CATURANO & COMPANY PC