[Company Logo Image] 

Home Up Contents Coffee Break Credits Glossary Links Search

 
How to manually uninstall Microsoft SQL Server 2005

 

 

Home
Analysis Services
Azure
CLR Integration
High Availability
Open Source
Security
SQL Server 2008
SQL Server 2012
SQL Server 2014
SQL Server 2016
SQL Server 2017
SQL Server 2019
Tips
Troubleshooting
Tuning

How to manually uninstall Microsoft SQL Server 2005.


Applies to: SQL Server 2005 only.

Date created: September 24, 2023.

 

Note: the steps provided in the web resource apply only to SQL Server 2005. To manually uninstall SQL Server 2008 or later versions of SQL Server up to SQL Server 2022, please visit instead this page.

If you have been trying unsuccessfully to uninstall a failed installation of SQL Server Management Studio (SSMS), please proceed to manually uninstall SQL Server using the following procedure:

 

  1. Go to Add/Remove Programs in Control Panel  and look for "Microsoft SQL Server Setup Support Files". If it is there, continue. If it is not there, find your original media and install it by double clicking on Servers\setup\sqlsupport.msi.

     
  2. Run "%ProgramFiles%\Microsoft SQL Server\90\Setup Bootstrap\ARPWrapper.exe" /Remove on the Command Prompt.

    Keep uninstalling things inuntil everything is gone. (This is the same tool that gets run from the Add/Remove Control panel, but users may have already deleted the reference to it) If you get an immediate error saying "Registry Enumeration Failed", then you don't have anything to uninstall here. Continue on to step 3 to uninstall redists and SQL Support Files.

    You will need to uninstall just one item at a time. If you have an instance with more than one server (SQL, AS or RS), setup will fail with the error “The setup has encountered an unexpected error in datastore. The action is RestoreSetupParams”. This is expected at this point due to some refcounting issues. You will just need to keep reinstalling SQL Support Files again for each server in the instance and after every successful uninstall in step 2.

    To work around the refcounting issue without having to keep reinstalling, we can temporarily refcount SqlSupport.msi to itself. Look at step 3 and search for “Microsoft SQL Support Files” after you have installed it. Make a note of the GUID. Then go back to regedit and create/modify the following key:

    KeyName: HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Microsoft SQL Server\90\Bootstrap\MSIRefCount
    Value: Uninstall
    Type: REG_SZ
    Data: {11111111-1111-1111-1111-111111111111},{GUID}

    where {GUID} is the GUID of SQLSupport Files
    e.g. for English x86 SQL Support Files:
    Data: {11111111-1111-1111-1111-111111111111},{53F5C3EE-05ED-4830-994B-50B2F0D50FCE}

     
  3. If you encounter problems with uninstalling in step 2, try the following:

    3.1.    Open RegEdit and go to HKLM\Software\Microsoft\Windows\CurrentVersion\Uninstall

    3.2.    Click on each of the GUIDs in the left pane. Look at the display name in the right hand pane. Look for anything that matches "Microsoft SQL Server 2005 *". Make a note of the GUID from the left pane.

    3.3.    For each of the GUIDs noted in 4b)

            3.3.1.    Run the following command from a command line (replace {GUID} with the GUID)
    start /wait msiexec /x {GUID} /l*v c:\sql_uninstall.log
    e.g. start /wait msiexec /x {90A40409-6000-11D3-8CFE-0150048383C9} /l*v c:\sql_uninstall.log

            3.3.2.    Open the file c:\sql_uninstall.log and look at the bottom of the file (about 15 lines from the bottom). Look for a line similar to
    MSI (s) (EC:F8) [12:52:18:007]: Product: Microsoft SQL Server 2005 Tools -- Removal completed successfully.

            3.3.3.    If the removal was not successful, make a note of the name and the GUID for later and save off the sql_uninstall.log file.

     
  4. If you succeeded in uninstalling all of the items in step 2 or 3, you can now remove the redists. Try to uninstall from the Add/Remove Programs Control panel in the following order:

    4.1.    “MSXML 6.0 Parser”, “SQLXML4”, “Microsoft SQL Server VSS Writer”, “Microsoft SQL Server 2005 Backwards Compatibility”, and anything else that claims it is Microsoft SQL Server 2005 *except* for "Microsoft SQL Server Native Client" and "Microsoft SQL Server Setup Support Files" If any of these fails because of missing pre-requisites, do the following:

            4.1.1. Open RegEdit and go to HKLM\Software\Microsoft\Windows\CurrentVersion\Uninstall

            4.1.2. Click on each of the GUIDs in the left pane. Look at the display name in the right hand pane. Look for anything that matches the name of the redist. Make a note of the GUID from the left pane.

            4.1.3. run the following command from a command line (replace {GUID} with the GUID)
    start /wait msiexec /x {GUID} SKIPREDISTPREREQS=1 /l*v c:\sqlredist_uninstall.log
    e.g. start /wait msiexec /x {90A40409-6000-11D3-8CFE-0150048383C9} SKIPREDISTPREREQS=1 /l*v c:\sqlredist_uninstall.log

                    4.1.3.1     Open the file c:\sqlredist_uninstall.log and look at the bottom of the file. Look for a line similar to
    MSI (s) (EC:F8) [12:52:18:007]: Product: Microsoft SQL Server 2005 Backward compatibility -- Removal completed successfully.

                    4.1.3.2     If the removal was not successful, make a note of the name and the GUID for later and save off the sqlredist_uninstall.log file.

    4.2.    (only if all other steps were successful) Uninstall Microsoft SQL Server Native Client using Control Panel Add/Remove Programs applet.
    4.3.    (only if all other steps were successful) Microsoft SQL Server Setup Support Files using Control Panel Add/Remove Programs applet.
     
  5. Restart your computer.

 

 

 

 

.Send mail to webmaster@sqlcoffee.com with questions or comments about this web site.