超出锁定请求超时期限 - Telerik OpenAccess ORM
我有一个大型 SQL Server 2008 R2 数据库,其中有许多行不断更新。更新是由调用存储过程的后端服务应用程序完成的。在这些存储过程之一中有一个 SQL 游标,可以重新计算和更新数据。这一切都运行良好。
但是,我们的前端 Web 应用程序需要搜索这些行,并且此搜索有时会导致
超过锁定请求超时期限。在 Telerik.OpenAccess.RT.Adonet2Generic.Impl.PreparedStatementImp.executeQuery()..
经过一些研究后,我发现使此查询运行没有问题的最佳方法是使其以“读取未提交的隔离级别”运行。我发现可以在 Telerik OpenAccess 设置中进行此设置,但该设置会影响整个数据库 ORM 项目。那不是我想要的!我只想要这个级别的查询。
有没有办法让这个特定的 LINQ 查询在这个未提交的隔离级别中运行? 或者我们可以让这个查询使用WITH NOLOCK 提示吗?
I have a big SQL Server 2008 R2 database with many rows that are updated constantly. Updating is done by a back end service application that calls stored procedures. Within one of those stored procedures there is a SQL cursor that recalculates and updates data. This all runs fine.
But, our frontend web application needs to search through these rows and this search sometimes results in a
Lock request time out period exceeded. at
Telerik.OpenAccess.RT.Adonet2Generic.Impl.PreparedStatementImp.executeQuery()..
After doing some research I have found that the best way to make this query to run without problems is to make it run with "read uncommitted isolation level". I've found that this setting can be made in the Telerik OpenAccess settings, but that's a setting that affects the complete database ORM project. That's not what I want! I want this level for this query only.
Is there a way to make this specific LINQ query to run in this uncommitted isolation level?
Or can we make this one query to use a WITH NOLOCK hint?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
使用
在查询的开头
。请参阅参考手册
运行
未提交的查询 隔离级别(并使用 NOLOCK 提示)可能会导致许多奇怪的问题,您必须清楚地了解为什么这样做以及它如何干扰您的数据流
Use
in the beginning of your query.
See the reference manual
Runnung the queries in
read uncommitted
isolation level (and using NOLOCK hint) can cause many strange problems, you have to clearly understand why do you do this and how it can interfere with your dataflow