Sql-server – SQL Server 2012 Standard server with 50 instances won’t uninstall instances

sql serversql-server-2012

I suspect this is an issue because we hit the 50 instance max limit of SQL Server. At the limit it won't install more instances, naturally. However, it seems it won't UNinstall them either. That's worse.

It hangs at the "Select Features" dialogue when you hit next after selecting the SQL Engine for the instance.

I didn't find a lot of info about this. The most interesting hit was this:
http://social.msdn.microsoft.com/Forums/sqlserver/en-US/24a1e5f3-25f3-48c8-973a-4c6a18578e42/trying-to-uninstall-1-of-50-sql-server-2008-r2-express-hangs-on-please-wait

It also suggest using setup.exe with some parameters to uninstall the instance, but I can't get it to do so without starting the GUI and into the normal uninstall which fails.

Elevation does nothing. Reboot doesn't help. Logs only say "canceled by user", because I have to kill it in the end. Nothing obvious prior to that point. Validations are all green.

The setup says it is SQL Server 2012 SP1 – all instances are at 11.0.2100.


I' choosing to to answer/close my own question since Microsoft has closed the ticket with the status of "Won't fix."

Hopefully they will have fixed this for SQL Server 2014, but I have not and do not plan to test that myself, nor do they provide any additional comment on closing the ticket.

Best Answer

It will likely be because the setup GUI is trying to enumerate all the instances installed and failing miserably, running the uninstall from the command line should do it

Running the below command with admin privileges will uninstall the SQL server instance with no setup GUI displayed:

Setup.exe /Action=Uninstall /FEATURES=SQL /INSTANCENAME=MSSQLSERVER /Q

I assume that you only have the SQL Server feature installed, if you have others you want to remove, you can just add them in a comma separated list of values, such as /FEATURES=SQL,RS,Tools

For different instances, just replace MSSQLSERVER with the name of the instance you want to remove.

Command line reference for setup.exe is available here:

Install SQL Server 2012 from the Command Prompt