Powershell script giving the error "The specified value 'Patch' is invalid."

  • I am trying to patch my SQL server with CU8 and GDR for SQL Server 2019 on a windows 2019 server

    There is only the default instance and when I run the following command in powershell as administrator I get the error below and the summary files are attached:

    setup.exe /updatesource="E:\SQL_2019\patches"  /Action=Patch /allinstances /IAcceptSQLServerLicenseTerms

    The funny thing is that it says to run in unattended mode but im not specifying the /q option but the error is below:

    The specified value 'Patch' is invalid. To run in unattended mode, you must specify a valid ACTION. The valid values for ACTION are: '

    None

    RemovePatch

    Uninstall

    Install

    Upgrade

    Patch

    Repair

    LandingPage

    ClusterReport

    RunRules

    PrepareFailoverCluster

    CompleteFailoverCluster

    InstallFailoverCluster

    RemoveNode

    AddNode

    EditionUpgrade

    Bootstrap

    ComponentUpdate

    Help

    RebuildDatabase

    RunDiscovery

    PrepareImage

    CompleteImage

    ConfigureImage'

    Error result: -2054422515

    Result facility code: 1420

    Result error code: 13

    • This topic was modified 3 years, 10 months ago by  hurricaneDBA.
    Attachments:
    You must be logged in to view attached files.
  • try and change the keywords to match the EXACT casing for install as per documentation.

    https://docs.microsoft.com/en-us/sql/database-engine/install-windows/install-sql-server-from-the-command-prompt?view=sql-server-ver15

    there were other users reporting errors where this sorted the issues they had.

    setup.exe /UpdateSource="E:\SQL_2019\patches" /ACTION=Patch /AllInstances /IACCEPTSQLSERVERLICENSETERMS

     

  • Hi Fred

    That didn't work even with lower case and upper case

    The error is attached

     

    regards

    Kal

  • I think you just have to start from the actual CU you are trying to install:

     

    Set-Location 'E:\SQL_2019\patches'
    SQLServer2019-KB4577194-x64.exe /ACTION=Patch /ALLINSTANCES /QUIETSIMPLE /IACCEPTPYTHONLICENSETERMS /IACCEPTROPENLICENSETERMS /IACCEPTSQLSERVERLICENSETERMS

    Johan

    Learn to play, play to learn !

    Dont drive faster than your guardian angel can fly ...
    but keeping both feet on the ground wont get you anywhere :w00t:

    - How to post Performance Problems
    - How to post data/code to get the best help[/url]

    - How to prevent a sore throat after hours of presenting ppt

    press F1 for solution, press shift+F1 for urgent solution 😀

    Need a bit of Powershell? How about this

    Who am I ? Sometimes this is me but most of the time this is me

  • Dear Johan

    I can run single patches no problem but when I include more than one patch and insert the option:

    /UPDATESOURCE

    This is when it doesn't work

    regards

    Kal

  • You only need to provide the latest CU.

    It includes all others  !

    -- added --

    At install time ( of a sqlserver instance ) , you can indeed point to a path holding all available CU's . The install process will then determine which one to install.

    • This reply was modified 3 years, 10 months ago by  Johan Bijnens.

    Johan

    Learn to play, play to learn !

    Dont drive faster than your guardian angel can fly ...
    but keeping both feet on the ground wont get you anywhere :w00t:

    - How to post Performance Problems
    - How to post data/code to get the best help[/url]

    - How to prevent a sore throat after hours of presenting ppt

    press F1 for solution, press shift+F1 for urgent solution 😀

    Need a bit of Powershell? How about this

    Who am I ? Sometimes this is me but most of the time this is me

  • Dear Johan

    Does it include the security patches (GDR) also?

    this was the whole exercise applying a CU and a GDR.

    regards

    kal

  • The GDR is post CU. I think you need CU xxxx and then the GDR. If there is a previous GDR, CUs after that include the GDR.

  • Also keep this note in mind: "...optional for computers that do not host Microsoft SQL Server Reporting Services."

    2021-01-26 10_34_05-Window

    Johan

    Learn to play, play to learn !

    Dont drive faster than your guardian angel can fly ...
    but keeping both feet on the ground wont get you anywhere :w00t:

    - How to post Performance Problems
    - How to post data/code to get the best help[/url]

    - How to prevent a sore throat after hours of presenting ppt

    press F1 for solution, press shift+F1 for urgent solution 😀

    Need a bit of Powershell? How about this

    Who am I ? Sometimes this is me but most of the time this is me

  • Dear Steven

    Are you sure if I have a GDR it will include the previous CUs?

    I have to patch SQL server 2016 with CU14 with GDR. Per the instructions I need to patch with CU 15 first then GDR.

    Will the GDR contain CU15 if its a strictly security patch?

    Kal

  • Ah, you might be right. If I go back and think, the GDR should be only for that level, but future CUs will include it.

    For SQL 2017,

    • RTM
    • GDR patch for RTM - apply directly.
    • CU 1
    • ...
    • CU 22
    • CU 22 GDR - patch can only apply to CU22. If you are on CU20, you need CU22 + GDR_CU22 patch
    • CU23 - will include the GDR

    MS tries to minimize the number of branches they maintain, so I'm guessing here that they only keep the RTM and latest CU/SP around that they will provide security patches for.

  • Ok I thought so.

    I have a 2016 server and had CU 14 and then I applied the GDR without CU 15 and it worked but I don’t know what problems this might cause Later.

    thanks

    kal

Viewing 12 posts - 1 through 11 (of 11 total)

You must be logged in to reply to this topic. Login to reply