SQL Server Uninstallation Error – Exception has been thrown…

SQL Server Uninstallation Error – Exception has been thrown…

I had a SQL Server that needed to be uninstalled. It hadn’t been used for some time. It had been Disabled, but not removed.

The first thing I had to do was to check when the SQL Instance was last used. In most cases, you can find this out by checking the DateTime of the last ErrorLog file.

The location of the ErrorLog file varies from Server to Server, and the simplest way that I have found to locate it is through the use of SQL Server Configuration Manager.

Open SQL Server Configuration Manager, right-click the SQL Instance in question and select Properties. The “Startup Parameters” will include an existing parameter pointing to the ErrorLog location.

Open the folder and look for the “Date Modified” on ERRORLOG. This shows the last time that this Instance of SQL Server was used.

Now that’s confirmed (no usage for over three months), I proceeded with uninstalling the SQL Server Instance.

During the uninstall, I received a strange error:

    

The Installer was happy to remove the additional SQL Server components, but not the SQL Server Engine itself.

Searching the Internet for this error message proved fruitless.

I went back to SQL Server Configuration Manager to check the installed version, and I noticed something strange about the Service Account that was configured on the “Log On” Tab. The AD Service Account was from a different Domain and didn’t match the Server name.

Further investigation showed that the name of the Server had been changed. Clearly, this happened before the last time that SQL Server had been started on this Server. This meant that the AD Service Account was invalid.

 

Solution

I set up a new local User and granted it Administrator rights on the Server. I then right-clicked on the SQL Server Instance, selecting Properties. I then changed the Account Name to the newly created user.

Re-running the uninstall worked successfully and SQL Server was removed.

The Internet has now been updated and I calculate that if you search for “SQL Server Uninstallation Error” and “Exception has been thrown”, you will not receive just the one relevant result. Not quite a GoogleWhack, but impressive all the same.

 

Learnings

  • SQL Configuration Manager is a great tool for collecting information about your SQL Server.
  • If someone re-names a SQL Server, check and fix any issues straight away.

Leave a Reply

Your email address will not be published.

Follow on Feedly

By continuing to use the site, you agree to the use of cookies. more information

The cookie settings on this website are set to "allow cookies" to give you the best browsing experience possible. If you continue to use this website without changing your cookie settings or you click "Accept" below then you are consenting to this.

Close