SQL install error – An instance with the same name is already installed on this computer.


March 2023 (0) Iptv 7/14/2024


  • Click on the Start menu, choose Run and type regedit
  •  Go to HKEY_LOCAL_MACHINE\Software\Microsoft\Microsoft SQL Server
  •  Remove SQLEXPRESS from the REG_MULTI_SZ value named InstalledInstances
  •  Delete the subhive named MSSQL.1
  •  Delete the subhive named SQLEXPRESS
  •  Go to HKEY_LOCAL_MACHINE\Software\Microsoft\Microsoft SQL Server\Instance Names\SQL
  •  Delete the value named SQLEXPRESS
  •  Go to c:\ drive
  •  Delete the folder %ProgramFiles%\Microsoft SQL Server\MSSQL.1
  •  Restart the PC.
  •  Use either WICU or Revo uninstaller to manually remove all traces of MSSQL on your PC.
  •  Re-run SQL installation

Steps to remove SQL Server

Important This section, method, or task contains steps that tell you how to modify the registry. However, serious problems might occur if you modify the registry incorrectly. Therefore, make sure that you follow these steps carefully. For added protection, back up the registry before you modify it. Then, you can restore the registry if a problem occurs. For more information about how to back up and restore the registry, click the following article number to view the article in the Microsoft Knowledge Base:

322756 How to back up and restore the registry in Windows

Depending on your specific environment, you can use one, or more, of the steps that follow.

After you successfully remove SQL Server, you do not have to continue with the remaining steps in this list.

  1. Locate the Data folder for your installation, and then rename it if you have to save the data. Otherwise, delete the Datafolder. Microsoft recommends that you keep the Data folder so that you have a flat file backup of the databases in an MDF and LDF format available. If you rename the Data folder, you can recover the existing data in the same state and condition it was in when you took the instance of SQL Server offline, provided the re-installation uses the same name, path, and IP address.
  2. For a virtual server, use the Microsoft SQL Server 2000 Setup program that is on the CD and click the Uninstall option. This is documented in the “How to uninstall an existing installation of SQL Server (Setup)” topic in SQL Server Books Online.
  3. For a non-clustered (stand-alone) instance, you can either follow step 1, or, in Control Panel open the Add/Remove Programs applet.
  4. In Control Panel, open the Add/Remove Programs applet.
  5. Run Regedt32, and then locate this registry key:
    HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall

    Under the Uninstall key, locate the product code for the instance of Microsoft SQL Server 2000 that you are trying to remove.

    On the Taskbar, click Start, and then click Run. In the Run dialog box, copy and paste, or type, this command:

    C:\WINNT\IsUninst.exe -f”C:\Program Files\Microsoft SQL Server\MSSQL$Server1\Uninst.is” -c”C:\Program Files\Microsoft SQL Server\MSSQL$Server1\sqlsun.dll” -Mssql.miff i=I1 

    If these steps do not work, you can follow the steps in the Remove All Known Instances of SQL Server section to remove Microsoft SQL Server 2000 manually.

    Note It is not the intent to remove 100 percent of SQL Server 2000 at this time. These steps are intended to get the system to a state where you can perform a successful installation, so that you can then remove the Microsoft SQL Server 2000 installation that is being recovered.

Note If this is a clustered instance of SQL Server 2000, repeat these steps for each node in the cluster.

Remove a specific instance of SQL Server

To remove a specific instance of SQL Server, follow these steps:

  1. Locate, and then delete the %drive%:\Program Files\Microsoft SQL Server\MSSQL\Binn folder where %drive% is the location of the instance of SQL Server you want to remove.
  2. Locate, the following registry key:
    • HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\MSSQLServer

      Note If you are deleting a default instance, you must delete all the keys EXCEPT the Client key.

    • HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Microsoft SQL Server

      You must use Regedt32.exe to edit the InstalledInstances value of the instance you are removing. A default instance is listed as MSSQLSERVER, and named instances appear as the name given to the instance.

      Note You cannot use Regedit.exe to edit the value; you must use Regedt32.exe instead.

Note If this is a clustered instance of SQL Server 2000, repeat these steps for each node in the cluster.

Remove all known instances of SQL Server

To remove all known instances of SQL Server, follow these steps:

  1. Locate, and then delete the %drive%:\Program Files\Microsoft SQL Server\MSSQL\Binn folder.
  2. Locate, and then delete these registry keys:
    • HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\MSSQLServer
    • HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Microsoft SQL Server
  3. Locate, and then delete these registry keys:
    • HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\MSSQLServer
    • HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\SQLSERVERAGENT
    • HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\MSSQLServerADHelper
  4. The three registry keys in step 3 correspond to the default instance of Microsoft SQL Server 2000. Named instances appear similar to those listed in step 3, along with $instance_name, because instance_name is the name given to your particular instance. After you locate the correct keys for the instance you are removing, select those keys, and then delete them.
    • HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\MSSQLServer

      $InstanceName

    • HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\SQLSERVERAGENT

      $InstanceName

    • HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\MSSQLServerADHelper
  5. If the instance of SQL Server you are removing was clustered, remove any cluster resources for the instance that may remain in the Cluster Administrator.

    Note Only remove SQL Server resources.

  6. Reinstall Microsoft SQL Server 2000 and use the same name, and IP address.
  7. Run the Setup for the installation, and use the Uninstall option to clean up any configuration problems or errors that may still exist because of the failed installation.

