Manual Uninstall of Microsoft SQL Server Enterprise 2008

  1. Uninstall the the installation from Programs and Features/Add Remove Programs, selecting Microsoft SQL Server 2008 and double clicking to run the uninstaller. (You always need to begin with this step or the command line equivalent.)  Do not use the Windows Installer Cleanup Tool to remove SQL Server 2008 without first trying to do so from Programs and Features/Add Remove Programs. During the uninstall, you can choose (via series of check boxes), which components of SQL Server 2008 to uninstall – including any shared components for when you have multiple instances.  In the case of multiple instances, each instance needs to be uninstalled independently.
  2. Run
    SC.EXE query | find /i “SERVICE_NAME: MSSQL”
    to verify that there are no services instances for SQL Server that should have been deleted but weren’t.  Any items that appear unexpectedly, should be removed with the command
    SC.EXE delete <service name>
    Where service name is the name of the service returned by sc.exe query.
    If SC.EXE fails to uninstall the services and there are no other instances of SQL Server installed, delete registry keys HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\MSSQLServer, HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\MSSQLSERVER and HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\SQLAgent
  3. Search for <Instance Name> in HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall.  If you find any, usually on a value called InstanceId, run
    MSIEXEC /X <GUID>
    where the <GUID> is the key name containing the InstanceId value.
  4. Delete the following registry keys/values if they exist
    • HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Microsoft SQL Server\<Feature>.<Instance Name>
    • HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Microsoft SQL Server\<Instance Name>
    • HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Microsoft SQL Server\Instance Names\SQL\<Instance Name>
  5. Delete %ProgramFiles%\Microsoft SQL Server\<Feature>.<Instance Name> if it exists.
  6. Finally, search for the <Feature>.<Instance Name> in the registry and consider deleting any remaining items. In some cases this involves deleting the value because the other values within the same key are for a different instance.  In other cases, the entire key will need to be deleted because there is no other instance data within the key.  Hopefully, you won’t encounter anything significant, but this is a good final step.

<Feature> has a value like MSSQL10 or MSAS10
<Instance Name>
is the name of the SQL Server instance you are trying to uninstall.


Permalink | Comments (0) | Post RSSRSS comment feed