How to completely uninstall SQL Server
This article will show you how to uninstall SQL Server completely. Follow the steps in this article, you also need to prepare the system to be able to reinstall SQL Server.
Note : To uninstall an instance of SQL Server, you must be an administrator who has the right to login as a service. To uninstall a failover cluster of SQL Server, you need to use the Remove Node function available in SQL Server Setup to remove individual nodes.
Before uninstalling SQL Server, note the following important things:
- Before uninstalling SQL Server components from a computer with a minimum physical memory capacity, make sure that the page file size is sufficient. The page file size must be twice the amount of physical memory. Inadequate virtual memory can cause incomplete SQL Server uninstallation.
- If there are multiple versions of SQL Server, SQL Server Browser will automatically uninstall when the last version of SQL Server 2017 is uninstalled. If you want to uninstall all components of SQL Server 2017, you must uninstall the manual SQL Server Browser component from Programs and Features in Control Panel .
- When uninstalling SQL Server will delete the tempdb data file that was added during installation. The file has the name or part of the name tempdb_mssql _ *. Ndf will be deleted if they exist in the system database directory.
Before uninstalling SQL Server
Step 1: Backup data
Although this is not a required step, many people want to back up the database with their current state or want to save changes made in the system database. Therefore perform data backup before uninstalling SQL Server. Also, save a copy of all data and log files in a folder, not saved in the MSSQL folder because this folder will be deleted during the uninstallation.
The files you must save include the following database files:
- Master.mdf
- Mastlog.ldf
- Model.mdf
- Modellog.ldf
- Msdbdata.mdf
- Msdblog.ldf
- Mssqlsystemresource.mdf
- Mssqlsustemresource.ldf
- Tempdb.mdf
- Templog.ldf
- ReportServer [$ Version name]. This is Reporting Services' default database.
- ReportServer [$ Version name] TempDB. This is Reporting Services' default temporary database
Step 2: Delete security groups on the machine.
Before uninstalling SQL Server, delete local security groups for SQL Server components.
Step 3: Stop all SQL Server services
You should stop all SQL Server services before removing the SQL Server components. The connection is still active, which may prevent successful uninstall.
Step 4: Use an account with appropriate permissions.
Log in to the server using the SQL Server service account or use an account with equivalent permissions. For example, you can log on to the server by using the account that is a member of the Local Administrators group.
Remove a version of SQL Server
Method 1: Uninstall SQL Server in Control Panel
Step 1. To start the uninstall process, go to Control Panel , then select Programs and Features .
Step 2. Right-click SQL Server and select Uninstall , then click Remove . This will launch the SQL Server Installation Wizard. Setup Support Rules run to verify computer configuration. To continue, click Next .
Step 3. On the Select Instance page, use the drop-down box to specify a version of SQL Server to remove, or specify the option to only remove the sharing features of SQL Server and management tools. To continue, click Next .
Step 4. On the Select Features page, specify the features to remove specific versions of SQL Server. Running rules to verify that the operation can complete successfully.
Step 5. On the Ready to Remove page, review the list of components and features that will be uninstalled, then click Remove to start uninstalling.
Step 6. Immediately after uninstalling the final version of SQL Server, other programs associated with SQL Server will still show up in the programs list in Programs and Features . However, if you close Programs and Features and open it the next time, it will refresh the list of programs, showing only the programs that are still installed.
Method 2: Uninstall SQL Server in regedit
If the above method fails, you can manually uninstall SQL Server according to the steps below:
Step 1 : Back up the registry.
Step 2: Delete the following keys in regedit:
HKEY_LOCAL_MACHINESOFTWAREMicrosoft Microsoft SQL Server
HKEY_LOCAL_MACHINESOFTWAREMicrosoftMSSQLServer
Step 3: Go to the following key: HKEY_LOCAL_MACHINESOFTWAREMicrosoftWindowsCurrentVersionUninstall and delete all sub keys related to SQL Server.
Step 4: Go to the following key: HKEY_LOCAL_MACHINESYSTEMCurrentControlSetServices and delete all key related to SQL Server
Step 5: Delete all SQL Server folders in the computer at C: Program Files Microsoft SQL Server and other subdirectories.
If the uninstallation fails, try to find the cause and fix the problem. In some cases, such as deleting important files accidentally, reinstalling the operating system before reinstalling SQL Server. However, if it still doesn't work, you can contact Microsoft Support to get support.
See more:
You should read it
- SQL Server 2019 - Microsoft Relational Database Management System
- DISTINCT clause in SQL Server
- How to check Zoom running a secret web server on the Mac
- The difference between Truncate and Delete in Microsoft SQL Server
- New points in SQL Server 2017
- How to set up your own Git server on Linux
- Instructions for installing SQL Server 2019
- Learn about the architecture of MS SQL Server
May be interested
- How to uninstall Skype on the computeruninstalling skype on computers has many different ways for users to choose.
- How to use Smarty Uninstaller to remove software completely on Windowssmarty uninstaller is a software uninstaller, a smart application on windows, with the ability to completely and completely remove data files of the installation software.
- The difference between web server and app serveryou have probably seen that the terms web server and app server are often used interchangeably as if they are related to the same thing and also facilitate the website to function properly. but in reality, they are not the same.
- Completely uninstall software in Windows with Revo Uninstallersome files may still be left in the installation folder, in the documents folder or somewhere in the system file. in the worst case scenario, some of their registry keys remain untouched and will fill the registry. as more and more junk files and registry keys are in your computer, your computer becomes slower and the ability to work is reduced.
- How to Uninstall Bitdefender Safepayyou improperly configured the settings in bitdefender safepay and/or you met other unwanted problems such as desktop lockups then, you wish to completely remove the hacker-proof web browser from bitdefender? follow the provided simple...
- How to Uninstall Funmoods Completelyif funmoods has started to lose its charm, you may have run into difficulties removing it from your system. follow this guide to remove it completely from any browser, and even delete its entries in your computer's registry. close all...
- 3 ways to quickly remove applications on Windows 11 from your computerthe application was unnecessary or caused a system error. the only fix is to uninstall the app. today i will show you how to uninstall applications on windows 11.
- Steps to Uninstall Bitdefender on Windowswhile uninstalling bitdefender is easy, not doing so in the recommended manner outlined below may result in unwanted files remaining on your machine, resulting in problems installing a program. other viruses.
- How to uninstall Microsoft 365 Office on Windows 10if you are using the version of office that came with your microsoft 365 subscription (formerly office 365), you might finally need to uninstall it from windows 10. whatever the reason, you can uninstall it. office in at least two easy ways with the settings app or the support tools.
- How to Uninstall Bitdefender Total Security 2013 (Beta)in this article, you will learn that how to completely uninstall the expired bit-defender total security 2013 (beta) from your windows pc. and this entry covers the automatic removal option for the beta version of bts and the manual...