Jump to content

Recommended Posts

Guest IdaliaL
Posted

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

 

 

 

  • 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 [iCODE]tempdb[/iCODE] 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

 

  1. Open Command Prompt with admin rights
  2. 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
     
     
     
    [iCODE]C:\>cd C:\Program Files\Microsoft SQL Server\160\Setup Bootstrap\SQL2022[/iCODE]
  3. Run the below command
     
    [iCODE]C:\Program Files\Microsoft SQL Server\160\Setup Bootstrap\SQL2022>setup.exe /Q /ACTION=uninstall /INSTANCENAME=SQLEXPRESS /FEATURES=SQLENGINE[/iCODE]
     
     
     
     
     

 

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...

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...