-
Hi there, since SQL Server 2019 CU21 I'm having a issue with the Update-DbaInstance command using Error message: Tested dbatools version: Anyone aware what causes this? It worked before SQL Server 2019 CU21 without any issues. Thanks in advance. PowerShell script used for updating the instance directly after the installation: [CmdLetBinding()]Param(
[Parameter()][string]$UpdatePath = "C:\SQLSERVER\UPDATES",
[Parameter()][string]$ExtractPath = "C:\SQLSERVER\UPDATES\TEMP",
[Parameter(Mandatory)][int32[]]$KB
)
$ErrorActionPreference = "Stop"
$WarningPreference = "Stop"
Try {
Import-Module dbatools
$SplatParameters = @{
ArgumentList = "/SkipRules=RebootRequiredCheck"
ComputerName = $env:COMPUTERNAME
KB = $KB
Path = $UpdatePath
ExtractPath = $ExtractPath
Confirm = $false
}
Update-DbaInstance @SplatParameters
} Catch {
Write-Output $_
exit 1
} |
Beta Was this translation helpful? Give feedback.
Replies: 6 comments 2 replies
-
I'm not sure if this is your issue, but in my case I found that there were files pending rename. If you go in and rename that registry key it returns false. There is "[-NoPendingRenameCheck]" but it doesnt seem to actually do anything.
|
Beta Was this translation helpful? Give feedback.
-
I resolved this issue by using Start-Process of the KB directly instead of using dbatools. |
Beta Was this translation helpful? Give feedback.
-
I reopened the discussion since I'm still having the issue and got some time to test a manual patch. Also, I want to understand it incase I'm doing anything wrong since we prefer dbatools. I tested the following # not working (dbatools)
$splatParameter = @{
NoPendingRenameCheck = $true
ComputerName = $env:COMPUTERNAME
Path = "C:\SqlServer\Update\"
ExtractPath = "C:\SqlServer\Update\Temp"
KB = 5031778
Confirm = $false
}
Update-DbaInstance @splatParameter
# not working - trying to use same ArgumentList as Start-Process (dbatools)
$ArgumentList = @("/SkipRules=RebootRequiredCheck", "/IACCEPTSQLSERVERLICENSETERMS", "/SUPPRESSPAIDEDITIONNOTICE", "/SUPPRESSPRIVACYSTATEMENTNOTICE", "/ACTION=PATCH", "/INSTANCENAME=MSSQLSERVER", "/QUIET")
$splatParameter = @{
NoPendingRenameCheck = $true
ComputerName = $env:COMPUTERNAME
Path = "C:\SqlServer\Update\"
ExtractPath = "C:\SqlServer\Update\Temp"
ArgumentList = $ArgumentList
KB = 5031778
Confirm = $false
}
Update-DbaInstance @splatParameter
# working (SQLServer2022-KB5031778-x64.exe)
$splatParameters = @{
FilePath = "C:\SqlServer\Update\SQLServer2022-KB5031778-x64.exe"
ArgumentList = "/SkipRules=RebootRequiredCheck /IACCEPTSQLSERVERLICENSETERMS /SUPPRESSPAIDEDITIONNOTICE /SUPPRESSPRIVACYSTATEMENTNOTICE /ACTION=PATCH /INSTANCENAME=MSSQLSERVER /QUIET"
PassThru = $true
Wait = $true
}
Start-Process @splatParameters Output: With dbatools I can't get the patch working. I always receive "Reboot the computer before proceeding" Without dbatools it's patching without any issues |
Beta Was this translation helpful? Give feedback.
-
You are seeing that message because the command itself checks for reboot status, it does not acknowledge the argument you are passing as that is strictly for the patch executable flags. dbatools/public/Update-DbaInstance.ps1 Lines 437 to 445 in b36ddcf |
Beta Was this translation helpful? Give feedback.
-
Thanks for your fast response. So is there no way to skip the required reboot check using Update-DbaInstance? As mentioned in my first post we started facing this issue since SQL Server 2019 CU21 but the -NoPendingRenameCheck parameter seems not to help here and patching with the executable directly (Start-Process) works without any issues (at least without rebooting 😅) We have customers who insist on hardware servers that perform a memory test for about 5-10 minutes when rebooting, so an extra reboot for these servers would greatly increase the downtime. |
Beta Was this translation helpful? Give feedback.
-
Since no solution was provided and to close the discussion I'm patching the instances now by executing the KB directly instead of using dbatools command Update-DbaInstance. It works fine, better and without issues. |
Beta Was this translation helpful? Give feedback.
Since no solution was provided and to close the discussion I'm patching the instances now by executing the KB directly instead of using dbatools command Update-DbaInstance.
It works fine, better and without issues.