Windows 2018年4月10日更新之后,Azure Entity Framework SQL调用上的TDS错误 [英] TDS Error on Azure Entity Framework SQL Calls after Windows 10 April 2018 Update

查看:50
本文介绍了Windows 2018年4月10日更新之后,Azure Entity Framework SQL调用上的TDS错误的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我具有以下针对Azure中托管的SQL Server执行的C#代码.

I have the following C# code that executes against a SQL Server hosted in Azure.

protected IQueryable<T> FilterUpdatedRows<T>(IQueryable<T> query, DateTime lastSyncTimestamp) where T: class, ITimestamp
{
    return query.Where(x => x.InsertTimestamp >= lastSyncTimestamp ||
                            (x.UpdateTimestamp.HasValue && x.UpdateTimestamp >= lastSyncTimestamp));
}

泛型(T)是实体框架上下文类,其实现和接口可强制定义InsertTimestamp和UpdateTimestamp.

The Generic (T) are Entity Framework context classes that implement and interface that forces the InsertTimestamp and UpdateTimestamp to be defined.

此代码在我安装Windows 10的2018年4月更新之前一直工作良好,更新后出现以下错误...

This code has worked fine until I installed the April 2018 Update of Windows 10. Post update I get the following error ...

SqlException:传入的表格格式数据流(TDS)远程过程调用(RPC)协议流不正确.参数2("):数据类型0x00未知.

SqlException: The incoming tabular data stream (TDS) remote procedure call (RPC) protocol stream is incorrect. Parameter 2 (""): Data type 0x00 is unknown.

我确认引起问题的参数是InsertTimestamp和UpdateTimestamp字段.

I confirmed that the parameters causing the issue are the InsertTimestamp and UpdateTimestamp fields.

仅当我将Azure上的SQL数据库副本作为目标时,才会发生此错误.将数据库导出到本地数据库可以正常工作.尚未升级到2018年4月更新的团队成员在使用Azure版本时没有问题.

This error only happens when I am targeting my copy of the SQL database on Azure. Exporting the database to a local database works without issue. Team members who have not upgraded to the April 2018 update have no issue when hitting the Azure version.

我在本地版本上运行了SQL跟踪,并捕获了正在执行的SQL语句.通过针对Azure版本的SSMS运行该语句可以正常工作.

I ran a SQL Trace on my local version and captured the executing SQL statement. Running that statement through SSMS against the Azure version works without issue.

这是跟踪捕获的SQL语句...

Here is the SQL statement captured by the trace ...

exec sp_executesql N'SELECT 
    [Extent1].[CrossingId] AS [CrossingId], 

    ... Misc other fields ...

    [Extent1].[CrossingInstanceId] AS [CrossingInstanceId]
    FROM (SELECT 
    [V_SYNC_CrossingsSync].[CrossingId] AS [CrossingId], 

    ... Misc other fields ...

    [V_SYNC_CrossingsSync].[CrossingInstanceId] AS [CrossingInstanceId]
    FROM [dbo].[V_SYNC_CrossingsSync] AS [V_SYNC_CrossingsSync]) AS [Extent1]
    WHERE ([Extent1].[InsertTimestamp] >= @p__linq__0) OR (([Extent1].[UpdateTimestamp] IS NOT NULL) AND ([Extent1].[UpdateTimestamp] >= @p__linq__1))',N'@p__linq__0 datetime2(7),@p__linq__1 datetime2(7)',@p__linq__0='1980-01-01 00:00:00',@p__linq__1='1980-01-01 00:00:00'

有什么想法吗?

谢谢

推荐答案

临时解决方法:每个 ChainbridgeTech 在我的连接字符串中将MultipleActiveResultSets从TRUE更改为FALSE,然后错误停止.

Temp Workaround: Per ChainbridgeTech change MultipleActiveResultSets from TRUE to FALSE in my connection string, and the error stops.

这已被报告,正在处理中.他们仍然需要一个repro,而且我仍在隔离我可以公开的可共享数据:

This has been reported and is being worked on. They still need a repro and I'm still working on isolating shareable data that I can make public:

https://github.com/Microsoft/dotnet/issues/749

这篇关于Windows 2018年4月10日更新之后,Azure Entity Framework SQL调用上的TDS错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