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

-> I was performing an In-Place upgrade of SQL Server 2017 to SQL Server 2019. When I selected the required default instance on the setup window and clicked next, I received below message and couldn’t proceed further,

[error message] The instance id 'MSSQLSERVER' is already in use by Sql Server Instance 'MSSQLSERVER.INACTIVE'. 
To continue, specify a unique instance id.

[details] microsoft.sqlserver.configuration.setupextension.instanceidisusedbyanotherinstanceexception: 
the instance id 'MSSQLSERVER' is already in use by Sql Server Instance 'MSSQLSERVER.INACTIVE'. 
To continue, specify a unique instance id.
=====================================================================

-> It seems like we have MSSQLSERVER.INACTIVE instance on the database server and that is due to an failed install before.

-> In my case the In-Place upgrade failed due to the issue discussed in this article.

-> I ran a discovery report from SQL Server 2019 setup,

-> Below is the discovery report,

-> It seems like the problematic component in my case is SQL Server Analysis services.

-> I searched for file “Datastore_Discovery.xml” on the database server and opened it. I then searched for INACTIVE and got below results,

-> I noted down the product code for the INACTIVE instance and executed below in an administrative command prompt. This uninstalls the INACTIVE instance for that particular component.

msiexec /x {F01BC425-ABD3-41AA-9B88-8B1521B2B5D0}
msiexec /x {F7F6414B-264B-4C08-830B-3E6722F5F025}

-> I started the In-Place upgrade this time and it completed fine without any issues.

-> In my case it was just SQL Server Analysis Service, but there will be instances you will see other components also. Hence it is required to look at the discovery report and remove all INACTIVE components on the database server to move forward.

Thank You,
Vivek Janakiraman

Disclaimer:
The views expressed on this blog are mine alone and do not reflect the views of my company or anyone else. All postings on this blog are provided “AS IS” with no warranties, and confers no rights.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s