Remove/Deactivate a missing feature for a cleaner upgrade

If you’re running across this blog it’s possible you’re missing a feature or working on upgrade.

There are multiple ways to detect missing features including the WssAnalyzeFeatures tool from MSDN and PreUpgradeCheck.  Check out Gilham’s blog on removing missing features for more detail and tools.

Stsadm –o Preupgradecheck (Installed with SharePoint 2007 SP2)

In Features you’ll find the ID (GUID) and the word “missing”

Snippet from preupgrade check .htm report:

Name = [Unknown], Feature id = [bbe9def7-2fe9-a0b1-d712-aa128c837ebe], Reference count = [1], Scope = [Web], Status = [Missing]

 

If the site is still working as it should and you just want to clean things up you can remove the feature.

First you can uninstall the feature (it has to be there to uninstall it, we’ll see that in a second.)

C:Program FilesCommon FilesMicrosoft SharedWeb Server Extensions12BIN>stsadm -help uninstallfeature

stsadm.exe -o uninstallfeature
           {-filename <relative path to Feature.xml> |
            -name <feature folder> |
            -id <feature Id>}
           [-force]

C:Program FilesCommon FilesMicrosoft SharedWeb Server Extensions12BIN>stsadm -o uninstallfeature -id bbe9def7-2fe9-a0b1-d712-aa128c837ebe

Feature with Id ‘bbe9def7-2fe9-a0b1-d712-aa128c837ebe’ is not installed in this farm. The feature was not uninstalled. Looks like by doing a search, this feature is related to the community kit blog.

 

If the feature is not installed on the farm, and you want to force remove the feature you can run stsadm to deactivate the feature.  More context to this error on William Wolfe’s blog.

C:Program FilesCommon FilesMicrosoft SharedWeb Server Extensions12BIN>stsadm -help deactivatefeature

stsadm.exe -o deactivatefeature
           {-filename <relative path to Feature.xml> |
            -name <feature folder> |
            -id <feature Id>}
           [-url <url>]
           [-force]

C:Program FilesCommon FilesMicrosoft SharedWeb Server Extensions12BIN>STSADM -o deactivatefeature -id bbe9def7-2fe9-a0b1-d712-aa128c837ebe

The feature with Id ‘bbe9def7-2fe9-a0b1-d712-aa128c837ebe’ is not currently installed. Use ‘force’ to deactivate it at this scope.

 

Let’s add the force parameter:

C:Program FilesCommon FilesMicrosoft SharedWeb Server Extensions12BIN>STSADM -o deactivatefeature -id bbe9def7-2fe9-a0b1-d712-aa128c837ebe -force

Operation completed successfully.

 

Deactiviting this feature bbe9def7-2fe9-a0b1-d712-aa128c837ebe across all the web apps cleaned it up:  

Now I’ll rerun preupgradecheck and see that features are now all installed.  Our missing feature has been removed/deactivated (Dependency removed!).

FeatureInfo… Information Only – Now passed!

 

On an unrelated but related note, I’m seeing another missing feature of a different type… This one needs to be handled in a different way…

 

Re-running the upgrade I can still see it is missing a feature that’s not showing in preupgradecheck.  The scope is on a specific web.  I could pass in that web and try to deactivate it, so I’ll jump in the log to determine which database to look at. 

[FeatureInfo] [DEBUG] [8/12/2010 1:31:07 PM]: Searching for features in content database wss_content_joel…
[FeatureInfo] [DEBUG] [8/12/2010 1:31:07 PM]: Found 2 webs using feature definition 00bfea71-c796-4402-9f2f-0eb9a6e71b18 in content database wss_content_joel.
[FeatureInfo] [DEBUG] [8/12/2010 1:31:07 PM]: Found 2 webs using feature definition 00bfea71-5932-4f9c-ad71-1557e5751100 in content database wss_content_joel.
[FeatureInfo] [DEBUG] [8/12/2010 1:31:07 PM]: Found 2 webs using feature definition 00bfea71-a83e-497e-9ba0-7a5c597d0107 in content database wss_content_joel.
[FeatureInfo] [DEBUG] [8/12/2010 1:31:07 PM]: Found 2 webs using feature definition 00bfea71-4ea5-48d4-a4ad-7ea5c011abe5 in content database wss_content_joel.
[FeatureInfo] [DEBUG] [8/12/2010 1:31:08 PM]: Found 1 webs using feature definition fde5d850-671e-4143-950a-87b473922dc7 in content database wss_content_joel.
[FeatureInfo] [DEBUG] [8/12/2010 1:31:08 PM]: Found 2 webs using feature definition 00bfea71-d1ce-42de-9c63-a44004ce0104 in content database wss_content_joel.
[FeatureInfo] [DEBUG] [8/12/2010 1:31:08 PM]: Found 1 webs using missing feature definition bbe9def7-2fe9-a0b1-d712-aa128c837ebe in content database wss_content_joel.

 

Forcing the upgrade for SP2 still resulted in this error in the error log:

[SPManager] [ERROR] [8/12/2010 1:47:53 PM]: ReflexiveUpgrade [SPWebService Parent=SPFarm Name=SharePoint_Config] failed.
[SPManager] [ERROR] [8/12/2010 1:47:53 PM]: Feature ‘20477d83-8bdb-414e-964b-080637f7d99b’ is not installed in this farm, and can not be added to this scope.

This feature is a feature that should be on the farm and may have resulted from a WSS to MOSS conversion or db attach.

Total number of configuration settings run: 3
Total number of successful configuration settings: 2
Total number of unsuccessful configuration settings: 1
Successfully stopped the configuration of SharePoint Products and Technologies.
Configuration of SharePoint Products and Technologies failed.  Configuration must be performed before you use SharePoint Products and Technologies.  For further details, see the diagnostic log located at C:Program FilesCommon FilesMicrosoft SharedWeb Server Extensions12LOGSPSCDiagnostics_8_12
_2010_13_56_13_669_1368454839.log and the application event log.

If you see this feature 20477d83-8bdb-414e-964b-080637f7d99b is missing and preventing your upgrade to SP2 or otherwise run the following:

First:

stsadm -o installfeature -name PublishingTimerJobs

Second:

stsadm.exe -o execadmsvcjobs

Finally:

psconfig -cmd upgrade -wait -inplace b2b

Total number of configuration settings run: 4
Total number of successful configuration settings: 4
Total number of unsuccessful configuration settings: 0
Successfully stopped the configuration of SharePoint Products and Technologies.
Configuration of the SharePoint Products and Technologies has succeeded.

Published by

Joel Oleson

I LOVE traveling our little planet. In my quest to visit every country in the world I've got about 35 UN countries left! I'm not just country hopping, but looking for the most immersive cultural experiences and capturing them as photos and videos. Yes, I'm also a geek. I've been recognized as a Microsoft Regional Director, a community leadership award. When not traveling, I'm in paradise in sunny southern California as I'm a Senior IT Manager at Blizzard Entertainment.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s