[2 days left] What’s wrong with your cloud strategy? Learn why multicloud solutions matter with Nimble Storage.Register Now


Content database has feature orphans

Posted on 2013-02-01
Medium Priority
Last Modified: 2013-02-03
On the health monitor, under server side dependencies, I've received the following error that I'm sure people have seen before.

[MissingFeature] Database [WSS_Content] has reference(s) to a missing feature: Id = [6984f8e8-f991-4ae0-aa23-02a6cbf94a55], Name = [Feature Demo], Description = [], Install Location = [FeatureDemo]. The feature with Id 6984f8e8-f991-4ae0-aa23-02a6cbf94a55 is referenced in the database [WSS_Content], 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.

I also get an error under content databases, which seems to be caused by the same thing, orphaned features in the content database. I know how this happened but I'm not sure why.

I created a few features that weren't working even though they were installing and activating fine. I tried many install/activations and many uninstall/deactivations. I finally wiped everything out. First I deacativated all features (there were only about 4 that I created) and uninstalled them all and then even wiped out their feature folders in the features directory under SP root. Then i deleted the site collection and created a new one in it's place.

So it would appear that somehow, even if you do a proper deactivation first and then a proper uninstall, these don't really do what they advertise and apparently do not do their job by removing it's content database reference. I would rather not have to perfectly recreate these features with the exact original guids and reintroduce these folders back into the features folder

I ran stsadm -o databaserepair -url "https://myrootaddress.com" -databasename WSS_Content -deletecorruption

I don't believe I had any syntax errors because it ran for a few secs but it returned to the prompt with no output. Ran the reanalyze now for the error in Central admin and it's still shows up as an error. Restarted the iis, but it didn't help.

Has anybody else run into this really stupid problem maybe when they tried an upgrade??
Question by:BobHavertyComh
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 4
  • 3

Author Comment

ID: 38844500
I also went into the sql management studio, went to the features table, found the features that have the same id as the ones in the error message and deleted those rows. Stopped and restarted the SQL Server. Rebooted the entire server. Nothing was fixed, the same error messages show up in central admin.

Does anybody have any knowledge of this that actually works or do I have to do a complete uninstall? Everything I have researched flat out does not work as advertised. i can't believe that this is an unsolvable problem but with all of the recommendations I've found and tried, none of them work.
LVL 51

Accepted Solution

Ted Bouskill earned 2000 total points
ID: 38846048
Well, touching the database has wiped out any change of getting Microsoft Support.  Even using proper techniques this might not be fixable now because there will be references in the databases that are broken.

Did you not look for links like this:

Or this:

However, now that you've touched the database I'm not sure they will work.

Author Comment

ID: 38846639
Well, touching the database was the only thing that seemed to work. The stsadm databaserepair with a -deletecorruption would run for a second or two, produce no output and then return to the prompt. I ran this three times. It seemed to do nothing because the orphaned features were still there, so as far as I'm concern, that command simply does not always do it's advertized job correctly and is faulty in some situations. Also what is faulty is the auto repair feature when viewing the error in Central Admin. Tech articles claim that this is how you fix the problem. They are wrong in my situation, it did absolutely nothing and was a useless feature in my case. I don't understand why things don't just work the way they are advertised, but this wouldn't be the first time an advertised Microsoft feature doesn't actually work correctly in all advertised situations.

One of the blogs you linked looks like what I should have done, remove -spFeaturefromContentDb, but I didn't know about that command and couldn't find an article that mentioned this. But why should this command ever need be run if the regular uninstall did it's job properly? So I went into the features table and one by one find the orphaned features by their id and remove their row. This didn't even work completely at first, only some of the offending orphans were removed from the error list in Central Admin. So I went back to the database, and found the entries that I swore I removed and removed them. Since a feature can be associated with many site ids, I had to find each instance of that feature for each of the site ids it belongs to, so there was more than one instance of the feature that had to be removed. So I probably manually did what remove -spFeatureFromContentDB does.

