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
- The difference between web server and app server
- Network basics: Part 3 - DNS Server
- 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
- Instructions for installing MS SQL Server
- Use IIS to set up FTP Server on Windows
Maybe you are interested
How to Install ISPConfig Hosting Control Panel with Apache Web Server on Ubuntu 24.04
Download free Windows Server 2025 security guide
15 best bots to improve Discord server
How to download Free Fire OB46 Advance Server trial version
Serious vulnerability in OpenSSH threatens millions of servers
When was Free Fire Advance Server OB45 released? How to download and play FF Advance OB45