Calling a procedure using a synonym will throw error: Cannot continue the execution because the session is in the kill state.

Luís Pinho 41 Reputation points
2020-09-23T16:49:19.493+00:00

Hi all,
we have created a synonym for a procedure that is located in an Azure Managed Instance using the following code:

CREATE SYNONYM [dbo].[P_Testing] FOR [<dbLink>].[<bd>].[dbo].P_Testing

When we call the procedure (using the synonym) we are getting an error:

Msg 596, Level 21, State 1, Line 5
Cannot continue the execution because the session is in the kill state.
Msg 0, Level 20, State 0, Line 5
A severe error occurred on the current command.  The results, if any, should be discarded.

If we call the procedure using [<dbLink>].[<bd>].[dbo].P_Testing (exactly the same that we have created the synonym for) everything works fine.

We are using Microsoft SQL Server Developer 2019 [v15.0.2000.5] running on Windows Server 2019 Standard running on a Hyper-V VM.
I'm able to find some reports of problems with using synonyms for procedure in conjunction with other factors for older versions of SQL Server, but none for SQL Server 2019.

Can you give me any hints of why this is happening?

Thanks,
Luís Pinho

Windows Server 2019
Windows Server 2019
A Microsoft server operating system that supports enterprise-level management updated to data storage.
3,796 questions
Azure Managed Applications
Azure Managed Applications
An Azure service that enables managed service providers, independent software vendors, and enterprise IT teams to deliver turnkey solutions through the Azure Marketplace or service catalog.
148 questions
SQL Server
SQL Server
A family of Microsoft relational database management and analysis systems for e-commerce, line-of-business, and data warehousing solutions.
13,995 questions
0 comments No comments
{count} votes

Accepted answer
  1. Tom Phillips 17,741 Reputation points
    2020-09-23T17:19:49.097+00:00

    You are running the RTM version. The first thing you should do is install the latest CU and retest. https://support.microsoft.com/en-us/help/4518398/sql-server-2019-build-versions

    The message "A severe error occurred on the current command. The results, if any, should be discarded" generally means you got a stack dump running the query. You should update and see if it still occurs.


0 additional answers

Sort by: Most helpful

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.