I
IdaliaL
Recently, I received a question about unattended uninstall for SQL Server Express edition. This article describes how to perform this task.
We need to take in consideration before to proceed
Uninstall process
For more information on uninstall options, see
https://learn.microsoft.com/en-us/sql/database-engine/install-windows/install-sql-server-from-the-command-prompt?view=sql-server-ver16#Uninstall
Hope this helps!
Idalia - SQL Server CSS
Continue reading...
We need to take in consideration before to proceed
- User that performs the process must be a local administrator with permissions to log on as a service. You can review more information about required permissions here.
- If the machine has the minimum required amount of physical memory, increase the size of the page file to two times the amount of physical memory. Insufficient virtual memory can result in an incomplete removal of SQL Server.
- On a system with multiple instances of SQL Server, the SQL Server browser service is uninstalled only once the last instance of SQL Server is removed. The SQL Server Browser service can be removed manually from Programs and Features in the Control Panel.
- Uninstalling SQL Server deletes
tempdb
data files that were added during the install process. Files with tempdb_mssql_*.ndf name pattern are deleted if they exist in the system database directory. - Backup your databases.
Uninstall process
- Open Command Prompt with admin rights
- Navigate to the below directory
C:\Program Files\Microsoft SQL Server\160\Setup Bootstrap\MyInstanceName
Please note that 160 version is the major build version of SQL Server.
View and Read SQL Server Setup Log Files - SQL Server
C:\>cd C:\Program Files\Microsoft SQL Server\160\Setup Bootstrap\SQL2022
- Run the below command
C:\Program Files\Microsoft SQL Server\160\Setup Bootstrap\SQL2022>setup.exe /Q /ACTION=uninstall /INSTANCENAME=SQLEXPRESS /FEATURES=SQLENGINE
For more information on uninstall options, see
https://learn.microsoft.com/en-us/sql/database-engine/install-windows/install-sql-server-from-the-command-prompt?view=sql-server-ver16#Uninstall
Hope this helps!
Idalia - SQL Server CSS
Continue reading...