Blog

You are browsing the archive for SharePoint 2010 Technical Preview.

SharePoint 2010 Lab Environment Part 2 – Bootable vhd Files

November 4, 2009

The problem:  Having to install SharePoint on a server OS has been a consistent cause of complaint for years within the SharePoint community, especially for developers.  The proliferation of virtualization technologies (such as the free Virtual PC and VMWare Server for client OS’s, and Virtual Server and Hyper-V for server OS’s) have helped to soothe the pain – but didn’t make it all better for many.  The picture has gotten more complicated with SharePoint 2010.  Now 64-bit hardware and operating systems are required for SharePoint 2010 all SKUS, which significantly narrows the options for desktop lab environments.  Hyper-V is the only Microsoft virtualization technology capable of running 64-bit guest machines, but it only runs on a Windows 2008 Server host machine. 

I have so far been running my Win2k8 SharePoint 2010 guest virtual servers on a spare desktop machine running Win2k8 with Hyper-V.  This is a more traditional development environment for SharePoint, and it is still nice from several perspectives.  1) I have snapshots to do the ‘I was never here’ trick easily if (when) I mess something up, 2) I can give the VMs more RAM than I could on my laptop, and 3) I can run more than one VM to simulate an actual farm.  However, it’s not a very portable environment.  It would be very handy as I travel to have a simple single-server farm that I could boot my laptop into wherever and whenever I felt the need. 

Even if your laptop or desktop is 64-bit, most of us probably aren’t running a server OS on it.  I did try using Windows 2008 Server as my laptop OS for a couple of months, but the performance load of Hyper-V and the SharePoint guest resource requirements caused a significantly slower environment than I was prepared to accept for my everyday use.  I know there are low-cost alternatives using VMWare’s free product, but that still would still have the duplicate host / guest resource issue.  I also wanted to see if it was practical to use Microsoft software because of my familiarity level with it. 

Two solutions:  There are two new developments (one in SharePoint 2010 and the other in Windows 7) that open some new doors to the desktop / laptop dev environment.  TechNet now documents that 1) SharePoint 2010 offers an option for installing on a client OS – at least for development use, and 2) that a pre-installed and configured vhd can be mounted as a secondary bootable drive on a Windows 7 PC.

In this post, I will document my experience mounting a pre-installed Win2k8 R2 server vhd as a bootable drive on my Windows 7, x64, 4gb RAM laptop.  In a previous post, I documented my experience installing SharePoint 2010 directly on Windows 7.

Now Windows 7 natively allows us to boot into vhd files instead of just the physical drive partitions.  That’s pretty significant and will probably have big implications for many admins and developers.  It is not as simple as installing SharePoint 2010 directly into Windows 7, but it has distinct advantages.  For instance, we can have multiple versions of the server stored as separate vhd files for different testing scenarios.  We can also make a temporary copy of any vhd file before booting into it to maintain kind of a quasi-snapshot capability.  It also offers me more of an ‘apples to apples’ comparison to a production farm (since it’s on a server OS) and allows me to use hardware on the PC that doesn’t work in HyperV – like wireless network cards, for instance.

Mounting a bootable vhd drive in Windows 7 – The nitty gritty

  1. Log into your existing SharePoint virtual machine, and run the following sysprep command within the virtual server:
    c:\windows\system32\sysprep\sysprep.exe /generalize /shutdown
    cmdSysprep
  2. Once the sysprep command completes and the virtual machine shuts down, copy the server’s vhd file onto the physical drive of your PC.  Mine was copied to C:\VHD\2010AllinOne.vhd.
  3. BCDEdit is a command-line utility new to Windows 7 that allows you to edit the Boot Configuration Data, including creating a boot menu for multiple operating systems or at least disks. 
    Open a command prompt with administrative privileges, and type bcdedit /enum.  This will print out to the screen the current setup of your Windows 7 bootloader, which probably has only a single boot option.
    startCMDAdmin
    cmdBCDEditEnum
    You’ll notice that there is a Windows Boot Manager section, and currently only one Windows Boot Loader entry.  That’s about to change. 
  4. Type the following command to create a new item in the boot menu named “2010 All In One” that we will use for our 2010 lab environment by copying the existing one:
    bcdedit /copy {current} /d “2010 All In 1”
      cmdBCDEditCopy  
    The /copy command created another boot menu entry and assigned it a new GUID.  (Every Windows Boot Loader entry has its own GUID, even though you have to look very closely to see the difference).  However, the new boot menu entry is not wired up to our VHD file.  So, we need to add another two related commands to tell the new menu entry where to point.  The GUID can be typed if you really want to, but I suggest copying it. 
  5. If you right-click on the GUID in the last line output to the command prompt and choose Mark, then you can highlight the GUID with your mouse.  The ENTER key copies it to the clipboard.
    cmdMark
    cmdHighlight
    cmdPaste
    The following are the complete commands to type and paste into the command prompt.

    bcdedit /set {pasted guid} device vhd=[C:]\VHD\2010AllInOne.vhd
    bcdedit /set {pasted guid} osdevice vhd=[C:]\VHD\2010AllInOne.vhd
    cmdBCDEditDevice 

  6. Finally, we need to force the new bootloader entry to auto-detect the VM’s Hardware Abstraction Layer.
    cmdBCDEditDetectHAL 

The end result should be a dual-boot menu with a choice for Windows 7, your native OS, and 2010 All In One, your SharePoint lab VM.  In my case, I have SharePoint 2010 installed on both Windows 7 and Windows 2008 R2 – all running natively on my 64-bit HP laptop with 4 gb of RAM.  So far, things are working very well for me.

NOTES: 

  • If you get a BSOD when you try to boot into the VHD, it’s probably because you didn’t use the Generalize option when you did the sysprep command.  (I, um, have ‘a friend’ that did that once…)
  • This boot to vhd trick allegedly will work with a Windows Vista client OS too – with a little hacking.  I won’t go into it here, but Google “windows 7 vhd dual boot vista bootmgr bcdedit” and you’ll find several brave adventurers who can take you down that path if you wish.
  • I worked under the assumption that many developers / admins would already have a test server built as a VM by the time they stumbled across this procedure.  So these instructions show how to repurpose an existing VM onto your client PC in a dual-boot scenario.  If you do not have an existing SharePoint 2010 vhd file, here’s a link to a TechNet blog post with a webcast that describes how to create the vhd dual-boot environment with nothing more than a blank hard drive, a Windows 7 DVD, a Windows 2008 R2 DVD, and a dream…
  • You can use a dynamically-expanding vhd file, but it does something at boot time that may surprise you.  It automatically expands to its full size.  Interestingly, it contracts again to it’s smaller size when you shut it down.  That means you don’t have to maintain enough space for the full drive, but you do have to free up enough space for the entire drive before you try to boot into it.

SharePoint 2010 Lab Environment Part 1 – Installing SharePoint on Windows 7

October 29, 2009

