Missing server side dependencies issue within Health Analyzer in SharePoint Server 2013

After I performed a database attach migration from SharePoint server 2013 farm to another that has been completed successfully. but when I checked the health analyzer within central administration I got the following error:

Missing server side dependenciesCause:

The migrated SharePoint content database contains some references to

  • Custom feature files [MissingFeature].
  • Custom setup files [MissingSetupFile].
  • Custom web part files [MissingWebPart].

that missed and not installed in the current farm.

Solution:

*Regarding [MissingFeature] error.

Missing server side dependencies Missing feature details

By dint of SharePoint Feature Administration and Clean Up Tool, you can easily remove all features reference that was not installed in the current farm by following the mentioned steps below:

feature cleean up tool home page

  • The following message box informs that the feature with the same id has been found and should be removed from the farm.

remove missing feature

  • Click Yes, till remove all faulty featuresin the farm.
  • In case of removing all faulty features in the farm, you should get this message

no faulty was found in the farm

  • Go back to health analyzer > click on Missing server side dependencies > from the ribbon click on Reanalyze now.

reanalyze now halth analyzer

  • Wait for moment then refresh the page, the [MissingFeature] error should be now disappeared.

**Regarding [MissingSetupFile] error.

MissingSetupFile health analyzer error

  • Open SQL Server Management Studio.
  • By using the content database run this query.
USE [your content database]
SELECT id,SiteId,WebId FROM AllDocs
WHERE SetupPath LIKE '%solution name%'
  • In my case, the query looks as the following.
USE [WSS_Content_PWA]
SELECT id,SiteId,WebId FROM AllDocs
WHERE SetupPath LIKE '%ProjectCard%'

MissingSetupFile query 1

  • Run SharePoint Management shell as administrator.

Run SharePoint Management Shell as Administrator

  • Use (ID, SiteID,WebID) from previous query to run the following cmdlet one by one.
$site = Get-SPSite -Limit all | where { $_.Id -eq "Your Site ID" }
$web = $site | Get-SPWeb -Limit all | where { $_.Id -eq "Your Web ID" }
$file = $web.GetFile([Guid]"Your File ID")
$file.Delete()
  • In my case, the cmdlet looks as the following.

MissingSetupFile delete powershell 1

  • Repeat the previous steps for all missing setup files that mentioned in the explanation section in health analyzer error.

MissingSetupFile delete powershell 2

  • Again Go back to health analyzer > click on Missing server side dependencies > from the ribbon click on Reanalyze now.
  • The [MissingSetupFile] error should be now disappeared.

Regarding [MissingWebPart] error.

Missing web part health analyzer error 1

  • Open SQL Server Management Studio.
  • By using the content database run this query.
SELECT AllWebParts.tp_WebPartTypeID,AllDocs.DirName,
AllDocs.LeafName from AllDocs inner join AllWebParts
on AllDocs.Id = AllWebParts.tp_PageUrlID
where AllWebParts.tp_WebPartTypeID = 'web part id in explanation section'
  • In my case, the query looks as the following:
SELECT AllWebParts.tp_WebPartTypeID,AllDocs.DirName,
AllDocs.LeafName from AllDocs inner join AllWebParts
on AllDocs.Id = AllWebParts.tp_PageUrlID
where AllWebParts.tp_WebPartTypeID = '23cd87b1-f818-3f08-ae28-528d4782e335'

Missing web part health analyzer error sql query 2

  • Open the browser and type.
http://your application name/DirName/LeafName?contents=1
  • It should be look like as
http://webapplication/pages/default.aspx?contents=1
  • The previous URL will open the web part maintenance page to allow removing the missing web part that hasn’t been installed.

Web Part Page Maintenance

  • You should find the web part name that mentioned in the explanation section in health analyzer error.
  • Select it > click on delete.
  • Check out the page then Check back in to avoid the duplicate entry in the database.

Note: you can run Test-SPContentDatabase cmdlet to show the missing web parts , In case of  missing web parts was not found, then it means there are a mismatch in packages between the source and destination farm and this require to deploy the solution that contain the web part to the destination farm.

Enjoy 🙂

Advertisements

2 thoughts on “Missing server side dependencies issue within Health Analyzer in SharePoint Server 2013

  1. For [MissingWebPart] error: You can also try deleting all the versions for the page, then deleting them from the Second-Stage Recycle Bin. Re-run the SQL statements all it should be clean now

    Like

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s