After upgrade or operations on SharePoint Databases or Contents Databases, you can get problems reported by SharePoint Analyzer. The Analyzer can report integrity problem between installation files and data in SQL databases.
For example, you uninstall a SharePoint farm solution and an problem cause the data in content databases are not deleted but the farm solution is uninstall. It's causing integrity problem but you SharePoint farm work. This guide give some methods to resolve
these integrity problems.
note: Please backup your contents databases before all operations!
select
* from
AllDocs where
SetupPath like
'%-File link here-%'
delete
from
AllDocs where
id = '-File Id Here-'delete
from
AllDocs where
select
*
from
features
join
webs on
(features.webid = webs.id)
where
featureid = '-Feature Id here-'
delete
from
AllDocs where
id = '-Feature Id Here-'SELECT
*from
EventReceivers eventjoin
webs on
(event.webid = webs.id) join
sites site on
(site.id = event.siteid) where
Assembly = ‘-Assembly link-'delete
from
AllDocs where
id = '-Assembly Id Here-'select
* from
webs where
webtemplate = 'Template id here'
delete
from
AllDocs where
id = '-Template Id Here-'select
*from
AllWebParts webpartjoin
alldocs doc on
(webpart.tp_PageUrlID = doc.ID)join
sites site on
(site.id = webpart.tp_siteid)where
tp_WebPartTypeId = ‘webpart id’delete
from
AllDocs where
id = '-webpart Id Here-'