Scary SQL Server 2005 & 2008 bug

Watch out when using @@IDENTITY and SCOPE_IDENTITY() in your applications. Below is a quote from a Microsoft SQL Server engineer.

… whenever a parallel query plan is generated @@IDENTITY and SCOPE_IDENTITY() are not being updated consistently and can’t be relied upon.

You can find more about the bug and workarounds at the SQL Server bug  report.

UPDATE 28MAR2009: Pinal Dave has a more detailed blog post about the bug with workaround.


 Anders Lybecker is an chief architect at Kring Development A/S, a consultancy firm in Copenhagen, Denmark. He holds a degree in software engineering specializing in software development. His primary expertises are the Microsoft .Net framework and SQL Server which he has been working with since the start of this century! He enjoys discussing technical topics, teaching and speaking at conferences.


Related posts:

  1. Microsoft product launch 2008
  2. Visiting Microsoft in Johannesburg, South Africa
  3. SQL Server 2008 Microsoft ISV Partner events presentations
  4. SQL Server Open World
  5. Great conference

Tags:

Leave a Reply