Note If this is a clustered instance of SQL Server 2000, repeat these steps for each node in the cluster.

Remove a default instance of SQL Server

To remove a default instance of SQL Server locate, and then delete these registry keys:

  • HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Search
  • HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\MSSQLServer
  • HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\SQLSERVERAGENT

Remove a named instance of SQL Server

To remove a named instance of SQL Server, follow these steps:

  1. Locate, and then delete these registry keys for a Named Instance, where InstanceName is the name of the instance that you are removing.
    • HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\MSSQLServer

      $InstanceName

    • HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\SQLSERVERAGENT

      $InstanceName

  2. If the instance of SQL Server you are removing was clustered, remove any cluster resources for this instance of SQL Server that may remain in the Cluster Administrator.

    Note Only remove SQL Server resources.

  3. Reinstall Microsoft SQL Server 2000 and use the same name, and IP address.
  4. Run the Setup for the installation, and then use the Uninstall option to clean up any configuration problems or errors that may still exist because of the failed installation.

SQL Server – Upgrade fails – “The Instance ID ‘MSSQLSERVER’ is already in use by SQL Server instance ‘MSSQLSERVER.INACTIVE’.”


This is one of the very frequent errors we receive when we try to upgrade to 2008 or 2008 R2 or to that matter even to 2005. The upgrade may fail for any reason initially and later when you fix that issue and retry to upgrade it keeps on crashing by showing the below error message.

The Instance ID ‘MSSQLSERVER’ is already in use by SQL Server instance ‘MSSQLSERVER.INACTIVE’.

To continue, specify a unique Instance ID.

In the registry you will see the below key.

HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Microsoft SQL Server\Instance Names\SQL\Inactive

Most of the time you try to rename this key and the some other keys in registry and try the install. It may sometimes help but fail sometimes. The reason being the components of 2008/2008R2 to which you are upgrading to may not have completely installed correctly. They may be in an inconsistent state which will not allow your upgrade to complete.

So the best solution here is to completely uninstall the database engine components of the 2008/2008R2 and start the fresh upgrade. Here is the actual challenge. If you try to uninstall this from add and remove programs it does not show the inactive instance to be uninstalled. So how to proceed?

   

However userfriendly the GUI is cmd prompt comes handy in these kind of situations. Run the below command to uninstall the inactive instance by using the setupDOTexe of 2008/2008R2 or which ever you are trying to upgrade to (Make sure you are using the right setup file and the right instance name. You may end up uninstalling a working instance if you choose the wrong parameters).

setup /action=uninstall /instanceid=MSSQLSERVER /features=SQLEngine,Replication,FullText

After the uninstall completes successfully you can go ahead with the upgrade again to complete successfully.


Yorum yapabilmek için giriş yapınız

Giriş Yap

Sitede Ara

En Çok Okunanlar

Android Cihazlara POP3 E-Posta Hesabı Kurulumu (1767)
Windows simgelerinde beyaz ikon sorunu ve çözümü (1338)
SQL REPLACE() Kullanımı (897)
Yerel Ağ Bağlantısına girmek istediğimde ''Bağlantı özelliklerine erişmek için yeterli yetkiniz yok.Yöneticinize başvurun'' uyarısı.. (491)
Access violation at address 0518fde4 inmodule NETINFO.dll Read of adress 00000000 (416)
CMD komutları ile Windows Aktivasyonu (375)
PatchCleaner v1.4.2.0 indir Windows Installer Temizleme Programı (361)
MailEnable Webmail Unknown or Disabled User Hatası (352)
Bedava Netflix Hesapları 2022 (Ücretsiz Premium Hesaplar) (348)
Server communication failure. Please refresh your browser and try again. (339)
There is already an object named in the database Cozum (326)
Turbobit Premium Hesaplar Bedava Güncel Üyelikler 2022 (323)
Turbobit Premium Hesaplar Güncel Liste 2022 (319)
Windows 10 Gereksiz Servislerin Kapatılması - Resimli Anlatım (299)
Yazıcı hata kodu 0x0000011b sorun ve cozumu (291)
Windows Bileşen Deposu (WinSxS) Klasörünü Temizleme (278)
Adobe After Effects CC 2019 Full İndir – v16.1.1.4 (237)
Linq ile inner Join Kullanımı (235)
ASP.NET MVC Email Doğrulama Sayfası (Verification) (234)
Dinozor Nesline Son Veren Silen Asteroit Felaketi, Nasıl Gerçekleşti? (222)
3 Adımda Server olay loglarının silinmesi (206)
Windows 10 durdurulabilecek hizmetler (187)
Bedava Turbobit Premium Hesap 2022 (%100 Güncel Hesaplar) (176)
Visual Studio 2017 Dil Ekleme/Değiştirme (175)
Fenerbahçe Beko, 2019 Final Four 'da! MAC OZETI (156)

Son Yorumlar