Sign in with Microsoft
Sign in or create an account.
Hello,
Select a different account.
You have multiple accounts
Choose the account you want to sign in with.

Microsoft distributes Microsoft SQL Server 2008 fixes as one downloadable file. Because the fixes are cumulative, each new release contains all the hotfixes and all the security fixes that were included with the previous SQL Server 2008 fix release.

Symptoms

Consider the following scenario:

  • You run a parallel query that uses the row_number function in Microsoft SQL Server 2008.

  • You try to run the query by using a subquery that is inside a SELECT statement or a Data Manipulation Language (DML) statement.

In this scenario, you encounter one of the following issues:

  • You receive incorrect results if you run the query inside the SELECT statement many times.

  • The table might contain incorrect data if the query runs inside a DML statement. If the table has constraints, the statement might fail with a constraint violation.

    For example, an INSERT statement might fail and a primary key violation error occurs if the table has a primary key.



Note These issues might occur in one of the following situations:

  • You set the MAXDOP query hint option to a value that is greater than 2.

  • You set the Max Degree of Parallelism option to a value that is greater than 2 in server configuration.


Resolution

To resolve this issue, obtain the latest service pack for SQL Server 2008. For more information, click the following article number to view the article in the Microsoft Knowledge Base:

968382 How to obtain the latest service pack for SQL Server 2008

Workaround

To work around this issue, use one of the following methods:

  • Enable 4134 trace flag if you have applied one of the following updates:

    • Cumulative update package 6 for SQL Server 2008 or a later cumulative update package for SQL Server 2008

    • Cumulative update package 2 for SQL Server 2008 Service Pack 1 (SP1) or a later cumulative update package for SQL Server 2008 SP1



    For more information about how to enable trace flags, visit the following MSDN website:

    How to enable trace flags

  • Reference the "Workaround" section in the Microsoft Knowledge Base article 970198. 

    For more information, click the following article number to view the article in the Microsoft Knowledge Base:

    970198 FIX: You receive an incorrect result when you run a query that uses the row_number function in SQL Server 2008

Need more help?

Want more options?

Explore subscription benefits, browse training courses, learn how to secure your device, and more.

Communities help you ask and answer questions, give feedback, and hear from experts with rich knowledge.

Was this information helpful?

What affected your experience?
By pressing submit, your feedback will be used to improve Microsoft products and services. Your IT admin will be able to collect this data. Privacy Statement.

Thank you for your feedback!

×