Hi @Vasadi Aswini ,
Welcome to Microsoft Q&A!
First of all, to uninstall SQL Server, you must be a local administrator with permissions to log on as a service.
There is a built-in command called msiexec which has an uninstall parameter (-x). This command can be used to remove stubborn programs through brute force.
There are two ways to find an inventory of the GUIDs that represent the programs you need to remove.
Way1: Locate this registry key: HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall, click each GUID, look for the display name in the box on the right. In your example, find the name like" Microsoft SQL Server 2019 Database Engine Services”, then use msiexec /x "{guid}" command to uninstall database engine and check if it is successful.
Way2: There is a MSI Inventory tool, which you can download (msiinv_new.zip) from this OneDrive folder to help you find GUIDs.
For the more information, please refer to this article: Cleanly Uninstalling Stubborn SQL Server Components.
Finally, here is a similar thread which is solved for your reference: https://learn.microsoft.com/en-us/answers/questions/650987/error-during-uninstall-of-sql-server-2019.html
Good day.
Best regards,
Seeya
If the answer is the right solution, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".
Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.