Skip to content

Latest commit

 

History

History
93 lines (67 loc) · 5.68 KB

File metadata and controls

93 lines (67 loc) · 5.68 KB
title Installing Updates from the Command Prompt
description This article describes command syntax for SQL Server update installation. You can test and modify installation scripts to meet the needs of your organization.
author rwestMSFT
ms.author randolphwest
ms.date 06/03/2025
ms.service sql
ms.subservice install
ms.topic conceptual
ms.custom
intro-installation
monikerRange >=sql-server-2016

Installing updates from the command line

[!INCLUDE SQL Server -Windows Only]

Test and modify installation scripts to meet the needs of your organization.

Sample syntax for installation

The name of the update package can vary and might include a language, edition, and processor component. Apply an update at a command prompt, replacing <package_name> with the name of your update package:

  • Update a single instance of [!INCLUDE ssNoVersion] and all shared components, like [!INCLUDE ssISnoversion] and Management Tools: You can specify the instance either by using the InstanceName parameter or the InstanceID parameter. To update a prepared instance of [!INCLUDE ssNoVersion], you must specify the InstanceID parameter.

    <package_name>.exe /qs /IAcceptSQLServerLicenseTerms /Action=/proxy/https/github.com/MicrosoftDocs/sql-docs/blob/4fa4591b1507096b3524e6a61fe7e22724684951/docs/database-engine/install-windows/Patch /InstanceName=MyInstance

    or

    <package_name>.exe /qs /IAcceptSQLServerLicenseTerms /Action=/proxy/https/github.com/MicrosoftDocs/sql-docs/blob/4fa4591b1507096b3524e6a61fe7e22724684951/docs/database-engine/install-windows/Patch /InstanceID=\<Instance ID>

    [!INCLUDE sql-eula-link]

  • Setup can integrate the latest product updates with the main product installation so that the main product and its applicable updates are installed at the same time. You can prepare an installation of database engine instance to include product update:

    setup.exe /q /IAcceptSQLServerLicenseTerms /ACTION=/proxy/https/github.com/MicrosoftDocs/sql-docs/blob/4fa4591b1507096b3524e6a61fe7e22724684951/docs/database-engine/install-windows/PrepareImage /UpdateEnabled=True /UpdateSource=\<path where the update is downloaded> /INSTANCEID=\<Instance ID> /FEATURES=SQLEngine
  • Update [!INCLUDE ssNoVersion] shared components only, like [!INCLUDE ssISnoversion] and Management Tools:

    <package_name>.exe /qs /IAcceptSQLServerLicenseTerms /Action=/proxy/https/github.com/MicrosoftDocs/sql-docs/blob/4fa4591b1507096b3524e6a61fe7e22724684951/docs/database-engine/install-windows/Patch%3C/span>
  • Update all instances of [!INCLUDE ssNoVersion] on the computer and all shared components, like [!INCLUDE ssISnoversion] and Management Tools:

    <package_name>.exe /qs /IAcceptSQLServerLicenseTerms /Action=/proxy/https/github.com/MicrosoftDocs/sql-docs/blob/4fa4591b1507096b3524e6a61fe7e22724684951/docs/database-engine/install-windows/Patch /AllInstances
  • Remove an update from a single instance of [!INCLUDE ssNoVersion] and all shared components, like [!INCLUDE ssISnoversion] and Management Tools:

    <package_name>.exe /qs /Action=/proxy/https/github.com/MicrosoftDocs/sql-docs/blob/4fa4591b1507096b3524e6a61fe7e22724684951/docs/database-engine/install-windows/RemovePatch /InstanceName=MyInstance
  • Remove an update from [!INCLUDE ssNoVersion] shared components only, like [!INCLUDE ssISnoversion] and Management Tools:

    <package_name>.exe /qs /Action=/proxy/https/github.com/MicrosoftDocs/sql-docs/blob/4fa4591b1507096b3524e6a61fe7e22724684951/docs/database-engine/install-windows/RemovePatch%3C/span>

    [!NOTE]
    The update installer ensures that the shared components are always at or above the version of the instance at the highest level.

Supported parameters

Important

When possible, supply security credentials at run time. If you must store credentials in a script file, secure the file to prevent unauthorized access.

Switch Description
/? Displays unattended installation command prompt help
/action=/proxy/https/github.com/MicrosoftDocs/sql-docs/blob/4fa4591b1507096b3524e6a61fe7e22724684951/docs/database-engine/install-windows/Patch or /action=/proxy/https/github.com/MicrosoftDocs/sql-docs/blob/4fa4591b1507096b3524e6a61fe7e22724684951/docs/database-engine/install-windows/RemovePatch%3C/code> Specifies the installation action: Patch or RemovePatch.
/allinstances Applies the [!INCLUDE ssNoVersion] update to all instances of [!INCLUDE ssNoVersion] and to all [!INCLUDE ssNoVersion] shared, instance-unaware components.
/instancename=InstanceName 1 Applies the [!INCLUDE ssNoVersion] update to an instance of [!INCLUDE ssNoVersion] named InstanceName, and to all [!INCLUDE ssNoVersion] shared, instance-unaware components.
/InstanceID=Inst1 Applies the [!INCLUDE ssNoVersion] update to an instance of [!INCLUDE ssNoVersion] Inst1, and to all [!INCLUDE ssNoVersion] shared, instance-unaware components.
/hideconsole Specifies that [!INCLUDE ssNoVersion] the console window is hidden or closed.
/quiet Runs the [!INCLUDE ssNoVersion] update Setup in unattended mode.
/qs Displays only the progress UI dialog.
/UpdateEnabled Specifies whether [!INCLUDE ssNoVersion] setup should discover and include product updates. The valid values are True and False or 1 and 0. By default, [!INCLUDE ssNoVersion] setup includes updates that it finds.
/IAcceptSQLServerLicenseTerms Required only when the /Q or /QS parameter is specified for unattended installations.

1 You can't specify this parameter to apply an update to a prepared instance of [!INCLUDE ssNoVersion]. You must specify the /instanceID parameter instead.

Related content