Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Uninstall SQL Server 2016

I managed to install SSMS 2016 on Windows 7, but it doesn’t work of course.

I've tried to uninstall SQL Server 2016 using the SQL 2016 (un)install program in the Control Panel, but when I click remove it throws an error saying that it can't be installed on Win7.

Body:

The operating system on this computer or its services pack level does not meet the minimum requirements of SQL server 2016. To determine the minimum required operating system supported...

I can remove all components except SQL Server 2016 and SQL Management Studio, so how do I remove those?

like image 668
Sardothien Avatar asked Aug 26 '16 09:08

Sardothien


1 Answers

There is an amazing article that will tell you how to seamlessly remove all the remainders of SQL Server.

Everything you need is a little PowerShell script for generating a batch file that "knows" how to uninstall SQL Server Components.

By the end of reading the article you will get something like this:

# PowerShell
$a = c:\temp\msiinv.exe -s | Select-String "SQL Server" -Context 0,1
$a = $a -replace "Product code: ","msiexec /x """;
$a = $a -replace ">", "rem";
$a = $a -replace "\t", "";
$a = $a -replace "}","}""";
$a = $a -replace "}","}"" /quiet";
$a | Out-File c:\temp\remove.bat -encoding ascii;

After running the given PowerShell Script (needs to be customized for your concrete case), the remove.bat file will be generated which, if run, uninstalls the SQL Server components which are not included in dependency graph of another components.

This means that you will have to run this file (remove.bat) for several times until all the SQL Server components are successfully uninstalled.

So, have look at it Cleanly Uninstalling Stubborn SQL Server Components and find out how to use it. :)

like image 200
AlexMelw Avatar answered Sep 26 '22 13:09

AlexMelw