Uninstall SQL Server 2012 in Command Prompt

I need to make an  uninstall script for SQL Server 2012 Express but I can't figger it out.

After I uninstalled the SQL instance with following command:

C:\Program Files\Microsoft SQL Server\110\Setup Bootstrap\SQLServer2012\setup.exe /Action=Uninstall /FEATURES=SQL,AS /INSTANCENAME=SQLEXPRESS /QUIETSIMPLE

There are still a couple of programs that I want to remove:

  • Microsoft SQL Server 2008 Setup Support Files
  • Microsoft SQL Server 2012 Transact-SQL ScriptDom
  • Microsoft SQL Server 2012 Native Client
  • SQL Server Browser for SQL Server 2012
  • Microsoft VSS Writer for SQL Server 2012
  • Microsoft - SQL Server 2012 Express
  • Microsoft SQL Server 2012 Setup (English)

Can someone please help me removing them without using 'Add or Remove Programs' and preferably without any interaction.


February 16th, 2015 11:13am

Hi Michael1105,

Are there any other instances except SQL Server Express in your system?

To completely uninstall SQL Server Express include the Browser, Writer and other SQL Server components, I recommend you use the ConfigurationFile.ini file. Below is an example for you.


Firstly, you can perform the following steps to generate a configuration file.

1. Right click SQL Server 2012 from control panel and select Remove
2. Follow the wizard through to the Ready to Remove page. The path to the configuration file is specified in the Ready to Remove page in the configuration file path section.
3. Cancel the setup without actually completing the uninstallation, to generate the INI file.

Secondly, you can specify the configuration file at the command prompt and uninstall SQL Server 2012 Express, or you can change the scripts in configuration file to meet your requirement, then copy the scripts  in command prompt to uninstall SQL Server 2012 Express.

Reference:
Install SQL Server 2012 Using a Configuration File




Thanks,
Lydia

Free Windows Admin Tool Kit Click here and download it now
February 16th, 2015 9:48pm

Hi,

This is because of you script. If you look at your script you just uninstalled SQL database engine and analysis services

setup.exe /Action=Uninstall /FEATURES=SQL,AS /INSTANCENAME=SQLEXPRESS /QUIETSIMPLE

in /FEATURES you would have to include other components as well. It should look like below

/FEATURES=SQL,AS,RS,IS,Tools		
February 16th, 2015 10:53pm

Thank you for  the response. I already tried that but it didn't uninstall anything extra...
Free Windows Admin Tool Kit Click here and download it now
February 17th, 2015 3:07am

Thank you for your extensive answer but I don't know what to add to the INI file because everything I tried didn't work. From the listed features in your screenshot, I have only the first 2 listed... But never the less, they are installed.

February 17th, 2015 4:05am

Thank you for your extensive answer but I don't know what to add to the INI file because everything I tried didn't work. From the listed features in your screenshot, I have only the first 2 listed... But never the less, they are installed.


Hi Michael1105,

I suspect that there are more than one SQL Server instance in your system. Please run Discovery Report to the detect the existing SQL Server instances and uninstall corresponding SQL Server components from Command prompt.

Thanks,
Lydia

Free Windows Admin Tool Kit Click here and download it now
February 17th, 2015 4:54am

This topic is archived. No further replies will be accepted.

Other recent topics Other recent topics