The problem:  Having to install SharePoint on a server OS has been a consistent cause of complaint for years within the SharePoint community, especially for developers.  The proliferation of virtualization technologies (such as the free Virtual PC and VMWare Server for client OS’s, and Virtual Server and Hyper-V for server OS’s) have helped to soothe the pain – but didn’t make it all better for many.  The picture has gotten more complicated with SharePoint 2010.  Now 64-bit hardware and operating systems are required, which significantly narrows the options for desktop lab environments.  Hyper-V is the only Microsoft virtualization technology capable of running 64-bit guest machines, but it only runs on a Windows 2008 Server host machine.  Even if your laptop or desktop is 64-bit, most of us probably aren’t running a server OS on it.  I did try using Windows 2008 Server as my laptop OS for a couple of months, but the performance load of Hyper-V and the SharePoint guest resource requirements caused a significantly slower environment than I was prepared to accept for my everyday use.  I know there are possibilities for running 64-bit guest machines on a client host OS via VMWare, but I wanted to see if it was practical to use Microsoft software because of my familiarity level with it. 

Two solutions:  However, there are some new developments in SharePoint 2010 and Windows 7 that open some new doors to the desktop / laptop dev environment.  TechNet now documents that 1) SharePoint 2010 offers an option for installing on a client OS – at least for development use, and 2) that a pre-installed and configured vhd can be mounted as a secondary bootable drive on a Windows 7 PC.

In this post, I will document my experience installing SharePoint 2010 directly on my Windows 7, x64, 4gb RAM laptop while I’m home fighting the flu this week.  In another post, I will look at mounting a pre-installed Win2k8 server vhd as a bootable drive.

Installing SharePoint 2010 on a client OS – The nitty gritty

This is the simplest solution for creating a desktop lab environment for SharePoint 2010.  There is no longer a need for a virtualization product, which means fewer resources are needed with no guest OS to provide for.  Bamboo Solutions created a helpful utility for installing WSS 3.0 and MOSS2007 on Windows XP / Vista – so this is not a new idea.  However, this tool doesn’t work on SharePoint 2010.  Fortunately, there is a native (although not obvious) way to accomplish this in the 2010 product line that is documented in the first link above.  It basically boils down to editing a config file and manually installing the pre-reqs.  Here’s the procedure I followed.

****  UPDATED:  This is now confirmed to work for both MSS 2010 and SharePoint Foundation (the replacement for WSS) in the public beta released to MSDN on 11/16/2009.  However, step 4 below is now a necessary addition to the process.****

  1. Extract all files from the SharePoint.exe installer file from which you intend to install SharePoint (for any other SharePoint 2010, the replacement for WSS, the filename will likely be OfficeServer.exe instead of SharePoint.exe).  This is done with the /extract:directoryname switch, as shown below.  This may prompt you with one of the wonderful UAC ‘are you sure’ boxes.  If so, just click Yes and move on.
     cmdExtract
  2. The result will be a folder with the entire set of installation files for SharePoint 2010.  Go to ExtractedDirectoryName\Files\Setup, and open the Config.xml file using Notepad.
    wxConfig.xml 
  3. Insert a new line in the <Configuration> section, as shown below:
    <Setting ID=”AllowWindowsClientInstall” Value=”True” />
    npConfig.xml 
  4. While you have the file open, change to the key in the PIDKEY Value entry from the ‘Please enter key…’ text to your actual MSS 2010 license key.
    (If you don’t do this, you will likely get an error message in step 12 below that says your ‘config.xml is not valid, run setup again without using a setup configuration file, or fix the configuration file’.)
    image
  5. Close and save the file.
  6. Now we must install the prerequisites manually.  (The fancy new pre-req installer doesn’t work on a client OS.) 
    First, run all of the installer files found in the subfolders under the ExtractedDirectoryName\PrerequisiteInstallerFiles directory with the exception of the Speech and SpeechLPK folders (ChartControl (for Office Servers only), FilterPack, sqlncli, sync):
     wxPreReqInstallers
  7. Download and install the Microsoft Geneva Framework Runtime for x64.
    (This is a tricky one.  Most of the downloads you find with Google are not the correct version for the public Beta, and the one you may have used with the SharePoint 2010 Technical Preview doesn’t work either.  If you don’t have the correct version, you won’t be able to complete the SharePoint 2010 Products Configuration Wizard in step 13 below.  The download available at the link above worked for me with the public Beta.  The key is to have the following DLL version in your c:\Windows\Assembly folder:  Microsoft.IdentityModel 1.0.0.0) 
    image
  8. Download and install the ADO.NET Data Services v1.5 (runtime only), or whatever is the most current version when you’re reading this.
  9. Download and install the SQL Server Analysis Services – ADOMD.Net, or whatever is the most current version when you’re reading this.
  10. Install the IIS pre-reqs by entering (or, lets be honest – copying and pasting) the following command without any line breaks:
    start /w pkgmgr /iu:IIS-WebServerRole;IIS-WebServer;IIS-CommonHttpFeatures;
    IIS-StaticContent;IIS-DefaultDocument;IIS-DirectoryBrowsing;IIS-HttpErrors;
    IIS-ApplicationDevelopment;IIS-ASPNET;IIS-NetFxExtensibility;
    IIS-ISAPIExtensions;IIS-ISAPIFilter;IIS-HealthAndDiagnostics;
    IIS-HttpLogging;IIS-LoggingLibraries;IIS-RequestMonitor;IIS-HttpTracing;IIS-CustomLogging;
    IIS-Security;IIS-BasicAuthentication;IIS-WindowsAuthentication;IIS-DigestAuthentication;
    IIS-RequestFiltering;IIS-Performance;IIS-HttpCompressionStatic;IIS-HttpCompressionDynamic;
    IIS-WebServerManagementTools;IIS-ManagementConsole;IIS-IIS6ManagementCompatibility;
    IIS-Metabase;IIS-WMICompatibility;WAS-WindowsActivationService;WAS-ProcessModel;
    WAS-NetFxEnvironment;WAS-ConfigurationAPI;WCF-HTTP-Activation;
    WCF-NonHTTP-ActivationcmdIISPreReqInstall
  11. Restart your PC.
  12. Run the SharePoint installer file setup.exe in the root of your ExtractedDirectoryName.

    (Microsoft recommends configuring only a ‘Stand-Alone’ SharePoint instance on Windows 7, but it will allow you to choose advanced and Complete in order to specify a SQL Server if you wish.)

  13. When the installer finishes and you begin the ‘SharePoint Products and Technologies Configuration Wizard’, a popup will warn you that this use is not supported for production environments.  Click OK and proceed through the wizard.
  14. NOTE:  If you need to install SharePoint in using the ‘Complete’ option to be able to use the full version of SQL Server, you will not be able to use a local user account in the config wizard.  This is possible with the New-SPConfigurationDatabase PowerShell cmdlet, though.  I’ll blog about using that cmdlet in a later post.

    wizWin7Warning

Changes in SharePoint DesignerTypes for workflow activity parameters

October 23, 2009

Creating a workflow in SharePoint Designer consists of selecting Conditions and Activities to build the logic and determine what actions the workflow performs. When you select an activity or condition a sentence appears in the WorkFlow Designer screen with underlined phrases that allow you click on them to set the workflow’s parameters. These parameters can be selecting a column on a list item and a value to give it, or they can be a user’s account name, a url to a site or something more complex like an email definition that includes a To address, CC address, a subject and a body.

