Hello @Oleg Tserkovnyuk ,
According to the error message you gave, it can be concluded that some features are missing in Content database (SP2019_site1).
It is recommended that you use the SharePoint Feature Administration and Clean Up Tool, which basically allows us to remove any references to features that are not installed in the web site from the server farm, web application, site collection, and subsites.
You can refer to this post, it may help you to solve problem.
Thanks,
Echo Du
=========================
Updated Answer =======================
Hi @Oleg Tserkovnyuk ,
1.Try to run Test-SPContentDatabase as the following
$wa = Get-SPWebApplication https://sharepoint.contoso.com"
$outputPath = "C:\\tools\files\Output\Test_Wss_Content_MissingAssembly_{0}.txt" -f (Get-Date -Format hhmmss
$dbName = "WSS_Content"
$slqServer = "SPSQL"
Test-SPContentDatabase -Name $dbName -WebApplication $wa -ServerInstance $slqServer -ShowLocation:$true -ExtendedCheck:$false | Out-File $outputPath Write-Host "Test results written to $outputPath"
2.Then open the file in the specified path, get the feature ID and Site ID in the location row and update the below script with theses entries.
3.Then run the below script to remove features by ID:
$featureID = "Feature ID"
$siteID = "Site ID"
#Display site information
$site = Get-SPSite $siteID
Write-Host "Checking Site:" $site.Url
#Remove the feature from all subsites
ForEach ($web in $Site.AllWebs)
{
If($web.Features[$featureID])
{
Write-Host "`nFound Feature $featureID in web:"$Web.Url"`nRemoving feature"
$web.Features.Remove($featureID, $true)
}
else
{
Write-Host "`nDid not find feature $featureID in web:" $Web.Url
}
}
#Remove the feature from the site collection
If ($Site.Features[$featureID])
{
Write-Host "`nFound feature $featureID in site:"$site.Url"`nRemoving Feature"
$site.Features.Remove($featureID, $true)
}
else
{
Write-Host "Did not find feature $featureID in site:" $site.Url
}
4.Finally, run the below script:
Remove-SPFeatureFromContentDB -ContentDB "Wss_Content" -FeatureId "xxxx-xxxxx-xxxxx-xxxx" –ReportOnly
If the above steps failed, so you would install the missing feature manually via Install-SPFeature
Thanks,
Echo Du
===================
If an Answer is helpful, please click "Accept Answer" and upvote it.
Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.