Scope_Identity()返回不正确的值是否已修复? [英] Scope_Identity() returning incorrect value fixed?
问题描述
我一直在高低寻找一个答案,以为我会转向stackoverflow社区.由于此错误,我一直在避免在sql server和nhibernate中使用类型标识ID字段字段:
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 Server Service Pack吗?我找不到是或否.
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子句和不在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 KB http://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
这篇关于Scope_Identity()返回不正确的值是否已修复?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!