Monday, 13 March 2006

How to uninstall SQL Server 2005 instances successfully

With the passing of days, the number of people asking me how to uninstall SQL Server 2005 instances successfully is on increase. I would like to say that it is a simple question but quite difficult to answer as there are many related components installed which need to be uninstalled by following a correct order, otherwise, we are going to fail. Today's post is going to explain my own technique to do it with ease and success.

Here is the correct procedure to uninstall a SQL Server 2005 instance:

1. Firstly, we do have to find the right directory where 'ARPWrapper' tool is installed (usually it is inside of either 'C:\Program Files' or 'C:\Program Files (x86)' folders). After doing that, we can start the tool by executing one of the two following commands via CMD with '/remove' parameter included.

"C:\Program Files\Microsoft SQL Server\90\Setup Bootstrap\ARPWrapper.exe" /Remove

"C:\Program Files (x86) \Microsoft SQL Server\90\Setup Bootstrap\ARPWrapper.exe" /Remove

Having done that, 'ARPWrapper.exe' will start and we will be able to choose the SQL Services we want to uninstall. The wizard shows two parts: the first one lists the server components and the second one the common components. Because we only want to uninstall all server components (Database Engine, Analysis Services, SSIS, and etc.), we will select the first one and then click on 'Next' and 'Finish'.

Naturally, if we wanted to uninstall the common components at the same time, we will have to check all of them in the same window:

Only after successfully completing the process will we be able to move on the next steps. (If we had Reporting Services installed, we would have to make sure that its virtual directories were deleted as well, otherwise, we do have to delete manually the directories ReportServer[$SQLInstanceName] and Reports[$SQLInstanceName] by using IIS Services Manager)

2. We are ready to move on. Going to 'Add or Remove Programs', we will uninstall some components following strictly this order: 
  • MSXML 4.0 Parser
  • Microsoft SQL Server VSS Writer
  • Microsoft SQL Server 2005 Backward Compatibility Components
  • All components related to SQL Server 2005, except Microsoft SQL Server Native Client y Microsoft SQL Server Setup Support Files components
(It is time to move on the next step if this was the only SQL Instance that we wanted to remove, otherwise, we need to come back to the first step and do the same for each SQL Instance until removing all.)

3. Remove 'Microsoft SQL Server Native Client' component by using  'Add or Remove Programs'.
4. Remove 'Microsoft SQL Server Setup Support Files' component by using ''Add or Remove Programs'.
5. Finally, we have to restart the server.

To sum up, not only do we have SQL Server 2005 uninstalled successfully, but also very cleanly by following some simple and practical steps. Now this task is not going to be a pain in the neck any longer. 

I hope you find this post very useful and make the most out of it. That is all for now, let me know any remarks you may have uninstalling SQL Server 2005. Thanks for reading. Stay tuned.