Scope_Identity() 返回不正确的值已修复?

Scope_Identity() returning incorrect value fixed?(Scope_Identity() 返回不正确的值已修复?)
本文介绍了Scope_Identity() 返回不正确的值已修复?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我一直在寻找答案,我想我会求助于 stackoverflow 社区.由于这个错误,我一直在避免在 sql server 和 nhibernate 中使用类型标识字段:http://connect.microsoft.com/SQLServer/feedback/details/328811/scope-identity-sometimes-returns-incorrect-value

I've been searching hi and low for an answer to this and figured I would turn to the stackoverflow community. I have been avoiding using type identity id fields fields within sql server and nhibernate due to this bug: http://connect.microsoft.com/SQLServer/feedback/details/328811/scope-identity-sometimes-returns-incorrect-value

但是,我刚刚注意到它被标记为已修复.

However, I just noticed that it was marked as fixed.

有人知道这是否适用于最近发布的 SQL 服务器服务包吗?我找不到答案是肯定的或否定的.

Does, anybody know if this applies to the recent SQL server service pack that was released? I can't find a yes or no to this.

推荐答案

我的建议是尝试查询并测试您的结果.对此有许多变通方法,例如 Output 子句和 run query not in parralel.

My suggestion would be to try the query and test your results. There are a number of work arounds on this such as Output clause and run query not in parralel.

有关此信息,请参阅 Microsoft KBhttp://support.microsoft.com/kb/2019779

See Microsoft KB on this http://support.microsoft.com/kb/2019779

还有一个帖子表明不确定是否在 2008 SP1 中修复,但可能在 2008 R2 中修复

Also a post on this that indicated not sure if fixed in 2008 SP1 but may be fixed in 2008 R2

http://blog.sqlauthority.com/2009/03/24/sql-server-2008-scope_identity-bug-with-multi-processor-parallel-plan-and-solution/

这篇关于Scope_Identity() 返回不正确的值已修复?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持编程学习网!

本站部分内容来源互联网,如果有图片或者内容侵犯您的权益请联系我们删除!

相关文档推荐

Execute complex raw SQL query in EF6(在EF6中执行复杂的原始SQL查询)
SSIS: Model design issue causing duplications - can two fact tables be connected?(SSIS:模型设计问题导致重复-两个事实表可以连接吗?)
SQL Server Graph Database - shortest path using multiple edge types(SQL Server图形数据库-使用多种边类型的最短路径)
Invalid column name when using EF Core filtered includes(使用EF核心过滤包括时无效的列名)
How should make faster SQL Server filtering procedure with many parameters(如何让多参数的SQL Server过滤程序更快)
How can I generate an entity–relationship (ER) diagram of a database using Microsoft SQL Server Management Studio?(如何使用Microsoft SQL Server Management Studio生成数据库的实体关系(ER)图?)