Sign in with Microsoft
Sign in or create an account.
Select a different account.
You have multiple accounts
Choose the account you want to sign in with.


Consider the following scenario:

  • There is an SQLCLR function that's declared as "deterministic", and the function can be used for the "replacement with a constant" optimization.

  • There is a synonym that points to the SQLCLR function.

  • A table-valued function (TVF) references to the SQLCLR function through the synonym.

In this scenario, when an application queries this TVF, an access violation may occur, and you may receive an error message that resembles the following:

Message 0, Level 11, State 0, Row 14

A severe error occurred on the current command. The results, if any, should be discarded.

Additionally, an error message is logged in the SQL Server error log.


Service pack information for SQL Server

This issue is fixed in the following service pack for SQL Server:

       Service Pack 2 for SQL Server 2016

       Service Pack 3 for SQL Server 2014

Service packs are cumulative. Each new service pack contains all the fixes that are in previous service packs, together with any new fixes. Our recommendation is to apply the latest service pack and the latest cumulative update for that service pack. You do not have to install a previous service pack before you install the latest service pack. Use Table 1 in the following article for finding more information about the latest service pack and latest cumulative update.

How to determine the version, edition and update level of SQL Server and its components


Microsoft has confirmed that this is a problem in the Microsoft products that are listed in the "Applies to" section.


Learn about the terminologythat Microsoft uses to describe software updates.

Need more help?

Expand your skills
Explore Training
Get new features first
Join Microsoft Insiders

Was this information helpful?

What affected your experience?

Thank you for your feedback!