Deploying SQLServer2022-KB5063814-x64.exe with BatchPatch to Multiple Computers Simultaneously

Generally speaking, BatchPatch can deploy nearly all applications and third-party updates through the use of BatchPatch’s Deploy feature ( Actions > Deploy ). We have many examples / tutorials posted here: Software Deployment with BatchPatch. However, recently we came across a very rare example where the update in question simply wasn’t fully compatible with the built-in Deploy feature in BatchPatch.

The update file that gave us problems is SQLServer2022-KB5063814-x64.exe. Although the update would be successfully deployed/executed through the use of the BatchPatch Deploy feature, it would show indefinitely as “Executing” even after it had actually completed. Although this wasn’t the end of the world, it left something to be desired, and it required some manual intervention to both determine completion and manually kill residual processes that weren’t closing on their on.

In order to get around this unexpected behavior, we had to approach the deployment in a slightly different way. The steps are outlined below in case they could help someone else in the future.

  1. Put the SQLServer2022-KB5063814-x64.exe into C:\SomeFolder on the BatchPatch computer
  2. In BatchPatch click on Actions > Copy file/folder > Create/modify file or folder copy Create a file copy configuration just like the one in the screenshot below. Then save it by clicking the >> button. Then close the Create/modify file or folder copy window.
  3. In BatchPatch click on Actions > Execute remote process/command > Create/modify remote commands. Click Add Row and then create a command with the following title and command syntax:

    Title: SQL update execution
    Command:

    "C:\BatchPatch\deployment\temp\SQLServer2022-KB5063814-x64.exe" /q /IAcceptSQLServerLicenseTerms /Action=Patch /AllInstances

  4. Click Add Row a second time to create a second command with the following title and command syntax:

    Title: Delete SQL update file
    Command:

    cmd.exe /c del "C:\BatchPatch\deployment\temp\SQLServer2022-KB5063814-x64.exe" /F /Q

  5. In BatchPatch click on Actions > Job Queue > Create/modify job queue

    In the lower left corner of the Job Queue window you’ll find the three commands that you just created. Double click on them to add them to a new job queue in the following order (order shown below). Then save the job queue by using the >> button:

    -Copy SQL update
    -SQL update execution
    -Delete SQL update file

    See the screenshot below for exactly what it should look like:

  6. Finally you can execute the job queue on desired target computers. Select the desired target computers in the grid. Then click on Actions > Job Queue > Execute saved job queues > SQL Update

    The file is copied to the target computer. The update is applied successfully. Then the file is deleted successfully.

This entry was posted in Blog, Tutorials and tagged , . Bookmark the permalink. Both comments and trackbacks are currently closed.