Removing Orphaned Features From Content Database(s)

In an ideal world, the SharePoint pre-upgrade checker will have been run within an environment prior to shutting down the databases for an attach-upgrade scenario. And all subsequent issues (such as orphaned features) will have been addressed utilizing a tool like the SharePoint Feature Manager. However if, like myself, you reside in this beautifully imperfect world and have been provided with content databases for upgrade which are generating the following error when running the Test-SPContentDatabase command against them AND you don't have the luxury of correctly resolving the issues within the production farm - don't fret.

Initially I tried this guy's script, but I couldn't get it to run so I had to delve into the database a bit. Locate the 'Features' table within the pertinent content database and delete the row(s) who's FeatureId matches the one reported in the error.

NOTE: This is NOT the preferred and/or supported method of resolution, and should only be used when absolutely necessary. I would also suggest retaining a back-up of the database prior to making the changes.

Category : MissingFeature Error : True UpgradeBlocking : False Message : Database [Database_Name] has reference(s) to a missing feature: Id = [Feature_ID]. Remedy : The feature with Id [Feature_ID is referenced in the database [Database_Name], but is not installed on the current farm. The missing feature may cause upgrade to fail. Please install any solution which contains the feature and restart upgrade if necessary.

SQL Server

Posted on 7/3/2012 10:18:00 AM by sterlingt

Permalink | Comments (0) | Post RSSRSS comment feed |

Categories:

Tags:

SharePoint 2010 Upgrade - Missing Custom Content Types

Thank-you, thank-you, thank-you for this post: http://social.technet.microsoft.com/Forums/en-US/sharepoint2010setup/thread/12effe76-af9d-424a-ab05-6f87d794ded9!

I encountered a strange situation where the 'Definition' column in the ContentTypes table for a few custom content types was set to NULL (no idea why, as usual - I inherited this mess). The missing value didn't seem to have an affect in 2007 (the content types showed up just fine in the Content Types gallery), but after upgrading to 2010 those content types were MIA. Follow the instructions at the bottom of the aforementioned posting, in 2007 before the upgrade...and Voila! Those 'Definition' values will be be magically populated to ensure a smooth Content-Type transition in to 2010 :-).

Also, here's a little TSQL query-nugget I found SUPER helpful with troubleshooting content type issues by filtering against the SQL varbinary ContentTypeId field:
Select * from ContentTypes Where sys.fn_varbintohexstr(ContentTypeId) = '[ContentTypeID]'

Posted on 7/3/2012 9:57:00 AM by sterlingt

Permalink | Comments (0) | Post RSSRSS comment feed |

Categories:

Tags: