TechNet
Export (0) Print
Expand All

Installing Updates from the Command Prompt

 

Applies To: SQL Server 2016

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

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 SQL Server and all shared components, like Integration Services and Management Tools: You can specify the instance either by using the InstanceName parameter or the InstanceID parameter. To update a prepared instance of SQL Server, you must specify the InstanceID parameter<package_name>.exe /qs /IAcceptSQLServerLicenseTerms /Action=Patch /InstanceName=MyInstance or <package_name>.exe /qs /IAcceptSQLServerLicenseTerms /Action=Patch /InstanceID=<Instance ID>.

  • 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=PrepareImage /UpdateEnabled=True /UpdateEnabled=True /UpdateSource=<path where the update is downloaded> /INSTANCEID=<Instance ID> /FEATURES=SQLEngine.

  • Update SQL Server shared components only, like Integration Services and Management Tools: <package_name>.exe /qs /IAcceptSQLServerLicenseTerms /Action=Patch

  • Update all instances of SQL Server on the computer and all shared components, like Integration Services and Management Tools: <package_name>.exe /qs /IAcceptSQLServerLicenseTerms /Action=Patch /AllInstances.

Remove an update from the command prompt replacing <package_name> with the name of your update package:

  • Remove an update from a single instance of SQL Server and all shared components, like Integration Services and Management Tools: <package_name>.exe /qs /Action=RemovePatch /InstanceName=MyInstance.

  • Remove an update from SQL Server shared components only, like Integration Services and Management Tools: <package_name>.exe /qs /Action=RemovePatch

    System_CAPS_ICON_note.jpg Note


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

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

SwitchDescription
/?Displays unattended installation command prompt help
/action=Patch or /action=RemovePatchSpecifies the installation action: Patch or RemovePatch.
/allinstancesApplies the SQL Server update to all instances of SQL Server and to all SQL Server shared, instance-unaware components.
/instancename=InstanceName*Applies the SQL Server update to an instance of SQL Server named InstanceName, and to all SQL Server shared, instance-unaware components.
/InstanceID=Inst1Applies the SQL Server update to an instance of SQL Server Inst1, and to all SQL Server shared, instance-unaware components.
/quietRuns the SQL Server update Setup in unattended mode.
/qsDisplays only the progress UI dialog.
/UpdateEnabledSpecifies whether SQL Server setup should discover and include product updates. The valid values are True and False or 1 and 0. By default, SQL Server setup will include updates that are found.
/IAcceptSQLServerLicenseTermsRequired 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 SQL Server. You must specify the /instanceID parameter instead.

Overview of SQL Server Servicing Installation

Show:
© 2016 Microsoft