Solved

Content database has feature orphans

Posted on 2013-02-01
7
2,147 Views
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??
0
Comment
Question by:BobHavertyComh
  • 4
  • 3
7 Comments
 
LVL 9

Author Comment

by:BobHavertyComh
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.
0
 
LVL 51

Accepted Solution

by:
Ted Bouskill earned 500 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:
http://blogs.msdn.com/b/paulking/archive/2011/10/05/removing-missingfeature-database-amp-missingwebpart-webpart-class-errors-from-sharepoint-2010.aspx

Or this:
http://www.sharepointjoel.com/Lists/Posts/Post.aspx?List=0cd1a63d%2D183c%2D4fc2%2D8320%2Dba5369008acb&ID=371

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

Author Comment

by:BobHavertyComh
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.
0
PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

 
LVL 9

Author Closing Comment

by:BobHavertyComh
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.
0
 
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.
0
 
LVL 9

Author Comment

by:BobHavertyComh
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.
0
 
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.
0

Featured Post

PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

Question has a verified solution.

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

Suggested Solutions

Note:  There are two main ways to deploy InfoPath forms:  Server-side and directly through the SharePoint site.  Deploying a server-side InfoPath form means the form is approved by the Administrator, thus allowing greater functionality in the form. …
We had a requirement to extract data from a SharePoint 2010 Customer List into a CSV file and then place the CSV file into a directory on the network so that the file could be consumed by an AS400 system. I will share in Part 1 how to Extract the Da…
Two types of users will appreciate AOMEI Backupper Pro: 1 - Those with PCIe drives (and haven't found cloning software that works on them). 2 - Those who want a fast clone of their boot drive (no re-boots needed) and it can clone your drive wh…
Nobody understands Phishing better than an anti-spam company. That’s why we are providing Phishing Awareness Training to our customers. According to a report by Verizon, only 3% of targeted users report malicious emails to management. With compan…

809 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