Tuesday, October 20, 2009

SPC 2009: SharePoint 2010 Upgrade Part 1: Fundamentals

Upgrade Part 1 Fundamentals Break-out session notes from SPC 2009.

NOTE:  New content just uploaded to TechNet for Upgrade Scenarios HERE.

Upgrade Scenarios

  • Supported Scenarios:
    • In-Place Upgrade
    • Database Attach Upgrade:
    • Content Database
    • Profile Service Database
    • Project Service Database
    • Singlie Click Install – SQL Migration
    • Windows Internal Database > SQL Express 2008 + File Stream RBS
  • Unsupported
    • Upgrade from earlier than WSS v3 SP2 or MOSS 2007/SP2
    • Direct upgrade from WSS v2/SPS 2003 or earlier
    • Side by Side installation
    • Gradual Upgrade

Upgrade Prep Tools

  • WSS v3/MOSS 2007 SP2
    • Farm Insight
      • Pre-Upgrade Checker
      • stsadm –o EnumAllWebs (Now includes the features that are installed in a Web)
      • SPDiag V2
    • Customizations gathering
      • stsadm –o ExportIPFSAdminObjects
  • SharePoint 2010
    • Farm Insight
      • stsadm –o EnumAllWebs
      • SPDisg 2010 (TBD)
    • Content Database Insight
      • Test-SPContentDatabase

Pre-Upgrade Checker Command

Command: stsadm –o preupgradecheck [-localonly]

  • Details
    • Reports farm and server data
      • Identifies useful farm information
      • Identifies current or potential issues
    • Modes
      • Load server + farm databases (default)
      • Local server only
    • Makes no changes to environment or data (Yes!  This was a huge complaint with going from 2003 to 2007)
    • Introduced in SP2; improved in October 2009 CU
    • Not required like it was for upgrading from 2003 to 2007 but still highly recommended
  • Rules Files (Partial List)
    • Informational
      • Farm Servers, Databases
      • AAM Configuration
      • Lists Site Definitions, Features, Web Parts, Event Receivers
      • Installed Language Packs
      • CAML views/CAML content types
    • Issues
      • Missing Site Definitions, Features, Assemblies
      • Data orphans
      • Modified content databases
  • Command outputs an easy to read HTML-based file

Test-SPContentDatabase Command

  • Content database insight from O14
  • Complements pre-upgrade checker report
  • Reports data from server/database paring
    • Compare against a specific web app
    • Identifies current or potential issues:
      • Data orphans
      • Missing site definitions
      • Missing features
      • Missing assemblies
    • Can show table sizing metrics
  • Scan O12 and O14 content databases
  • Makes no changes to the database(s)

Windows PowerShell Upgrade Cmdlets

Note: B2B – Patching Upgrades,V2V Version to Version Upgrade

  • Upgrade-SPContentDatabase
    • Content database B2B/V2V upgrade
    • Common Scenarios:
      • Initiate/resume content database B2B upgrades
      • Resume failed content database V2V upgrades
    • Upgrade-SPEnterpriseSearchServiceApplication
      • Search Service Application Instance B2B upgrade
    • Upgrade-SPSingleSignOnDatabase
      • O12 data to Secure Store database V2V upgrade

Feature Upgrade Capability

  • Optional Capability
  • Version Ranging for B2B or V2V Upgrades
  • Declarative Feature Upgrade Activities (Final list for RTM, stated that there “may” be more in the future)
    • ApplyElementManifests
    • AddContentTypeField
    • MapFile
  • Custom Code Feature Upgrade
    • CustomUpgradeAction Activity
    • SPFeatureReceiver.FeatureUpgrading
    • Assembly in GAC

Visual Upgrade Capability

  • Stay in O12 UI (default) or move to O14 UI
    • O14 ships O12 Master pages and CSS
    • UI Preview capability (Recommend to perform limited changes will in preview mode)
  • Farm admin or site admin controlled
    • Web level settings and OM
  • Some items not O12 compatible:
    • My site host
    • PWS site collection
    • Report Server web parts

