Welcome to MSDN Blogs Sign in | Join | Help

How to clean up a SQL 2005 instance name left behind by beta uninstall

I have heard from a few customers who have tried to uninstall beta versions of SQL 2005 and then install the final release and have run into errors with both the beta uninstall and the final release install.  I have already described the most common uninstall error and a suggested workaround in this previous blog post (an error reading property "Installids" from the cache and/or an error writing property "flagCommit" to the cache).

I wanted to address one of the most common final release install errors I have seen - a duplicate instance name error that causes SQL setup to fail and rollback.  It is pretty easy to tell if you are running into this error if you launch SQL setup directly and step through the SQL setup UI.  However, if you are installing SQL Express as a part of Visual Studio 2005, setup runs in silent mode and you will only see a generic error bubbled up from Visual Studio setup indicating that SQL Express failed to install.

VS 2005 configures SQL Express with an instance name of SQLEXPRESS when it runs SQL setup in silent mode.  It also used this same instance name in the betas, so if something goes wrong with uninstall, you may end up with an orphaned instance name on your system, and then installing the final release will fail.  In this case, the verbose setup log file for SQL Express will show an error that looks like the following:

MSI (s) (AC!38) [00:01:41:056]: Product: Microsoft SQL Server 2005 Express Edition -- Error 28086. An instance with the same name is already installed on this computer. To proceed with SQL Server Setup, provide a unique instance name.

Error 28086. An instance with the same name is already installed on this computer. To proceed with SQL Server Setup, provide a unique instance name.

If you are running into an error installing SQL Express as a part of Visual Studio 2005 setup, you can check in the SQL Express log files (located at %ProgramFiles%\Microsoft SQL Server\90\Setup Bootstrap\LOG).  If you are receiving an error about the instance name not being unique, you can manually clean off the orphaned instance name by doing the following:

  1. Click on the Start menu, choose Run and type regedit
  2. Go to HKEY_LOCAL_MACHINE\Software\Microsoft\Microsoft SQL Server
  3. Remove SQLEXPRESS from the REG_MULTI_SZ value named InstalledInstances
  4. Delete the subhive named MSSQL.1
  5. Delete the subhive named SQLEXPRESS
  6. Go to HKEY_LOCAL_MACHINE\Software\Microsoft\Microsoft SQL Server\Instance Names\SQL
  7. Delete the value named SQLEXPRESS
  8. Delete the folder %ProgramFiles%\Microsoft SQL Server\MSSQL.1

Note - the above steps apply to the instance name that is created when SQL Express is installed as a part of Visual Studio 2005.  The actual instance name on your system may vary if you have had any other beta version of SQL 2005 (such as the developer edition).  Please make sure to adjust the steps accordingly based on what instance name information is in your registry and file system.

 

Published Thursday, December 08, 2005 6:35 PM by astebner

Comments

Thursday, December 22, 2005 2:18 PM by Hannes Preishuber

# re: How to clean up a SQL 2005 instance name left behind by beta uninstall

i have installed the german sql 2000
sql 2005 named instance (us) and sql express us
Now i unistalled sql2005 completley to install sql epxress german edition
i get the above error
i cleaned the registry and the mssql.1 directory

any idea?
Wednesday, January 04, 2006 5:27 PM by alp

# SQL server install failure

My initial install had gone well with the final vs express release... but later something messed up my installation and i tried to uninstall and reinstall about ten times vs c++ express and sql express server... in different combinations as a whole or only sql server... i tried to follow the instructions on your blog... all went futile.... giving up for now... and hoping that you are planning to address this sql install-uninstall problem in near future ...

PS. what the heavens is remained behind when i uninstall it??? it is not beta... or is it? under the disguise of final release...
Monday, January 09, 2006 9:24 PM by astebner

# re: How to clean up a SQL 2005 instance name left behind by beta uninstall

Hi Alp - I'm sorry that you've run into this issue. Just to confirm, you have been trying to reinstall the final release of SQL 2005 Express and it is failing? If that is correct, can you please zip and send the log files located at %ProgramFiles%\Microsoft SQL Server\90\Setup Bootstrap\Log\Files to aaronste@microsoft.com so I can try to take a look?
Tuesday, February 07, 2006 7:44 PM by Martin Kulov

# re: How to clean up a SQL 2005 instance name left behind by beta uninstall

Thanks,

Martin Kulov
Saturday, April 01, 2006 2:47 AM by Gnanavel Thamilvasan

# How to do Silent Installation for SQL Express 2005?

I need to provide a silent Installation of SQL Express 2005, wherein the user doesn't have to click on the next button as in that of a normal installation by giving the required info and iam using Install Sheild 11.5. Can anyone suggest an idea like how to do a Silent Installation.
Thursday, May 11, 2006 7:57 AM by lenny

# re: How to clean up a SQL 2005 standard version

while I found that Add /remove control panel,there are no list of sql ,but
start edit we can see that there are
left item. why ?
Thursday, May 11, 2006 11:32 PM by astebner

# re: How to clean up a SQL 2005 instance name left behind by beta uninstall

Hi Lenny - It is possible that the start menu items for SQL were left behind after one of the uninstalls.  The most reliable way to determine whether or not you have any SQL components left on your system is to use the steps listed at http://blogs.msdn.com/astebner/archive/2005/10/30/487096.aspx to see if you have any SQL products installed.  If there are not any SQL components listed in the MsiInv output, then that means the start menu items are just leftover from the previous install but your system does not actually have SQL registered as being installed and you should be safe to install the final release.
Friday, September 15, 2006 3:21 AM by Clean up a SQL 2005 instance name « Techlogs

# Clean up a SQL 2005 instance name « Techlogs

Friday, February 16, 2007 9:35 PM by Aaron Stebner's WebLog

# Visual Studio 2005 and .NET Framework 2.0 Setup Troubleshooting Guide

Where to get Visual Studio 2005 and the .NET Framework 2.0 Where to download the .NET Framework 2.0 redistributable

Thursday, December 25, 2008 1:23 PM by plutch

# re: How to clean up a SQL 2005 instance name left behind by beta uninstall

It worked for me, but i was a little desperate and erased de whole sql server key on Local machine. It solved a Business Contact Manager Installation too!

Anonymous comments are disabled
 
Page view tracker