SQL Clone
SQLServerCentral is supported by Redgate
Log in  ::  Register  ::  Not logged in

Uninstall a SQL Server Cluster.....When all else fails....

OK, we've seen step-by-step lists and articles on how to INSTALL a SQL Server 2008 Cluster, but have you run into so many issues, you feel you want to just start from scratch?  Short of rebuilding the entire server, and getting the system engineers all riled up, here are the steps to manually and cleanly UNINSTALL a SQL Server 2008 clustered instance.

Warning, some of the steps below require modifying the registry.  Be sure to back up the registry, before such an undertaking.

If SQL Server Cluster Install ends up in errors and fails, consider doing a clean up of the cluster install and then re-start it.

Uninstalling a SQL Server Instance
To completely uninstall an instance of SQL Server 2008, each node needs to be removed as part of the SQL Server failover cluster. When SQL Server is removed from the last node of the cluster, the instance and all of the SQL Server resources that are associated with it will be removed from the cluster. Physical disk resources and user data are left intact.

Here is a step-by-step process which gives a clean un-install of a SQL Server Cluster environment.


Step-1 Execute sqlrem.bat

Execute sqlrem.bat with following parameters on each node:


sqlrem.bat <sql install path> <instance name>




Step-2 Remove Alias

Remove alias with clicnfg.exe on each node.


Step-3 Un-Install Microsoft Data Access Components

Un-install Microsoft Data Access Components from each node. This can be done using Add Remove Programs in Control panel.


Step-4 Erase Physical Directory Structure

Remove physical directory structure from each node

1. SQL Server Binary files \Program files\Microsoft SQL Server

2. Data files folder \MSSQL\MSSQL


Step-5 Remove Resources with Cluster Admin

Remove the following SQL Server resources registered with Cluster Administrator.

1. SQL IP Address

2. SQL Network Name

3. SQL Server

4. SQL Server Agent


Step-6 Registry Clean Up

Remove following registry keys if they are found:

Cluster Related:

1. HKEY_LOCAL_MACHINE\Cluster\ResourceTypes\SQL Server
2. HKEY_LOCAL_MACHINE\Cluster\ResourceTypes\SQL Server Agent


SQL Server Software Related:

1. HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Microsoft SQL Server


MSSQL Instance Related:

1. HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\ContentIndexCommon\LanguageResources\
2. HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Perflib\009
7. HKEY_LOCAL_MACHINE\SYSTEM\ControlSet001\Services\MSSQLServerADHelper


Step-7 Erase the Shortcuts

1. Remove the SQL Server shortcuts in Startup menu as well as desktop.
2. Remove the Service manager entry located in startup menu.
3. Remove the Programs\ Microsoft SQL Server folder


Step-8 Restart the Cluster

Restart the Cluster Nodes one by one.

Hope this helps!


Posted by Jason Brimhall on 26 July 2010

Thanks.  I am bookmarking this in the event I will need it.  We recently tried a few other routines but found nothing to be highly successful in a failed cluster install.

Posted by Steve Jones on 26 July 2010

Excellent. This gives you 2 (or more) independent SQL Servers, correct? Are they then just regular installs, or both single node clusters?

Posted by Robert Pearl on 26 July 2010

Thanks.  In this case, its intended to do a clean manual uninstall, to avoid a complete rebuild of the cluster.  Since we are removing the binaries here as well, and all the registry entries, they are neither regular stand-alone installs nor single-node clusters :-)

However, I do know what you're talking about, it is possible to remove a node from a cluster (ie: through the sql server setup: msdn.microsoft.com/.../ms191545.aspx), and in such a case, if you were to remove a node from a 2-node cluster, the remaining node would be a single node cluster (without a failover).  

I've actually built a single-node cluster as well, in preparation that it would eventually scale out and need the failover/HA capability.  I was able to add a second node down the line, without rebuilding the whole sql server from a stand-alone to a clustered node.

Hope that helps...

Posted by WayneS on 30 September 2010

Good information. I've just used it to clean up a failed uninstall of an instance from a cluster.

Posted by David Bird on 27 October 2010

I used the registry cleanup for the resource types that were left after a manual uninstall on SQL Server 2005.


Posted by Damian on 18 May 2011

where can i find this clicnfg.exe and  sqlrem.bat files?

Posted by DBASkippack on 13 June 2011

This worked perfectly for us.. thanks for the info!

Posted by Robert Pearl on 14 September 2011

I've seen the sqlrem.bat file available at this location.  But please verify the version:


Posted by atul-957304 on 27 September 2011

the problem i have is we have 2-node cluster that was running sql2005 named instances, one on each node.  these sql2005 named were upgraded to sql2008r2 following in-place procedures.  now i would like to remove sql2005 from each node but leave sql2008r2 running and unaffected on the same cluster.  it lets me remove sql2005 workstation components from each node but then moans about removing sql2005

anybody out there having had the same experience but were able to remove sql2005 successfully with sql2008r2 left intact and unaffected on the cluster after sql2005 removal? your kind help will be appreciated


Posted by Anil Kumar Danta on 1 July 2012

Hello Pearl,

You are a GEM too. After two days of long battle to cleanup the mess from two failed cluster instances, I was lucky after reading this article. But it was not smooth ride after the steps mentioned here. I have removed the 'SQL Server 2008' item in control panel, and then the two failed instances disappeared. And then another story started, the install program will just exit skipping everything without any error. I had to cleanup all the SQL programs and tools from Control Panel and then a happe ending.

Thanks a TON Sire !!

Posted by lsalih on 29 January 2014

Hello -

Can you please clarify where sqlrem.bat located? Do you execute the command in DOS command line?

Posted by Tim-153783 on 13 August 2015

For step 5 above, you can also use powershell Remove-ClusterResource passing in the resource you need deleted.


Leave a Comment

Please register or log in to leave a comment.