When creating custom workflow activities and conditions for SharePoint in Visual Studio, you create a code class to build its functionality as well as a .actions file, both of which define the parameters. SharePoint Designer uses the .actions to be able to add the activity or condition to a workflow. You must specify the type for each parameter within both the class and the .actions file as well as the DesignerType in the .actions file. When a user clicks on a parameter, different windows open to allow the user to input the values according to the DesignerType given to the parameter. The DesignerType is simply an enumeration that SharePoint Designer uses to determine what type of form to display to gather information on each parameter. For example, a DesignerType of DropDown will present a drop down menu at the location of the parameter phrase in the sentence, whereas a DesignerType of Email will open a pop up window with fields for the To address, CC address, Subject and Body where each of these fields is defined as a parameter of different types in code and returned from the Designer form as an object of that type.

For an activity to send an email, the simple class definition may look something like this:


public partial class SendAnEmail : SequenceActivity
{
   #region Dependency Properties

   public static DependencyProperty __ContextProperty = DependencyProperty.Register("__Context", typeof(WorkflowContext), typeof(SendAnEmail));
   public static DependencyProperty RecipientCCProperty = DependencyProperty.Register("RecipientCC", typeof(ArrayList), typeof(SendAnEmail));
   public static DependencyProperty RecipientFromProperty = DependencyProperty.Register("RecipientFrom", typeof(string), typeof(SendAnEmail));
   public static DependencyProperty RecipientTOProperty = DependencyProperty.Register("RecipientTO", typeof(ArrayList), typeof(SendAnEmail));
   public static DependencyProperty SubjectProperty = DependencyProperty.Register("Subject", typeof (string), typeof (SendAnEmail));
   public static DependencyProperty BodyProperty = DependencyProperty.Register("Body", typeof(string), typeof(SendAnEmail));

   #endregion

   public SendAnEmail()
   {
      InitializeComponent();
   }

   #region Activity Parameters

   [Description("Recipient address")]
   [Browsable(true)]
   [DesignerSerializationVisibility(DesignerSerializationVisibility.Visible)]
   public ArrayList RecipientTO
   {
      get { return ((ArrayList) (base.GetValue(RecipientTOProperty))); }
      set { base.SetValue(RecipientTOProperty, value); }
   }

   [Description("Carbon copy recipient")]
   [Browsable(true)]
   [DesignerSerializationVisibility(DesignerSerializationVisibility.Visible)]
   public ArrayList RecipientCC
   {
      get { return ((ArrayList) (base.GetValue(RecipientCCProperty))); }
      set { base.SetValue(RecipientCCProperty, value); }
   }

   [Description("Subject")]
   [Browsable(true)]
   [DesignerSerializationVisibility(DesignerSerializationVisibility.Visible)]
   public string Subject
   {
      get { return ((string) (base.GetValue(SubjectProperty))); }
      set { base.SetValue(SubjectProperty, value); }
   }

   [Description("HTML Body")]
   [Browsable(true)]
   [DesignerSerializationVisibility(DesignerSerializationVisibility.Visible)]
   public string Body
   {
      get { return ((string) (base.GetValue(BodyProperty))); }
      set { base.SetValue(BodyProperty, value); }
   }

   [Browsable(true)]
   [DesignerSerializationVisibility(DesignerSerializationVisibility.Visible)]
   public WorkflowContext __Context
   {
      get { return ((WorkflowContext) (base.GetValue(__ContextProperty))); }
      set { base.SetValue(__ContextProperty, value); }
   }

   [Description("Sender address. If this value is not specified, default sharepoint sender address will be used")]
   [Browsable(true)]
   [DesignerSerializationVisibility(DesignerSerializationVisibility.Visible)]
   public string RecipientFrom
   {
      get { return ((string) (base.GetValue(RecipientFromProperty))); }
      set { base.SetValue(RecipientFromProperty, value); }
   }

   #endregion

   protected override ActivityExecutionStatus OnExecute(ActivityExecutionContext executionContext, Microsoft.SharePoint.Workflow.ISharePointService service)
   {
   }
}

The .actions file would look like:


<?xml version="1.0" encoding="utf-8"?>
<WorkflowInfo Language="en-us">
   <Actions Sequential="then" Parallel="and">
      <Action Name="Send E-mail Extended" ClassName="SPSolutions.SharePoint.WorkflowEssentials.Activities.SendEmailExtended" Assembly="SPSolutions.SharePoint.WorkflowEssentials, Version=1.0.0.0, Culture=neutral, PublicKeyToken=08a33cc09f006379" AppliesTo="all" Category="SharePoint Solutions' WorkFlow Essentials">
         <RuleDesigner Sentence="Send a %1 e-mail to %2 and display %3 as the sender">
            <FieldBind Field="IsMessageUrgent" DesignerType="Dropdown" Text="choose" Id="1">
               <Option Name="urgent" Value="true"/>
               <Option Name="non urgent" Value="false"/>
            </FieldBind>
            <FieldBind Field="RecipientTO,RecipientCC,Subject,Body" Text="this address" DesignerType="Email" Id="2"/>
            <FieldBind Field="RecipientFrom" Text="this address" Id="3" DesignerType="stringbuilder" />
         </RuleDesigner>
         <Parameters>
            <Parameter Name="__Context" Type="Microsoft.SharePoint.WorkflowActions.WorkflowContext, Microsoft.SharePoint.WorkflowActions" Direction="In"/>
            <Parameter Name="IsMessageUrgent" Type="System.String, mscorlib" Direction="In" InitialValue="false" />
            <Parameter Name="RecipientTO" Type="System.Collections.ArrayList, mscorlib" Direction="In" />
            <Parameter Name="RecipientCC" Type="System.Collections.ArrayList, mscorlib" Direction="Optional" />
            <Parameter Name="RecipientFrom" Type="System.String, mscorlib" Direction="In" />
            <Parameter Name="Subject" Type="System.String, mscorlib" Direction="In" />
            <Parameter Name="Body" Type="System.String, mscorlib" Direction="In" />
         </Parameters>
      </Action>
   </Actions>
</WorkflowInfo>

In terms of SharePoint 2010, there are several new DesignerTypes and some of the existing ones have changed slightly in the types of parameters that they return. Below is an overview of most, if not all, of the DesignerTypes included in 2010.

 Designer Type 
   
 New to 2010 
   
 Parameter(s) returned
(example parameter name) 
   
 Parameter type 
   
 Description 
 Assignment       Yes       AssignedTo       System.String       
             CC       System.Collections.ArrayList       
             Comments       System.String       
             Subject       System.String       
             Duration       System.Double       
             DurationUnit       Microsoft.Office.Workflow.Actions.DurationUnit       
             DueDate       System.DateTime       
 Boolean       No       Yes/No       System.Boolean       
 ChooseDocLibItem       No       DocumentLibrary
