- 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.
- 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.
- 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:
- 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
Id. de artículo: 2589980 - Última revisión: 22 ago. 2011 - Revisión: 1