Patch Management Capability

  • Patching state insight
    • Patch management UI
    • Patch reporting PowerShell UI
    • Patch status health rules
  • Backwards compatibility mode (This is awesome!  No need to upgrade the entire farm right after patch install)
    • Binaries can be ahead of the database(s)
    • Defer upgrade for short period of time
    • Not intended for long duration

Downtime Mitigation Process

  • WSS v3/MOSS 2007 SP2
    • Read-only databases
    • Parallel upgrade farms
    • Gradual Upgrade
  • SharePoint 2010
    • Read-only databases
    • Parallel upgrade farms
    • Single farm, multiple upgrade sessions
    • Content database attach with AAM redirection

Upgrade Logging/Status Reporting

  • Upgrade Logging
    • New – One upgrade log per sessions
    • New – Upgrade errors only log
    • New – Fixed upgrade log schema
  • Upgrade Status Reporting
    • Improved – Upgrade status page (This is SO much better.  It provides a lot more information during upgrade compared to the 2007 version.  It will also show all concurrent database upgrades.)
    • New – Upgrade status history
    • New – Command line progress indication

Upgrading a MOSS 2007 Farm

  • Each SSP upgrades into:
    • A Search service app
    • A User profiles service app
    • An excel service app
    • An application registry back-compat service app
    • A new managed metadata service app
  • Web application association are preserved
    • a proxy is created for each service app
  • New databases are created

SPC 2009: Scaling SharePoint 2010 Topologies for Your Organization

This is a recap of what I could capture during the Scaling SharePoint 2010 Topologies for Your Organization Session.  The big change here is around Service Applications.  It allows you more flexibility when scaling your architecture.  I will add a follow-up post later covering the migration piece they glanced over in this session as I am attending the migration deep-dive session.

Service Architecture Recap

  • Flexible Deployment Model

    • Improved Security Model

    • Claims Based Authentication



  • Cross-farm communication via web services

  • Service Isolation

    • Each service app uses separate database and optionally separate app pool.

    • Support for multiple service apps for a service with different accounts and databases



  • Multi-Tenancy

    • Some Service Apps can be partitioned to handle multiple tenants




Choosing an Architecture

  • Consider both logical and physical aspects

  • Start with a logical architecture

    • Consolidated vs Distributed



  • Build it out as a physical architecture

  • Scale out as needed


Logical Topology Considerations

  • Business Needs

    • Organization many need isolation between respective services (ie. HR, Legal, etc)



  • Regulatory Restrictions

    • Geopolitical

    • Regulatory



  • Information Architecture

    • Architecture of web sites influence association to Services




Physical Topology Considerations

  • Scale

    • Scale-up/Scale-out needs influence physical topology



  • Link Latency

    • Host services close to users and content



  • Directory Architecture

    • Host services close to directory for better auth




Scaling Services – Option 1

  • Scale within the farm

  • Scale-up

  • Scale-out on each tier

    • Add WFEs for content servers

    • Additional app servers for computer-intensive services

    • Scale SQL for data-centric services



  • “Affinitize”

    • Specific web apps to WFEs using NLBs

    • Services on specific app servers




Scaling Services – Option 2

  • Multiple Farms

  • Split services into separate farm

    • Security boundary

    • Usage/scale

    • Political/organizational

    • patching flexibility



  • Multiple services farms

    • Geo-distributed

    • Load

    • Split search out first



Monday, October 19, 2009

SPC 2009 - Enterprise Search Overview

***UPDATE***
Updated with content from Enterprise Search Deep-Dive Session.

Just attended the Enterprise Search Overview for SharePoint 2010 at SPC2009.  It focused a lot around the FAST integration with SP2010.  Below are some quick notes I took.  Obviously I was not able to capture everything, but there is some cool new stuff coming out...

New Capabilities:

  • Increased Scalability over MOSS 2007

  • Multiple Crawlers

  • Query: Partition and mirror the index

  • Sub-second latency scaling to 100 Million documents

  • Rich Content Processing

  • Wizard driven installation

  • Full Fault Tolerance

  • Native 64-bit: hyper-v support

  • Powershell Support

  • SCOM support

  • Full search reporting