ItemName 
     System.String       Selects list item from a Document Library based on a field value. 
 ChooseListItem       Changed       ListId       System.String       Selects List Item from list based on a field value. 
             ListItem       Microsoft.SharePoint.Workflow.SPItemKey       
 ContentType       Yes       ContentTypeID       System.String       
 CreateListItem       No                   
 DataSourceDropDown       Yes       DataSourceName       System.String       Drop Down list of DataSources for list associated with workflow. 
 Date       No       Date       System.DateTime       Date Time Selector 
 Dependent       Yes            S ystem.String       Based on TextArea DesignerType 
 DropDown       No             System.String       
 Email       No       To       System.Collection.ArrayList       
             CC       System.Collection.ArrayList       
             Subject       System.String       
             Body       System.String       
 Hide       No                   Used to hide parameter from users in Designer 
 FieldNames       No       FieldName       System.String       Select field column from list associated with workflow. 
 Float       No             System.Float       
 HyperLink       No       Link       System.String       
 Integer       No             System.Int32       
 ListItems       Yes             System.String       
 ListNames       No       ListTitle       System.String       Drop Down with list of list names from current site 
 Operator       No                   Drop-down list box control that includes operators used to evaluate each side of the RuleDesigner sentence. Operators are static and must be added in Options elements. 
 ParameterNames       No             System.String       Allows the creation of a new variable for the workflow. 
 Person       No       Users       System.Collections.ArrayList       Allows selection of multiple users 
 SinglePerson       Changed             System.Object       Allows selection of a single user 
 StringBuilder       No             System.String       
 Survey       No                   Creates a task in the workflow to gather data from users. 
 TaskSummary       Yes       TaskProcessName       System.String       
 Text       No             System.Object       
 TextArea       No             System.String       
 UpdateListItem       No       ListItemToUpdate             
 WritableFieldNames       No             System.String       Drop down including list of fields on list that are writable 

So far, the main changes appear in the return types of the ChooseListItem and SinglePerson DesignerTypes. In SharePoint 2010, the SinglePerson form returns a generic System.Object rather than a string, and the ChooseListItem’s ListItem parameter returns a new type of SPItemKey instead of a string.

To accommodate the return of an Object from the SinglePerson DesignerType form, simple define the parameter as System.Object in the .actions file and the DependencyProperty in code, then define the activities property as a String and explicitly convert it from object to string in the get statement.

The new .actions file section would now look like:

<Action Name="myNewActivity"
 ClassName="SPSolutions.SharePoint.WorkflowEssentials.Activities. myNewActivity "
 Assembly="SPSolutions.SharePoint.WorkflowEssentials, Version=1.0.0.0, Culture=neutral,
 PublicKeyToken=08a33cc09f006379"
 AppliesTo="all" Category="SharePoint Solutions' WorkFlow Essentials">
   <RuleDesigner Sentence="Get %1">
     <FieldBind Field="SharePointUser" DesignerType="SinglePerson" Text="this person" Id="1" />
   </RuleDesigner>
   <Parameters>
     <Parameter Name="__Context" Type="Microsoft.SharePoint.WorkflowActions.WorkflowContext,
      Microsoft.SharePoint.WorkflowActions" Direction="In"/>
     <Parameter Name="ListId" Type="System.String, mscorlib" Direction="In" />
     <Parameter Name="SharePointUser" Type="System.Object, mscorlib" Direction="In" />
   </Parameters>
 </Action>

The new declaration in the class for parameters returned from the ChooseListItem DesignerType would now look like:

public static DependencyProperty SharePointUserProperty =
DependencyProperty.Register("SharePointUser", typeof(object), typeof(myNewActivity));
[Description("SharePoint User")]
[Browsable(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Visible)]
public string SharePointUser
{
   get { return ((string) (base.GetValue(SharePointUserProperty))); }
   set { base.SetValue(SharePointUserProperty, value); }
}

The SPItemKey type appears to be a wrapper for returning an instance of the list item. It has two public properties: Id as Int32 and Key as String where the Id is the selected ListItem’s Id and Key is the name. You can programmatically get an instance of the SPListItem by passing the SPList object as a parameter to SPItemKey.GetItemByIdFromList(SPList).

Public Members for Microsoft.SharePoint.Workflow.SPItemKey

Constructors
 SPItemKey()       Returns object with Key = string.Empty, Id = -1 
 SPItemKey(Int32 id)       Returns object with Key = id.ToString(), Id = id 
 SPItemKey(string key)       Returns object with Key = key, Id =Int32.Parse(key) 
Methods
 Equals(object rhs)       Boolean       Determines if current object equals object passed in 
 Equals(object objA, object objB)       Boolean       Determines if two objects are equal 
 Finalize()       Void       Empty override of base System.Object.Finalize() 
 FromItem(SPListItem listItem)       SPItemKey       Returns SPItemKey object given SPListItem 
 GetHashCode()       Int32       Generated from Exclusive OR operation between Id and Key.GetHashCode() 
 GetItemByIdFromList(SPList)       SPItemKey       Returns SPListItem from given list from Key or Id property 
 GetType()       Type       Returns Type for current SPItemKey 
 IsEmpty(SPItemKey)       Boolean       Static. Returns true if both Id and Key properties are null or if Id = -1 and Key is null or string.Empty 
 MemberwiseClone()       Object       Creates a shallow copy of the current SPItemKey 
 op_Equality(SPItemKey lhs, object rhs)       Boolean       Static. Determines if SPItemKey and Object are both null or equal 
 op_Equality(SPItemKey lhs, SPItemKey rhs)       Boolean       Static. Determines if two SPItemKey objects are both null or equal 
 op_Inequality(SPItemKey lhs, object rhs)       Boolean       Static. Determines if SPItemKey and Object are both not null or not equal 
 op_Inequality(SPItemKey lhs, SPItemKey rhs)       Boolean       Static. Determines if two SPItemKey objects are both not null or not equal 
 ReferenceEquals(object objA, object objB)       Boolean       Static. Determines if two objects are references to the same object 
 ToString()       String       Comma separated string: Key, Id 
Properties
 Empty       SPItemKey       Static. Returns empty object using empty constructor 
 Id       Int32       Read/Write. Id of SPItemKey 
 Key       String       Read/Write. Key of SPItemKey 

To access the new type in your class, be sure to reference the new assemblies for SharePoint 14 including C:\Program Files\Common Files\Microsoft Shared\web server extensions\14\ISAPI\Microsoft.SharePoint.dll and C:\Program Files\Common Files\Microsoft Shared\web server extensions\14\ISAPI\Microsoft.SharePoint.WorkflowActions.dll.

The new .actions file section would now look like:

<Action Name="myNewActivity"
 ClassName="SPSolutions.SharePoint.WorkflowEssentials.Activities. myNewActivity"
 Assembly="SPSolutions.SharePoint.WorkflowEssentials, Version=1.0.0.0, Culture=neutral,
 PublicKeyToken=08a33cc09f006379"
 AppliesTo="all" Category="SharePoint Solutions' WorkFlow Essentials">
   <RuleDesigner Sentence="Get %1">
     <FieldBind Field="ListId, ListItem" DesignerType="ChooseListItem" Text="List Item" Id="1" />
   </RuleDesigner>
   <Parameters>
     <Parameter Name="__Context" Type="Microsoft.SharePoint.WorkflowActions.WorkflowContext,
      Microsoft.SharePoint.WorkflowActions" Direction="In"/>
     <Parameter Name="ListId" Type="System.String, mscorlib" Direction="In" />
     <Parameter Name="ListItem" Type="Microsoft.SharePoint.Workflow.SPItemKey, Microsoft.SharePoint" Direction="In" />
   </Parameters>
</Action>


