FIX: Fatal exception when you run a query that contains CLR functions against an indexed view in SQL Server

Applies to: SQL Server 2012 EnterpriseSQL Server 2012 DeveloperSQL Server 2012 Standard More


Assume that you have an indexed view on a table in Microsoft SQL Server 2012 or SQL Server 2014. When you run a query that contains common language runtime (CLR) functions in the WHERE clause against this view, a fatal exception is generated and the session is disconnected.

Note The important requirement for this issue is that the CLR functions must be deterministic.


The issue was first fixed in the following cumulative update of SQL Server.

Cumulative Update 4 for SQL Server 2014

Cumulative Update 2 for SQL Server 2012 SP2

Cumulative Update 11 for SQL Server 2012 SP1


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