Last Friday, I upgraded our 2010 SharePoint Farm to 2013. I had done it in development many times and wrote down all steps and caveats for a smooth upgrade. Once the time hit (6pm on a Friday), I began the upgrade process. Everything went smoothly except for our Forms Based Authentication site. When I ran the command to attach/upgrade: Mount-SPContentdatabase -Name
ERROR – a database with the same id already exists… but where was it? It wasn’t showing in the web application. Finally, I tried to delete the web application (both via central admin and also powershell) and again, errors.
An object in the SharePoint administrative framework, “SPWebApplication Name=WEBAPP”, could not be deleted because other objects depend on it. Update all of these dependants to point to null or different objects and retry this operation. The dependant objects are as follows:
Except there were no dependent objects listed. After researching my error, I found this technet posting and followed what Eric VanRoy suggested. I did not need to query the config database though and just found my GUID by using the GET-SPDatabase powershell command. Here’s what I did:
GET-SPdatabase (note down the db id – it may show as an empty name)
$db (this step verifies it’s the correct DB as the Name field should be NULL)
After the database was deleted, I deleted the Web Application and was able to create a new one, perform the attach and upgrade, and voila! It worked this time. I have no idea what caused the failure the first time around though.