If you are upgrading SharePoint 2007 to SharePoint 2010 and getting “MissingWebPart” error when using the Test-SPContentDatabase cmdlet in PowerShell, this tip will help you diagnose the issue.
Following is the original error:
UpgradeBlocking : False
Message: WebPart class [8c8bca43-cbc1-da50-d518-54614c79b3f5] is referenced  times in the database [WSS_Content], but is not installed on the current farm. Please install any feature/solution which contains this web part.
Remedy: One or more web parts are referenced in the database [WSS_Content], but are not installed on the current farm. Please install any feature or solution which contains these web parts.
As you can see, the error message gives you a WebPart GUID [8c8bca43-cbc1-da50-d518-54614c79b3f5] and the name of the content database [WSS_Content]. What we need to find out is on which page it is referenced in the database. For this we can run a SQL SELECT query on the “AllDocs” table in the content database exhibiting the problem. For example, you would run the following command to find details of the web part with the class ID “8c8bca43-cbc1-da50-d518-54614c79b3f5”:
select AllDocs.SiteId, WebId, Webs.Title as‘Web Title‘, ListId, DirName, LeafName from AllDocs innerjoin WebParts on AllDocs.Id = WebParts.tp_PageUrlID innerjoin Webs on AllDocs.WebId = Webs.Id where WebParts.tp_WebPartTypeID =‘8c8bca43-cbc1-da50-d518-54614c79b3f5’
It will list a very useful output, as shown in this example:
To remove the web part, type the page URL in the browserformat as “http://<SiteURL>/<DirName>/<Leafname>?contents=1”. In this example, type the following URL in the browser:
The screenshot below shows a web part maintenance page, you can delete the missing WebParts on the page.