The new declaration in the class for parameters returned from the ChooseListItem DesignerType would now look like:

public static DependencyProperty ListIdProperty = DependencyProperty.Register("ListId", typeof(string), typeof(myNewActivity));
[Description("List Id")]
[Browsable(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Visible)]
public string ListId
{
   get { return ((string) (base.GetValue(ListIdProperty))); }
   set { base.SetValue(ListIdProperty, value); }
}

public static DependencyProperty ListItemProperty = DependencyProperty.Register("ListItem", typeof(SPItemKey), typeof(myNewActivity));
[Description("List Item")]
[Browsable(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Visible)]
public SPItemKey ListItem
{
   get { return ((SPItemKey) (base.GetValue(ListItemProperty))); }
   set { base.SetValue(ListItemProperty, value); }
}

Looking at the SharePoint 14 codebase, there are several new activities included in the namespace Microsoft.SharePoint.WorkflowActions.WithKey that use the SPItemKey object includng the same ListItem property as well as additional properties such as TaskId. It appears that the workflow activities in the new version of SharePoint uses this object extensively for List Items, probably as a smaller object to pass around instead of the full SPListItem object. It will be interesting to see how, if at all, this object changes in the beta release.

Deploying and Upgrading to Project Server 2010

October 21, 2009

These are some notes from a helpful session today at the SharePoint Conference 2009 in Las Vegas delivered by Christophe Fiessinger and Jan Kalis from the Microsoft Project Server team.  The notes are as organized as I can make them while I’m sitting here in the room, but they will of course not be as polished as I’d like them to be.  I’ve decided to err on the side of more information – less polish.

What exactly is Project Server 2010, anyway?  To put it as simply as possible, it is meant to provide project and portfolio management on a large scale.  That means collaboration, schedule and resource management, and reporting.

We got some good news and some bad news.  Project Server now requires the full version of SharePoint 2010, not just the free Foundation product.  However, out of the box, the Project 2010 Professional client program can sync with any SharePoint task list.  So, you may not always need Project Server to share and collaborate on projects and integrate with the full client.  Project Server includes the ribbon interface to simplify matters, and allows you to do much of the simple day-to-day entries and changes through the web interface.  The new enhancements in Excel Services, Performance Point Services, and other SharePoint reporting pieces provide excellent BI capabilities.

Project Server now functions as an add-on service application in SharePoint 2010.  There is therefore a lot of flexibility in farm topology, and it is now fully compatible with load-balancing and high-availability.  It no longer uses ActiveX, meaning you don’t have to touch desktops for upgrades and updates.

System Requirements:

  • Same as SharePoint 2010, plus
  • SharePoint 2010 Enterprise
  • Project Professional 2007 / 2010
  • Excel 2007 / 2010
  • IE 7 or 8 (other browsers not supported)
  • Exchange 2007 (optional, but server to server integration is now available)
  • Team Foundation Server 2010 (optional, but it is now integrated OOTB too)

Deployment Process

  1. OS / updates
  2. SQL Server / updates
  3. SharePoint Server 2010 (not included with Project Server anymore)
  4. Project Server 2010
  5. SharePoint Configuration Wizard and Farm Configuration Wizard
    (Minimum Service Applications:  Project Server, Excel Services, Performance Point Services, Secure Store Service, State Service (for charting))
  6. Central Admin Configuration
  7. Project Web Access Admin Configuration
    (Time reporting periods for time tracking, base security by roles, Cube Building Service, Exchange integration)

PowerShell is supported through the entire process.

Should SharePoint and Project be run in separate farms or separate?  Depends…

Together:

  • Server consolidation
  • Administration and maintenance
  • Leverage high availability and line of business integration
  • But, update testing is more complex
  • SharePoint Admins need more training
  • Additional licenses required if the farm is large (Project will require a license on every server in the farm)

Separate

  • Isolated update requirements
  • No dependency on intranet farm availability
  • Change management is simpler
  • Security isolation
  • Can still share a SQL server
  • But, additional administrative tasks
  • Duplicate governance

Capacity planning will not be terribly different than the 2007 version, although the new service applications that are available may affect the performance if you enable them all.

Upgrading

Do not skip the normal, boring analysis of your existing environment.  Project Server is complex and needs to be tested.

Project Server 2003 needs to be migrated via 2007, although it does not have to be brought all the way to production.

Project Portfolio Server 2006 / 2007 has 3 options:

  1. Map functionality, develop desired functionality on 2010, and then use the gateway to transfer the data.
  2. Finish existing projects in PPS 2007, and start new projects in 2010.
  3. Use side-by-side with Project Server 2010, syncing via the gateway.

Project Server 2007 is direct and streamlined OOTB, with two options:

  1. In-place Upgrade (remember 64-bit is required for SharePoint 2010, though)
  2. 4 or 5 Database Attach (the upgrade occurs during PWA provisioning)

Backward Compatibility Mode is automatically enabled in all cases after upgrade, which allows 2007 Project Pro SP2 clients to work seamlessly.  Project Pro 2003 or older clients are just out of luck.  Multiple client versions on the same PC are supported as long as they are not running at the same time.  Backward Compatibility Mode makes it possible to attack the server and client upgrades separately.  You should always do the server first, because the 2010 client will not work with the 2007 server product.  Once all clients are up to 2010, backward compatibility can be turned off so that full functionality becomes available.  Here’s what is suppressed in Backward Compatibility Mode:

  • Manually scheduled tasks are not available on the server or client
  • Tasks cannot be set to Inactive
  • Font strikethrough not available
  • All Departmental custom fields enforced on Project Professional 2007

The 2010 file format has changed, and older client versions will not be able to open the new files.  The only way to convert or use them is to download the Project Pro 2010 Trial product.  This is due to the fundamental changes the Manual Scheduling introduces into project plans.  Opening these files in prior versions would be confusing or misleading to 2007 users, even if a converter was provided.

Externalizing BLOB Storage in SharePoint 2010

October 21, 2009

These are some notes from a helpful session today at the SharePoint Conference 2009 in Las Vegas delivered by Srini and Burzhin (I typed too slowly to get their last names), product engineers from Microsoft.  The notes are as organized as I can make them while I’m sitting here in the room, but they will of course not be as polished as I’d like them to be.  I’ve decided to err on the side of more information – less polish. In the interest of full-disclosure, this is a pretty new topic for me personally.  Therefore, it is possible that some of these notes represent things a bit differently than how the presenters intended.  The RBS team blog is available here: http://blogs.msdn.com/sqlrbs to find things in their own words.

BLOBs are Binary Large OBjects – a container of unstructured bytes of data.  SharePoint data that is not meta-data (documents – most other list items are completely meta-data) is stored in BLOBs in SQL databases.  BLOBs typically account for 60-70% of all content storage.  Most SharePoint operations act against the meta-data, not the BLOB data – until you go to click on the link and open the document.  By default, BLOB data is stored in the content database with the meta-data.

This model works well, but it does have some pain points.  SQL storage is inherently expensive, especially if it’s on a SAN.  The more data existing in SQL, the more performance load there to retrieve it.  Large data sets are slow to backup and recover.  SQL data is difficult to guarantee retention and deletion for compliance.  So…, Remote BLOB Storage (RBS) will solve all of our problems and bring about world peace by allowing us to store BLOB data outside of our content databases.