Search Product Line:

  • Search Server 2010 Express (Still Free)

    • Basic Search



  • SharePoint Server 2010

    • Intranet-wide search, people and expertise search



  • FAST Search Server 2010 for SharePoint

    • Visual experiences, extreme adaptability and Advanced Content Processing




Scalability:

  • Multiple Indexers (Yes! True redundancy!)

  • Indexers are stateless crawlers and do not store a copy of the index.  They crawl, index, and immediately propagate to Query Servers.

  • Index Partitioning

  • Query Mirroring

  • Multiple Property Databases

  • Admin Database + Admin Component (equivalent of SSP database in MOSS)

  • Crawl Distribution

    • Built-in load balancer distributes hosts to crawl databases

    • Crawlers crawl content that is covered by crawl database

    • Default configuration can be overwritten using host distribution rules



  • Query Distribution

    • Low query latency if all index partitions are equal in size

    • Distribution by hash of documentId

    • Crawlers partitions indexed data and propagate to query servers



  • Multiple scale-out options now, including multiple crawl databases on the same SQL server or multiple SQL servers


Engine Enhancements

  • Support for regular expressions in Crawl Rules

  • Native support for crawling case sensitive repositories

  • Ability to prioritize Content Sources to distribute crawler resources

  • New Crawl Policy to define how crawler treats error conditions

  • Low indexing downtime (Search now only pauses for approx. an hour during backups)


Extensibility Enhancements

*Note: Protocol handler API still supported

  • Change web part properties - no code

    • Modify XSLT

    • Modify config XML

      • Refinement Panel - control metadata available for refinement

      • Advanced Search - control metadata available for advanced search queries





  • Extend OOB web parts programatically

    • All OOB web parts are public (Sweet!)



  • Connector Framework

    • Support for attachments

    • Item level security

    • Crawl through entity associations



  • Inline caching for better citizenships

  • Richer crawl options

    • Regular full crawl

    • Time stamp based incremental crawl

    • Change log crawl + deleted count

    • Change log + delete log crawl




Ricker Manageability

  • Consolidated admin UI dashboard

  • Automated service password management through "managed accounts"

  • PowerShell support for scripted administration

  • Built-in system health monitoring, support for SCOM monitoring and alerting

  • Built-in and extensible search analytics


Seach Site:

  • Native Wildcard Search

  • Type-ahead search box (aka Query Suggestions)


Search Results Page New Features:

  • Metadata Extraction

  • Refinement Panel

    • Filtering by Results Type, Site, Author, Modified Date (displayed in a separate panel kind of like federated results)

    • Suggested Searches



  • Did you mean?