Anyway, it finally solved the problem manually, or at least according to the health analyzer it did, and everything seems to be working fine, but this is rather disgraceful that a problem has to be solved this way. If the install can add the entry to the content database and set up all the housekeeping correctly, then the uninstall should be able to completely undo everything the install does. Obviously, it does not clean up after itself, and leaves little messes behind.
 [eBook] Windows Nano Server

Download this FREE eBook and learn all you need to get started with Windows Nano Server, including deployment options, remote management
and troubleshooting tips and tricks


Author Closing Comment

ID: 38846667
I think remove -spFeatureFromContentDB mentioned in your link would have been the proper solution and would have done what I manually did, but it "appears" as though I did the manual removal operation correctly according to the health analyzer. But as you mentioned, this shouldn't be a recommended way to do this. It stil;l seems stupid that an install can add things to the content db, but doesn't remove them from the content db upon uninstall. Theoretically, remove -spFeatureFromContrentDb should never even need to be invoked, if the uninstalls worked properly.
LVL 51

Expert Comment

by:Ted Bouskill
ID: 38846930
I completely agree that there are some flaws with the install/uninstall process with features (and other items) in SharePoint and have been for years.  However, if you use the right search terms in search engines I guarantee someone else has run into it and find a solution.

I find those links in seconds using Google.  Sometimes it's a matter of using the right search terms and even trying another engine like Bing.  Bing seems to do better searching for Microsoft issues which is not a surprise.

Author Comment

ID: 38848469
Of course I searched a lot. The problem is that the only two answers I could find was the auto repair, which didn't work, and databaserepair which did not work as well. None of the articles I saw mentioned remove -spFeatureFromContentDatabase and they instead all said databaserepair. In fact, one article, from a Microsoft MVP even said that when all else fails, (and apparently all else can fail, maybe even often), go into the features table and manually remove the offending items. That's where I got the idea from, and apparently it did indeed work, although that's a really bad idea because I have no idea what sort of dependencies the record could have had. So I'm guessing that remove -spFeatureFromContentDb merely does exactly what I did and fortunately, nothing more. Luckily, it seems as though in the case of features, since it also has a site id column, then it would seem that any entries in the sites table have no dependencies to entries on the feature table and that it is the feature table entry that does the attaching to the site id, so feature records can be deleted without effecting site records. If something was wrong, I think I would start to see problems or at least strange ambiguities start to pop up, but now the site is actually, finally working perfectly. Even before the errors popped in the the health analyzer, I was having strange behavior such as successfully installing a feature that deploys a file, and then it successfully activates, but the file never shows up. Same problem with a content type I created, everything went fine but it would never show up in the content type list. Now they all do upon deactivation and activation. Weird stuff. I'm just a beginner teaching myself, so to have to run into very advanced problems like this from the beginning is very tough.
LVL 51

Expert Comment

by:Ted Bouskill
ID: 38848846
I hear you loud and clear.  Overall I've found lots of configuration issues with SharePoint that are the biggest pain point when administrating the farm.  For example, getting the Profile Service running is finicky because if you don't do it just right and have one misstep it fails.

Featured Post

On Demand Webinar: Networking for the Cloud Era

Did you know SD-WANs can improve network connectivity? Check out this webinar to learn how an SD-WAN simplified, one-click tool can help you migrate and manage data in the cloud.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

In this article I will describe the Backup & Restore method as one possible migration process and I will add the extra tasks needed for an upgrade when and where is applied so it will cover all.
When using a search centre, I'm going to show you how to configure Sharepoint's search to only return results from the current site collection. Very useful when using Office 365 with multiple site collections.
This tutorial will teach you the special effect of super speed similar to the fictional character Wally West aka "The Flash" After Shake : http://www.videocopilot.net/presets/after_shake/ All lightning effects with instructions : http://www.mediaf…
Want to learn how to record your desktop screen without having to use an outside camera. Click on this video and learn how to use the cool google extension called "Screencastify"! Step 1: Open a new google tab Step 2: Go to the left hand upper corn…

649 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question