Hello, I have 9 separate SQL 2019 instances all on their own stand alone servers, 5 production, 4 Development, 1 of the 9 had this issue. While trying to apply CU 13 (SQLServer2019-KB5005679-x64.exe) the installation crashed and SQL would not start afterwards. Below is the error in the error log.
2021-12-10 08:22:44.35 spid13s Could not find stored procedure 'sys.sp_MSIsContainedAGSession'.
2021-12-10 08:22:44.35 spid13s Error: 912, Severity: 21, State: 2.
2021-12-10 08:22:44.35 spid13s Script level upgrade for database 'master' failed because upgrade step 'msdb110_upgrade.sql' encountered error 2812, state 62, severity 16. This is a serious error condition which might interfere with regular operation and the database will be taken offline. If the error happened during upgrade of the 'master' database, it will prevent the entire SQL Server instance from starting. Examine the previous errorlog entries for errors, take the appropriate corrective actions and re-start the database so that the script upgrade steps run to completion.
Steps I have already taken:
I started SQL from command line (NET START MSSQL$SQL01 /T902), and verified indeed 'sys.sp_MSIsContainedAGSession' does not exist in MSDB. I can see it in all my other instances, so I have the code, however I can not apply a sys schema stored proc to add it to the instance where it is missing. I ran the 'msdb110_upgrade.sql' manually after starting at the command line and confirmed the error.
Any workaround for this? I can't backout the CU because the OS doesn't think its installed, but if I try to re-run it it won't let me because it shows SQL is already upgraded, which it is, the version number is upgraded when I launched from command line.