FAST - Search Results Page Additional New Features:

  • Thumbnail of document appears with each result (This is awesome!)

  • Preview documents within the search results window

  • View in Browser Link

  • Similar Results

  • Refinement Panel (In addition to items listed above)

    • Dynamically generate metadata from documentation for filtering (Metadata fields do not have to be populated first



  • Rich Text Best Bets (including images)

  • Federate Results directly to desktop


People Search:

  • "Address Book Style" Search

    • Phonetic name matching

    • Nickname matching



  • Refinement Panel

    • Filtering on Focus, Job Title, Past Projects, Interests



  • Vanity Search (Self Search) - When a user looks themselves up in People Search

    • Help People Find Me Appears

      • Results return the users profile seen by others in the search results.  Also returns some metrics including the number of searches that led to them and keywords





  • Additional Drill-down for Each User

    • Browse in Organizational Chart

    • View Recent Content




Connectors:

  • Indexing Connectors

  • Supports the OpenSearch Standard for Federation


Reporting and Administration:

  • Greatly Refined

  • Search Administration dashboard (looks much like the one added with MOSS 2007 SP2) is web part based and can be easily customized

  • Error log reporting will now allow the administrator to select a specific item and decide whether to remove the item from the index or re-crawl.


There were also several web analytics enhancements for more robust reporting.

More later.

Jeff

SharePoint 2010 Beta Release in November

Attending the SharePoint 2009 Conference in Las Vegas, NV USA.  Steve Ballmer announced this morning that SharePoint 2010 Beta will be released in November 2009.  No specific date in November was given.

Wednesday, May 13, 2009

Add Alerts to All Sites

I recently had a request from a client that would allow them to automatically display a Notification on all Sites and Pages.  This was easy enough to do because I was already stapling a custom page layout to the publishing infrastructure along with a custom Master Page and CSS.  The Master Page was altered to include a pointer to a hidealert.css file residing in a document library I had created on the root site.  The Page Layout was then altered to include an IFrame that loaded an HTML file called alert.htm sitting in the same document library on the root site.  When the editor renamed the file to something other than hidealert.css (recommended to rename it to showalert.css) the IFrame would appear with the alert.htm contents.  Below are the files, description and code:


Master Page - Load hidealert.css


Description: Custom Master Page that had one additional CSS file being loaded to easily turn the Alert visibility on or off.  This also enabled it to be done by a content editor with no IT involvement.


<link rel="stylesheet" type="text/css" href="/design/hidealert.css">


Page Layout


Description: Code to Load IFrame.  The code was placed above one of the web part zones so they would dynamically slide down if the IFrame loaded.


<iframe src="/design/alert.htm" class="alert" scrolling="no" frameborder="0">
<a href="/design/alert.htm">SharePoint Requires Internet Explorer 5.5 SP2 or higher.</a>
</iframe>


hidealert.css


Description: CSS to Hide Alert IFrame When Not In Use


.alert
{
 display:none;
}


alert.htm


Description: HTML to Appear in IFrame (includes javascript to resize IFrame to match)



<html>
<head>


<script type="text/javascript">
        function resizeToFit(that){
                var objNode = (typeof(this.nodeName)=='undefined') ? that : this ;
                var objIframe = window.parent.document.getElementById('resizeToFit');
                var intScrollX, intScrollY, intWinWidth, intWinHeight, intMaxWidth, intMaxHeight;
               
                var intWhileCount = 0;
                do{
                    // scroll the document by 1 pixel
                    window.scrollTo(1,1);
                    // measure the scroll position           
                    intScrollX = (document.all) ? document.body.scrollLeft : window.pageXOffset ;
                    intScrollY = (document.all) ? document.body.scrollTop : window.pageYOffset ;
                    // measure window size
                    intWinWidth = (document.all) ? document.body.offsetWidth : window.innerWidth ;
                    intWinHeight = (document.all) ? document.body.offsetHeight : window.innerHeight ;
                    // if the scroll position is not 0
                    if(intScrollY>0){
                        // make the window larger
                        window.resizeBy(0,32);
                        // make the iframe larger
                        if(objIframe!=null && !document.all) objIframe.style.height = (objIframe.style.height=='') ? '64px' : (parseInt(objIframe.style.height) + 32) + 'px';
                    }
                    // count the steps
                    intWhileCount += 1;
                }while((intScrollX>0 || intScrollY>0) && intWhileCount<900);
            }
            function waitToFit()
            {
                setTimeout("resizeToFit()",100);   
            }
           
            onload = waitToFit;
</script>


</head>
<body onload="resizeToFit();">
<!-- Make Change Below This Line -->


This is a test


<!-- Make Changes Above This Line -->
</body>
</html>



The content editor was given instructions to rename the CSS file from hidealert.css to showalert.css and add any custom HTML code between the <Make Changes> comment lines in the alert.htm.


Jeff


 

Saturday, January 31, 2009

Hide Custom Actions

I recently learned about hiding items in SharePoint using the HideCustomAction element.  I had requests to hide items such as the Site Theme, Site Features, and Site Collection Features in Site Settings (I hide all three in my example below).  It is as easy as creating a feature with two XML files.

NOTE: This will remove the links only.  Users will still be able to manually browse to the pages if they know the full URL.  This is not a replacement for security!

 Feature.xml
<?xml version="1.0" encoding="utf-8" ?>
<Feature Id="af6215af-f836-4a09-aa3b-8685981d478f"
Title="Hide Custom Action Links"
Description="This feature currently hides: site features, site collections features, and site themes."
Version="1.0.0.0"
Scope="Site"
xmlns="http://schemas.microsoft.com/sharepoint/">
  <ElementManifests>
    <ElementManifest Location="HideCustomActions.xml" />
  </ElementManifests>
</Feature>

HideCustomActions.xml
<?xml version="1.0" encoding="utf-8" ?>
<Elements xmlns="http://schemas.microsoft.com/sharepoint/">
  <HideCustomAction
  GroupId="SiteAdministration"
  HideActionId="ManageSiteFeatures"
  Location="Microsoft.SharePoint.SiteSettings"
/>
  <HideCustomAction
  GroupId="SiteCollectionAdmin"
  HideActionId="ManageSiteCollectionFeatures"
  Location="Microsoft.SharePoint.SiteSettings"
/>
  <HideCustomAction
  GroupId="Customization"
  HideActionId="Theme"
  Location="Microsoft.SharePoint.SiteSettings"
/>
</Elements>

John Holliday has a great list of all of the Custom Action IDs on his site: http://johnholliday.net/resources/customactions.html

Jeff

Tuesday, January 27, 2009

Programmatically Apply a Master Page and Theme to Specific Managed Path

I recently had a request from a client that required programmatically applying a master page and theme to all new site collections (and sub sites) under a specific managed path.  I created a feature to deploy the master page and one to automatically apply the master page (ensynch.master) and theme (ensynch_theme) on site creation.  This was done by stapling the feature at the farm level to the required site definitions.  Using an IF statement I was able to apply the master page and theme settings to all site collections (and sub sites) created under the managed path.  In the example code below the managed path is called MANAGEDPATH.
using System;
using System.Collections.Generic;
using System.Text;
using Microsoft.SharePoint;

namespace Ensynch.SetCustomMaster
{
public class ChangeMaster : Microsoft.SharePoint.SPFeatureReceiver
{
public override void FeatureInstalled
(SPFeatureReceiverProperties properties)
{
}
public override void FeatureUninstalling
(SPFeatureReceiverProperties properties)
{
}
protected string EndOfURL(string url)
{
    return url.Substring(url.LastIndexOf("/") + 1);
}
        public override void FeatureActivated
        (SPFeatureReceiverProperties properties)
        {
            SPWeb CurrentWeb = properties.Feature.Parent as SPWeb;
            if (CurrentWeb.ServerRelativeUrl.StartsWith("/MANAGEDPATH"))
            {
                if (CurrentWeb.IsRootWeb == true)
                {
                    CurrentWeb.MasterUrl = CurrentWeb.ServerRelativeUrl + "/_catalogs/masterpage/ensynch.master";
                    CurrentWeb.CustomMasterUrl = CurrentWeb.ServerRelativeUrl + "/_catalogs/masterpage/ensynch.master";
                }
                else
                {
                    CurrentWeb.MasterUrl = "/MANAGEDPATH/" + EndOfURL(CurrentWeb.Site.Url) + "/_catalogs/masterpage/ensynch.master";
                    CurrentWeb.CustomMasterUrl = "/MANAGEDPATH/" + EndOfURL(CurrentWeb.Site.Url) + "/_catalogs/masterpage/ensynch.master";
                }
                CurrentWeb.ApplyTheme("ENSYNCH_THEME");
                CurrentWeb.Update();
                CurrentWeb.Dispose();
            }
        }
        public override void FeatureDeactivating
        (SPFeatureReceiverProperties properties)
        {
            SPWeb CurrentWeb = properties.Feature.Parent as SPWeb;
            CurrentWeb.MasterUrl = CurrentWeb.ServerRelativeUrl + "/_catalogs/masterpage/default.master";
            CurrentWeb.CustomMasterUrl = CurrentWeb.ServerRelativeUrl + "/_catalogs/masterpage/default.master";
            CurrentWeb.ApplyTheme("none");
            CurrentWeb.Update();
            CurrentWeb.Dispose();
        }
    }
}

Jeff