Hi there,
Thanks for the replies, appreciate your thoughts indeed! In the end we went with cleaning up the old SQL Server 2022 components and then we were able to successfully upgrade the SQL Server. The process we followed is below if this is helpful to anyone else in this situation.
This is not an approved Microsoft process. To test we took a snapshot of our PROD SQL Server and stood it up on a new VM. From there we ran through the steps a couple of times to confirm that we could successfully upgrade SQL Server.
The following steps detail the process to completely remove all SQL Server 2022 components which will allow a successful upgrade of PROD from 2019 to 2022.
1. Run the SQL Server 2022 Setup application as administrator, this can be found in the following location:
C:\SQL2022\setup.exe
2. Using the SQL Server 2022 Setup application, perform a discovery, you should notice the following components are installed:
3. Close the SQL Server 2022 Setup application.
4. Start the SQL Server 2022 Configuration Manager application.
5. Stop the SQL Server Integration Services 16.0 service.
6. Close the SQL Server 2022 Configuration Manager application.
7. Start the Services system application.
8. Stop the SQL Server Integration Services CEIP service 16.0 service.
9. Close the Services system application.
10. Run the Command Prompt application as Administrator.
11. Ensure the directory in your Command Prompt application is set to C:\Windows\System32.
12. Execute the following command to uninstall a SQL Server 2022 patch:
"C:\Program Files\Microsoft SQL Server\160\Setup Bootstrap\Update Cache\KB5046861\GDR\setup.exe" /Action=RemovePatch /AllInstances
13. Review the KB patches at the following registry key:
Some SQL Server 2022 patches have been installed on the SQL Server since the failed upgrade attempt. All patches that have been installed can be found in the following folder in the registry:
Computer\HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\
An example of what this looks like is as per the following image:
It could be that additional patches may have been installed on the SQL Server since this document was written. Review the KB patches in the registry folder mentioned above. If there are additional patches not covered by this document, then using the UninstallString key for the patch, uninstall any additional patches.
14. Execute the following commands in your administrator Command Prompt to uninstall the SQL Server 2022 components:
Note that due to the partial install, some components when uninstalling might throw an error that the action is only valid for installed products. Just click on OK, the offending registry keys will be removed for that product.
Note, all the commands below are specific to our system, you'll need to find out which commands you need to execute by reviewing the earlier Uninstall registry folder.
15. Restart the SQL Server.
16. Review the following registry folder to ensure there are no SQL Server 2022 components remaining:
Computer\HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\
17. Start the Windows Explorer application.
18. Delete the following folder: C:\Program Files\Microsoft SQL Server\160.
19. Restart the SQL Server.
20. Run the SQL Server 2022 Setup application as administrator, this can be found in the following location:
C:\SQL2022\setup.exe
21. Using the SQL Server 2022 Setup application, perform a discovery, you should notice the following components are installed:
Note that there are no longer any SQL Server 2022 components. You should now be fine to upgrade the SQL Server from 2019 to 2022.
After the upgrade another discovery resulted in the following image:
Not sure why there are two Integration Services entries, we did select upgrade for that component but I guess it's just kept for backwards compatibility? Our other SQL boxes that were upgraded successfully without any errors have the same.