Previously with 2007, EBS (External BLOB Storage) meant that third-party providers were responsible for both managing external BLOB storage and creating the API libraries to interface with SharePoint.  The objective now is for SharePoint, itself to provide a common set of API libraries to do so.  The result is a downloadable add-in component that can be registered for a SharePoint farm via the SQL 2008 R2 Feature Pack (see below).  EBS is supported in 2010, but is deprecated.  Migration from EBS to RBS can be performed via PowerShell commands.

RBS is fully managed code, can be scoped to individual content databases (instead of at the farm level), can be configured and managed via PowerShell, supports many providers (including third-party), and supports migration both ways.  It ships with a native RBS FileStream store provider.

From the user’s perspective, SharePoint 2010 does all of the dancing transparently.  They’ll never know something is different.

From the administrator’s perspective, there are new PowerShell cmdlets that talk to the relevant SQL stored procedures for installing, configuring, provisioning, and maintaining RBS.

From the third-party provider view ,there is now no need to write the BLOB store libraries. 

Implementation

The RBS add-in must be installed first in SQL (the SQL RBS 2008 R2 with FILESTREAM Provider)

RBS and Provider DLLs must be installed on all WFEs

RBS must be enabled and configured using PowerShell:

  • site.contentdatabases.rbssettings.enabled
  • GetProviderNames
  • SetActiveProvider (1 BLOB store to many content database)
  • Migrate (copy entire BLOBs in or out of the db with no downtime)

Backup and Restore

This will by necessity be more complicated with multiple stores for SharePoint.  However, it is workable by following some simple restores.

  1. Always start SQL backups first (the windows can overlap)
  2. Always start BLOB restores first (the windows can overlap)

A longer BLOB retention policy can make it realistic to back it up less frequently than your SQL backups.  The RBS Maintainer keeps track of deletions and propagates them to the BLOB store.  Deletions don’t have to be concurrent from SharePoint to BLOB.  You should retain BLOBs long enough to allow you to restore the previous version of the content database without also restoring the BLOB store.

Performance

RBS seems to add little to no performance overhead in internal Microsoft testing with 128 users.  In fact, with larger files – it may have a slight advantage.  Third party providers may vary a bit, but are expected to cause no more than a 5 – 10% degradation and less for larger files.

Deploying SharePoint 2010 Extranet

October 21, 2009

These are some notes from a session today at the SharePoint Conference 2009 in Las Vegas delivered by Ryan McMinn, an Access Services guy at Microsoft.  It was nice to get more specific information about getting FBA to work, but it was also a little frustrating to not get much information about setting up SharePoint to trust external claims providers.  It’s touted as the best answer for partner collaboration, and I anticipate it to be a big winner for sites the interact with large numbers of individual contributors (think LiveID users), and earlier sessions pointed to this one as having all of the implementation details – but it seems like most of we get are concepts and generalities so far.  The notes are as organized as I can make them while I’m sitting here in the room, but they will of course not be as polished as I’d like them to be.  I’ve decided to err on the side of more information – less polish. 

Design Considerations and Business Requirements

  • Account Management
  • Network Access and entry points
  • Single Sign On
  • Information Disclosure
  • Antivirus
  • Rich Client Experience

Target Audiences

Remote Employees – Need to use their internal identity.  Need access to Line of Business apps, collaboration, and publishing content.

Partners – Need to use both internal and / or external identities.  Need access to limited sites and data (no other partner data).

Vendors and Customers – Need to use external identity.  Need access to targeted and segmented content for collaboration and / or publishing content.

We must also think about zones and Alternate Access Mappings (or host named site collections).  The Default zone should be the most secure (SSL), because it is the fallback zone in case of problems

Authentication Issues

Claims Based Authentication can use Windows Integrated, Forms Based (ASP.Net or LDAP), or SAML.  When you create a web application, you pick between Windows Classic or Claims Based.  You can still use separate zones for different authentication methods.  However, if you choose Claims, then multi authentication can be used in the same zone (as long as they use the same protocol – HTTP or HTTPS).  This is much like what Outlook does with RPC over HTTP (using Windows Integrated when possible, and prompting when not).  The authentication page first asks which method you want to use for login.  This happens in the browser or in the rich Office clients.

There is not yet any documentation about how to configure the SharePoint STS to trust external claims providers such as LiveID or external federated domains.  The short version is that they must be installed into the store, and then PowerShell commands are used to register them for use.  Microsoft requests us not to go into production with Beta2 Claims Based functionality, but will provide instructions to test it there and wants us to do so.

There are some specific steps necessary to make FBA work in 2010.

  1. Setup the authentication provider
  2. Setup the web app to use the authentication provider
  3. Add authentication provider to the web.config files of:
    • Central Admin
    • Web Application
    • STS

This can be done via PowerShell (if you are upgrading an existing web application you should do this BEFORE attaching the database for upgrade).

  1. new-spauthenticationprovider –aspnetmembershipprovider “membership” –aspnetroleprovidername “rolemanager”
  2. new-spwebapplication –name “my web app” –applicationpool “claims app pool” –applicationpoolaccount “domain\appool” –url http://servername –port 80 –authenticationprovider “membership”

ForeFront Unified Access Gateway 2010 (formerly IAG, Intelligent Application Gateway, which apparently is the yet again renamed replacement for ISA 2006) allows you to leverage existing servers without replication, a DMZ, or more servers.  It uses wizards to publish sites, do link translation, supports AAM, and path blocking.  It can also apply more specific rules (upload, download, edit…) based on identity, role, and endpoint device (corporate desktop vs. home PC).  It can also handle authentication with multiple directories and 2-factor tools, and provides excellent single-sign-on.

Forefront Identity Manager 2010 synchronizes identities and passwords across systems, automates user provisioning and management, and can be used to delegate this ability to partners.

Forefront Protection for SharePoint 2010 scans for viruses and malware, filters inappropriate content, and notifies administrators for infractions.

Develop Advanced Access Web Databases and Publish to SharePoint

October 21, 2009

These are some notes from a REALLY great session today at the SharePoint Conference 2009 in Las Vegas delivered by Ryan McMinn, an Access Services guy at Microsoft.  Lots of good, detailed information here.  The notes are as organized as I can make them while I’m sitting here in the room, but they will of course not be as polished as I’d like them to be.  I’ve decided to err on the side of more information – less polish.

This is a follow-up to a more basic session on building apps yesterday (which I didn’t attend).  Access has long been valued by business users for its rapid application development capabilities.  It’s also been hated by many IT people for its lack of security, management, and disaster recovery.  Since the 2007 version, Access and SharePoint have been friendly with each other.  Now however,fully integrating Access via SharePoint 2010’s Access Services addresses IT’s concerns and actually makes it more powerful for business users at the same time.

A big emphasis has been put on providing database templates to help people get started, including community templates uploaded to Microsoft from you and me.  One of the OOTB ones is a ‘Web database’.

Miscellaneous Access Client Improvements

Building table schema in datasheet view is easier now, as the column headings allow you to pick the data type on the fly.

Data Models are groups of fields you can create and insert as a group.

Data Types allow you to insert common calculated fields along with the fields they reference.

