SharePoint 2010 database attach upgrade with managed paths

This week I found a new to me issue with doing a database attach upgrade from 2007 to 2010. It seems if your 2007 content database has additional wildcard managed paths (anything other than /sites) that when you upgrade that database to SharePoint 2010 that you will end up with a bunch of explicit managed paths in SharePoint 2010. Kind of break downs like this:

2007 Wildcard managed paths:

  • /sites
  • /departments
  • /projects

2007 site collections in the content database:

  • /
  • /sites/teamsite
  • /departments/hr
  • /departments/accounting
  • /projects/CowMachine
  • /projects/CowNinja

When you create a new 2010 web application and attach the content database you will get the following managed paths:

  • /sites – wildcard
  • /departments/hr – explicit
  • /departments/accounting – explicit
  • /projects/CowMachine – explicit
  • /projects/CowNinja – explicit

And of course all of your site collections will be available.

As you can quickly tell this is way less than ideal. For one when you try to create a new site collection for the Cow Black Ops project you will not be able to create it at /projects/BlackOpsCows because there is no longer a managed path for /projects. Boo! So how do you fix it? About time you asked.

Create managed paths before attaching 2007 content databases

The fix here is quite simple. Know your managed paths you need before you do your upgrade. Then right after you create the 2010 web application and before you do the mount-spcontentdatabase you need to go into Central Admin > Web Application management, click your web application and then from the ribbon select managed paths. Now create your wildcard manage paths. In this example you create /departments and /projects. Now return to your regularly scheduled program and do your 2007 content database upgrade.

If you already find yourself with this issue the fix is as simple as you are assuming. Go into central admin > manage content databases and remove your upgraded databases. Once they are detached go delete all of the explicit managed paths for your database. Then create the wild card paths you want. Now reattach your content database. All better. J

Hope this helps


SharePoint Consulting

2 Comments so far

  1.   DD on February 24th, 2011          Reply

    Great, I was caught by suprise on this one. Lucky for me Shane is here. I noticed this during testing.

  2.   Chad Clarke on March 15th, 2011          Reply

    As with most SharePoint Solutions, there is another fix to this problem. I wanted to list it here to demonstrate how flexible managed paths are. You can set up the wildcard paths after the migration, delete the explicit paths, and the managed paths would function the same after. Its a pretty simple fix that does not involve redeploying the entire database(s). The site collections remain but the ability to work with them as explicit managed paths goes away.


    Chad Clarke

Leave a Reply