In recent days I was working on one of my projects, in which it was necessary to install Sql Server 2019. I restored the database I was working on in this new Sql Server instance and I started using it.
Calling one of the database’s stored procedure, which worked perfectly in the previous Sql Server version, I got the following error:
Msg 596, Level 21, State 1, Line 0 Cannot continue the execution because the session is in the kill state. Msg 0, Level 20, State 0, Line 0 A severe error occurred on the current command. The results, if any, should be discarded.
A strange error since, as I said before, in the previous version of Sql Server I had no problems.
I noticed that my version of SQL Server was as follows:
Microsoft SQL Server 2019 (RTM) - 15.0.2000.5 (X64) Sep 24 2019 13:48:23 Copyright (C) 2019 Microsoft Corporation Developer Edition (64-bit) on Windows Server 2019 Standard 10.0 <X64> (Build 17763: ) (Hypervisor)
Searching on Microsoft site I saw that there are several cumulative updates for Sql Server 2019, so I downloaded and installed the most recent.
Completed the installation, my SQL Server version was the following:
Microsoft SQL Server 2019 (RTM-CU16) (KB5011644) - 15.0.4223.1 (X64) Apr 11 2022 16:24:07 Copyright (C) 2019 Microsoft Corporation Developer Edition (64-bit) on Windows Server 2019 Standard 10.0 <X64> (Build 17763: ) (Hypervisor)
The version went from 15.0.2000.5 to 15.0.4223.1 and, of course, I tried to execute the offending stored procedure again, and…. it worked! It was therefore only a problem related to the version of SQL Server, which was solved by performing an upgrade.