Remove Obsolete Database References from SharePoint 2010
The problem
In my central Admin, I got the following error message:
After trying serveral time with the psconfig command to upgradethe wohle databases, it already show me the error again.
Then I identified the problem. Because in the database exists more as one CrawlStoreDb (ans propertyDB), but the search service uses only one of them. But that was not the databse shown in the Error message. So I assumed that the Database is obsolete.
I prooved it againg and checked the database size:
The size reflects to me that this will be not used by the sharepoint, because the other database is much bigger. I did a second test with hte health analzier after a renaming of the database on database level. After a while the same error show up but in the Database status I get the following error
The Search works like a charm and throwing no errors. So I can delete the obsolete databases.
First of all I mus get the Database ID from the contentdatabase registration:
Get-SPDatabase | where {$_.Type -notcontains "Content Database" -and $_.Type -notcontains "Configuration Database"} | sort Type | select Name ,Id
After that I can use the Id to delete the Contentdatabase with the Guid from the SPDatabase
$db= Get-SPDatabase -Identity {Guid} $db.Delete()
This will remove only the Database References but willnot delete the database on the server. You mus delete it manually.













