Scenario:

The farm is a fresh SharePoint 2010 SP1 server farm. I got a database for a Site Collection that we use for Demo’s. I presume the content database has its origins from SharePoint 2010 as well. Anyways, the search page had issues for some reason and I needed to delete it and recreate a search centre within the Site. Unfortunately I was not able to delete the search site from within this Site with the following error being thrown

Since the farm was on SP1 the content Database which I presumed during the attach method should have upgraded itself, for some reason didn’t. I used the following two commands as shown below

1
Get-SPContentDatabase

This gave me the ID for the database that I was looking for. This command is then followed by the usage of

1
Upgrade-SPContentDatabase -Identity YourDatabaseIDGoesHere

Press Y to continue and once completed , you should be able to delete your site now J