Scope_Identity() returning incorrect value fixed?(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() 返回不正确的值已修复?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持编程学习网!
本文标题为:Scope_Identity() 返回不正确的值已修复?
基础教程推荐
- 是否可以执行按位分组功能? 2021-01-01
- SQL 效率:WHERE IN 子查询 vs. JOIN 然后 GROUP 2021-01-01
- SQL:使用来自具有相同列名的两个表中的数据... 2021-01-01
- SQL Server 实例在登录协商期间返回无效或不受支持的协议版本 2021-01-01
- 在 SQL 中连接多个表 2021-01-01
- SSMS 中的权限问题:“对象 'extended_properties'、数据库 'mssqlsystem_resource'、... 错误 229)上的 SELECT 权限被拒绝" 2022-01-01
- 将 SQL Server DateTime 列迁移到 DateTimeOffset 2021-01-01
- 无法解决整理冲突 2021-01-01
- 如何使用 mysql.connector 禁用查询缓存 2022-01-01
- 需要 MySQL 5.1 中的抽象触发器来更新审计日志 2021-01-01
