sql-serverinstallationsql-server-2019servicepacks

Attempted to perform an unauthorized operation when executing SQL Server 2019 service pack


I already had SQL Server 2019. After upgrading my Windows 10 to latest October Update, I found my SQL Server does not have latest service packs. I downloaded latest service pack CU8 from Microsoft and ran it. After initializing set up, I get error

Attempted to perform an unauthorized operation

enter image description here

Many research and no luck even in SO.

Please advise.


Solution

  • After reviewing the logs and digging into windows registry and security, I found the problem was "Microsoft Edge" registry key. Somehow it is read-only for administrator and I figured it out I need to use SYSTEM account to apply the service pack.

    Finally I found I can do that using an executable in SysInternals package which is famous for doing weird things in Windows.

    This is what I did to apply the service pack.

    1. Run Cmd or PowerShell as Administrator
    2. Go to SysInternals and make sure you have the PsExec64.exe there
    3. Run below command:

    .\PsExec64.exe -sid "D:\Downloads\SQLServer2019-KB4577194-x64.exe"

    This way you will execute the service pack using SYSTEM account which has highest privilege.

    Service pack installed successfully!