Skip to content

Latest commit

 

History

History
91 lines (66 loc) · 5.61 KB

File metadata and controls

91 lines (66 loc) · 5.61 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 05/11/2021
ms.service sql
ms.subservice install
ms.topic conceptual
ms.custom intro-installation
monikerRange >=sql-server-2016

Installing Updates from the Command Prompt

[!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 may 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 [!INCLUDEssNoVersion] and all shared components, like [!INCLUDEssISnoversion] and Management Tools: You can specify the instance either by using the InstanceName parameter or the InstanceID parameter. To update a prepared instance of [!INCLUDEssNoVersion], you must specify the InstanceID parameter.

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

    or

    <package_name>.exe /qs /IAcceptSQLServerLicenseTerms /Action=/proxy/https/github.com/MicrosoftDocs/sql-docs/blob/14e3a417d1f78bb229eecc943da74991c8d48e5d/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/14e3a417d1f78bb229eecc943da74991c8d48e5d/docs/database-engine/install-windows/PrepareImage /UpdateEnabled=True /UpdateSource=\<path where the update is downloaded> /INSTANCEID=\<Instance ID> /FEATURES=SQLEngine
    
  • Update [!INCLUDEssNoVersion] shared components only, like [!INCLUDEssISnoversion] and Management Tools:

    <package_name>.exe /qs /IAcceptSQLServerLicenseTerms /Action=/proxy/https/github.com/MicrosoftDocs/sql-docs/blob/14e3a417d1f78bb229eecc943da74991c8d48e5d/docs/database-engine/install-windows/Patch
  • Update all instances of [!INCLUDEssNoVersion] on the computer and all shared components, like [!INCLUDEssISnoversion] and Management Tools:

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

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

    <package_name>.exe /qs /Action=/proxy/https/github.com/MicrosoftDocs/sql-docs/blob/14e3a417d1f78bb229eecc943da74991c8d48e5d/docs/database-engine/install-windows/RemovePatch

    [!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/14e3a417d1f78bb229eecc943da74991c8d48e5d/docs/database-engine/install-windows/Patch or /action=/proxy/https/github.com/MicrosoftDocs/sql-docs/blob/14e3a417d1f78bb229eecc943da74991c8d48e5d/docs/database-engine/install-windows/RemovePatch%3C/strong> Specifies the installation action: Patch or RemovePatch.
/allinstances Applies the [!INCLUDEssNoVersion] update to all instances of [!INCLUDEssNoVersion] and to all [!INCLUDEssNoVersion] shared, instance-unaware components.
/instancename=InstanceName* Applies the [!INCLUDEssNoVersion] update to an instance of [!INCLUDEssNoVersion] named InstanceName, and to all [!INCLUDEssNoVersion] shared, instance-unaware components.
/InstanceID=Inst1 Applies the [!INCLUDEssNoVersion] update to an instance of [!INCLUDEssNoVersion] Inst1, and to all [!INCLUDEssNoVersion] shared, instance-unaware components.
/hideconsole Specifies that [!INCLUDEssNoVersion] the console window is hidden or closed.
/quiet Runs the [!INCLUDEssNoVersion] update Setup in unattended mode.
/qs Displays only the progress UI dialog.
/UpdateEnabled Specifies whether [!INCLUDEssNoVersion] setup should discover and include product updates. The valid values are True and False or 1 and 0. By default, [!INCLUDEssNoVersion] setup will include updates that are found.
/IAcceptSQLServerLicenseTerms Required only when the /Q or /QS parameter is specified for unattended installations.

*You cannot specify this parameter to apply an update to a prepared instance of [!INCLUDEssNoVersion]. You must specify the /instanceID parameter instead.

See also

Overview of SQL Server Servicing Installation