After my blog post (Deploying Search Service App by PowerShell – but what about the Search DBs?) a couple of days ago, I’ve got an interesting question: what to do with a Search Service App that cannot get removed but cannot be used either as there’re no DBs created for it.
The reason was pretty simple: some DB issue occurred while creating the Search Service Application, and it got to be inconsistent: the SSA seemed to get created on Central Administration, but it was weird as the SSA Proxy wasn’t displayed at all:
When checked the DBs, they were not created either.
All right, after the SQL issues have been fixed, let’s delete the SSA and create it again. But when tried to delete, here is an error you get, even if you don’t check the “Delete data associated with the Service Applications” option:
Yeah, the Search Service Application cannot get deleted if its DB does not exist. And PowerShell doesn’t help in this situation either as it gives you the very same error.
After several rounds of trials here is how I could solve this problem out: Create a SSA with a different name but with the *very same* DB name. (Use PowerShell for this, see my post earlier.)After this step, you’ll be able to delete your previous SSA, but don’t forget NOT to use the option “Delete data associated with the Service Applications” as you’ll need the DBs in order to be able to delete your second, temporary SSA 😉
Ps. Since this experience, I’ve been playing with this on my VM, using several use cases. Turned out the same issue might happen if there’s a SQL issue while deleting the Search SSA.