Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
743 views
in Technique[技术] by (71.8m points)

sql server - Scope_Identity() returning incorrect value fixed?

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.

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.

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)

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.

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

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/


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...