The Macro writer has been amped up to be almost like working in the VBA editor, but still maintaining the low-security-required environment for web publishing.  This adds enhanced capabilities to do full If Then Else structures, comments, parameters with full Intellisense.

The new Web Browser Control allows you to show web content in your forms by parameter-based URLs.

Publishing to Access Services

You do this in Backstage (Office menu > Info; or Office menu > Share)

Tables turn into lists, forms turn into aspx pages, reports turn into rdl files (Rptg Svcs), and macros turn into workflows.

It creates all of this in its own sub-site.

Full web functionality is only available on native Access lists that are moved up to SharePoint.  External lists are usable in the full Access client, but not via web forms.  This is true even if you are leveraging BCS to bring that data into SharePoint.

You can also save your database design as templates that get saved into SharePoint as wsp solution files.

Macros are great for:

Change validation

Change tracking

Notification

Workflow

Aggregates (doing them this way gives better performance that queries)

Bulk updates

Custom calculations

There are Before * data macros that trigger before the database is updated.  They are meant to be quick, and are good for validation.

After * data macros trigger after the change is committed to the database.  They can be much longer, looping, firing other macros…

Named data macros are not triggered automatically, but are called by other macros or button clicks.  Functionality is expanded like the After * data macros.

Using Enterprise Content Types and Managed Taxonomies in SharePoint 2010

October 21, 2009

These are some notes from a REALLY great session today at the SharePoint Conference 2009 in Las Vegas delivered by Daniel Kogan, the Metadata Service Program Manager at Microsoft.  Lots of good, detailed information here.  The notes are as organized as I can make them while I’m sitting here in the room, but they will of course not be as polished as I’d like them to be.  I’ve decided to err on the side of more information – less polish.

Our content types are now free to roam throughout the enterprise!  We also now get the ability to standardize and manage our meta-data tagging easily across different content types, usage scenarios, and storage locations.  Now, tags can be hierarchical just like your site or folder structure.  They can also be localized by language.

There are several questions we need to consider when we begin to contemplate this type of standardization.  They are similar concerns to what we had to consider when planning content types and site columns within a site collection, but obviously the issues can be far more complex when the scope increases across the enterprise.

Is it the same?

Does this have the same structure, policies, defaults everywhere in the enterprise?  Are things of content type “A” always the same?

What is it?

Do I trust it, recognize it?

Where is it?

Searching, navigating…

What happens to it?

Retention, workflow…

 

Terminology:

Hub – A site collection designated as a “souce” from which we share content types

CT Syndication – Publishing, sharing, pushing one or more content types across site collection, web app, and farm boundaries

Taxonomy – a hierarchical tree

Folksonomy – informal flat list of adhoc values

Term Store – DB that contains taxonomies

Groups – a security boundary within the term store and above the term set

Term set – a hierarchical section in the term store that contains many individual terms – e.g. Months, or Regions. (max 1000 total per store)

Term – a node in the taxomy with an ID and many text labels (30,000 per term set, max 1million total)

Tagging – applying metadata to an item (authoritative or social)

Keywords – not just a text string, a reference to a node in the hierarchical term store.  This is particularly powerful, standardizing tags for future use.  As you enter keywords, a suggestion list displays showing the entries in the hierarchy.

 

Content Type Syndication

  • Each Metadata Service app can publish through a maximum of 1 hub
  • It is not a requirement to syndicate or consume from the service
  • Content Type with all corresponding columns, policies, and workflow association
  • From the hub, you can publish, unpublish, republish, and roll up errors
  • From the consuming side you can extend, derive, view errors, refresh from the hub

If you are working on the service in Central Admin, it is created with whatever name you like – configuring where the hub site collection is.  Then a connection service is used to consume from the original service.

If you are working in the hub, you can simply go to the Content Type gallery, click the type and choose to Manage publishing…  In the background, the Metadata Service creates a cab file that is versioned.  So the consuming web apps, site collections, and farms can check regularly for new versions of subscribed content types.

On the consuming side, it shows up like a normal content type – but it’s read-only.

Applying Metadata

Web Browser – Edit Properties, by a business process, location-based (inherit by virtue of where it is stored)

Rich Client – DIP, Backstage (Office menu > Info).  The Office client fetches the term set when it opens the document, so that recently added terms are available.

Once the meta-data has been entered using the term store, the column headings AND left-hand navigation displays the tag taxonomy as a means of filtering or pivoting the library listing.  If that doesn’t create a mental picture for you, it’s kind of like automatic, faceted, dynamic folder trees based on tags.

Managed Metadata columns are like a ‘super choice’ field that looks up in the hierarchical term store and filters exclusively or inclusively.  The user can even add entries to an ‘open term set’, while ‘closed term sets’ are owned by someone and closed to others.

Managed Keyword columns are like a ‘super text’ field where the user can type, and they are given suggestions from the term store.  If their entry doesn’t exist, the system will add it automatically.

 

The Term Store Management Tool

You find this at Home > Site Settings > Site Administration > Term Store Management

This tool allows you to access  all available term stores, to copy, reuse, merge, delete… individual terms.  Merges ripple through all the millions of documents that use them, and the two are now synonyms of each other (including any natural abbreviations).

SharePoint 2010 Upgrade Part 2: Advanced Scenarios

October 20, 2009

These are some notes from a great session today at the SharePoint Conference 2009 in Las Vegas delivered by Sean Livingston, the Upgrade Program Manager at Microsoft.  Lots of good, detailed information here.  The notes are as organized as I can make them while I’m sitting here in the room, but they will of course not be as polished as I’d like them to be.  I’ve decided to err on the side of more information – less polish.  Basic upgrade process and tools information was presented in part 1.  (My notes for that session are here.)

The Upgrade Team worked within a specific Upgrade Philosophy that included the following tenets:

  • Detect issues early, both in O12 and at start of upgrade.
  • Keep the administrators informed as to issues and next steps.
  • No data loss.
  • Minimize downtime
  • Continue when possible (when errors are not fatal, log an error and move on)
  • Be reentrant (prevent catastrophic failures that cause complete restoration)

Upgrade Sequence

Stage 1:  Boot strap

  1. Config db
  2. Admin content db
  3. Pre-joined farm
  4. Join farm

Stage 2:  Central Admin

  1. Local farm
  2. Admin web service
  3. Admin web application
  4. SPIISSite objects
  5. Admin content db > Web Templates, Features Upgrade, SPSites

Stage 3:  User Data (performed by a Timer Job ASAP.  This prevents problems if the admin’s Terminal Server session times out and logs off.)

  1. Local farm
  2. SharedResourceProvider12 Objects > Partner stuff
  3. ???? (didn’t type fast enough…)
  4. Content databases > Web templates, Features upgrade, SPSites

Within these steps come many smaller actions.  Each of these are marked as successful when complete within the object schema.  If the upgrade is restarted, it resumes after the last successful action in each sequence.

The further you are from the current patch level, the longer the upgrade will take, because it has to perform those actions now.

