I have a file that is getting caught by the health analyzer ReportViewer.dwp as a missing setup file referenced [1] times in the database. I've tracked the file down to the web part gallery and removed the file. The entry is still in the DB and the health analyzer is still throwing this error. When I get the file by [GUID] and attempt to delete it I get the error

Exception calling "Delete" with "0" argument(s): "Unable to find the specified file."
At line:1 char:1
+ $file.Delete()
+ ~~~~~~~~~~~~~~
+ CategoryInfo : NotSpecified: (:) [], MethodInvocationException
+ FullyQualifiedErrorId : FileNotFoundException

If I look at the file, the values it returns are

Exists                  : False
UniqueId                : 40a56c20-3e6f-4f8b-9f4a-ab17abf04577
IsConvertedFile         : False
GeneratingConverterId   : 00000000-0000-0000-0000-000000000000
IsIRMed                 : False
IsSharedAccessRequested : False

When I do a $db.repair($false) it returns <OrphanedObjects Count="0" />

  • Did you just delete the webpart? Be sure to remove it from your recycle bin and then the site collection recycle bin, until then, it still exists in the database. – Christoffer Oct 30 '14 at 14:35
  • Oh my gosh, I thought I had deleted it from the recycle bin. It removed it from the 'End User Recycle Bin items' and went to 'Deleted from end user Recycle Bin'. Once I removed it from there the error went away. Thank you all. Such a relief. Going to mark Waqas since it's the only answer and it turned out to be an oversight on my part, but I was able to resolve my other errors with that method. – MickB Oct 30 '14 at 16:58
  • Yeah, it can be pretty tricky sometimes. Glad that you got it sorted out. :) – Christoffer Oct 30 '14 at 17:05
  • The ONLY way to directly edit the content DB and still remain supported by Microsoft is if you're on the phone with 3rd-level MS support and he tells you to do it as part of the solution. – Omegacron Oct 30 '14 at 17:22

Use SharePoint Manager 2010 from CodePlex and you can browse through your sites and track down where it has reference. Directly deleting data from DB will put you in unsupported.

|improve this answer|||||
  • I have tried both those methods and was unable to find the file in SharePoint Manager because I already removed it, and using the methods from get-spscripts.com/2011/06/… I still receive the error in health analyzer – MickB Oct 30 '14 at 13:46
  • if possible, detach the content database from Web Application and wait for a min and then re attach it using powershell. – Waqas Sarwar MVP Oct 30 '14 at 13:52
  • No luck. I do have another error for MissingAssembly 'Microsoft.ReportingServices.SharePoint.UI.ServerPages' That I found 22 references in the DB for. I'm wondering if they are related. – MickB Oct 30 '14 at 14:10
  • You are seeing 22 references because you have had the webpart in a site or multiple site with version history. Remove the site or remove the versions of the site which would mean that there are 22 instances referring to the webpart. ( and remove them from recycle bin and the site collection recycle bin. ) – Christoffer Oct 30 '14 at 14:36

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.