Miscellaneous

  • V2V upgrade DBs set to simple recovery to maximize performance (may not happen in Beta 2)
    So, don’t do any log shipping or mirroring during upgrade.
  • DB growth during upgrade (2 to 3 times the normal size including the log)
    • Manually shrink database after upgrade
    • There will be a Health Rule that looks for DBs with large amounts of free space
  • SQL timeouts are removed (if SQL server is still up)
  • Version Path fallback logic (if dependencies are not in the 14 hive, look in the 12, if not there look in 60)
  • Object locking has been reworked to allow multiple db upgrades to run concurrently without interfering with each other (checks for stale locks every 2 minutes)

Read-Only Content Databases allow you to upgrade a copy of the databases on the new farm while users access content.

  • This is only for Content Databases
  • Must be at least 2007 SP2
  • SharePoint reads SQL database lock settings and proactively applies site collection locks so the users don’t see edit functionality in GUI
  • If traffic is high, you may need to duplicate your SQL server for the upgrade to have enough resources

Parallel Upgrade used to be done via separate temporary farms.  Now it can be done in separate command windows on the same server.  Microsoft internal testing has found that a single true SQL server can handle up to about 8 concurrent upgrade threads.  If you’re doing it in a limited VM environment, it’s probably more like 2 or 3.

AAM Redirection can now be used with the Content DB Attach upgrade, but it should be seen as the approach of last resort.  This can only be as granular as your content databases are.  It is complex and requires URL changes which means link fixup will be needed and not all clients will understand the changes.

The planning process before you attempt an upgrade should include many things:

  • Gather information
    • Pre-upgrade checker
    • WinDiff
      • New server with same version and patch level
      • Compare Web Server Extensions directory
      • Compare IIS directory
      • Compare GAC directory
  • Determine impact (stsadm –o EnumAllWebs)
  • House-cleaning
    • Stale sites and webs
    • Old document versions
    • Templates, features, and web parts
    • Repair data issues
      • stsadm –o database repair
      • stsadm –o deletelist
  • Collect customizations
    • Gather original installation media
    • stsadm –o ExportIPFSAdminObjects
  • Test the upgrade
    • Don’t ignore warnings and errors in logs
    • Use real datasets
    • Similar hardware
    • FBA will need to have some changes ALWAYS in your web.config files
      • For the web app
      • For Central Admin
      • For the Security Token Service
    • Make sure you test in both UI modes

Surprisingly, upgrade performance is more affected by number of sites, webs, lists… than it is by database size.  Hardware limitations are also key.

When the upgrade is finished, there are some manual things you will likely need to do.

  • FBA configuration
  • Unghosted pages
  • Over wide lists (too many columns)
  • Site templates and list templates will not come forward in the upgrade
    Instances built from the templates are fine, just the templates don’t upgrade.  You will need to recreate the templates (best practice is to do this as user solutions instead of .stp files)

If upgrade fails (hypothetically, of course), the following sequence is recommended for troubleshooting:

  1. Go to status page
  2. Go to error log
  3. Go to full upgrade log (the correlation ID from the error screen is helpful to find the relevant log entries)
  4. Test-SPContentDatabase
  5. stsadm –o enumallwebs
  6. Fix issues
  7. Restart your upgrade

SharePoint 2010 Upgrade Part 1: Fundamentals

October 20, 2009

These are some notes from a great session today at the SharePoint Conference 2009 in Las Vegas delivered by Sean Livingston, the Upgrade Program Manager at Microsoft.  The notes are as organized as I can make them while I’m sitting here in the room, but they will of course not be as polished as I’d like them to be.  I’ve decided to err on the side of more information – less polish.  There will be another session immediately following about advanced upgrade scenarios – so stay tuned.

Let’s start with some quick reference information:

Supported Scenarios

  • In-Place
  • Database Attach – Probably the most common to be used
  • Single Click Install (Basic install w/ WID to SQL Express 2008)

Unsupported Scenarios

  • Upgrade from earlier than WSS v2 SP2 / MOSS 2007 SP2
  • Direct upgrade from WSS v2 / SPS 2003 or earlier
  • Side by side installation
  • Gradual upgrade (although AAM redirection is still possible, see next session)

There are several preparation tools that come bundled with 2007 SP2 (enhanced in October 2009 CU) to get you ready to upgrade:

  • stsadm –o preupgradecheck (-localonly if you want to run against individual servers)
  • stsadm –o EnumAllWebs (10/09 version includes features, event receivers, and web parts activated per web)
  • SPDiag V2 (in the Admin Toolkit)
  • stsadm –o ExportIPFSAdminObjects (for customizations like admin-approved InfoPath Form templates)

The preupgrade check looks for many things and reports on them.  This is done without editing the databases, and the operation is not required before upgrade – both of which are changes from the 2003 > 2007 prescan operation.

  • Informational
    • Farm servers and databases
    • AAM Configuration
    • Lists, Site Definitions (with instance counts), Features, Web Parts, Event Receivers to match up GUIDs and find missing elements
    • FBA configuration (FBA will have to be reconfigured in 2010, think web.configs…)
    • Installed Language Packs
    • CAML views/CAML content types
  • Issues
    • Missing Site Definitions, Features, Assemblies
    • Data orphans
    • Modified content databases

There are also some new tools available in 2010 to help from the new server:

Test-SPContentDatabase

  • Complements the pre-upgrade check
  • Compares against a specific web application to look for missing dependencies
  • Scans both 12 and 14 databases

Upgrade-SPContentDatabase

  • Will resume an upgrade process (B2B or V2V) already in progress
  • This DOES NOT attach a database (contrary to the Beta review document distributed in hard-copy at the conference)
    • Attaching is done by stsadm –o addcontentdb, or
    • Mount-SPContentDatabase (NOTE: Until RTM, this one will force the UI upgrade to 14)
  • Upgrade-SPEnterpriseSearchServiceApplication

The new Visual Upgrade Capability by default upgrades using the old Office 12 UI.  It does this by including all of the old master pages and CSS sheets in the new version.  Admins / Owners are then able to do a temporary preview of the new UI, and / or do a final UI upgrade to the new look and feel.

  • Farm admin or site collection admin controlled
    • Web level setting
  • Preview mode is not meant for extensive changes
  • Web parts can now be UI version aware to make them automatically render differently per instance
  • Some items are not O12 compatible
    • MySite host
    • Project Web Access site collection
    • Report Server web parts

Patch Management has been overhauled, basically because it stunk in many ways in 2007.  2010 now has:

  • A new UI
  • A new PowerShell cmdlet
  • New Health Rules
  • Backwards compatibility mode
    • Binaries can be ahead of the database(s)
    • Defer upgrade for short period of time
    • Not intended for long delay (maybe weeks or days)

There are multiple downtime mitigation techniques that can be used to minimize the effect of the upgrade process on end users.  Some of these are valid for both 2007 and 2010, and others are only in 2010:

Both

  • Read-only databases (kind of, the UI just trims all of the edit functionality)
  • Parallel upgrade farms
  • Gradual Upgrade

2010 only

  • Single server, multiple db upgrade sessions (works consistently well up to 2 sessions on the same disk spindle, for more you will need to test)
  • Content database with AAM redirection

Upgrade logging has also been improved to help us trouble-shoot potential errors and warnings.

  • One upgrade log per session
  • Errors only log
  • Predictable structure for log
  • Improved status page
  • New history page
  • Command line progress indication

Shared Service Providers each get upgraded into separate service applications, and new databases are created as needed.