Select the product you need help with
FIX: When you query through a view that uses the ORDER BY clause in SQL Server 2008, the result is still returned in random orderArticle ID: 926292 - View products that this article applies to. SQL Server 2008Microsoft 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.SQL Server 2005Microsoft distributes Microsoft SQL Server 2005 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 2005 fix release.
For more information about the master list of builds that were released after SQL was released, click the following article number to view the article in the Microsoft Knowledge Base:
957826
(http://support.microsoft.com/kb/957826/
)
Where you can find more information about the SQL Server 2008 builds that were released after SQL Server 2008 and the SQL Server 2005 builds that were released after SQL Server 2005 Service Pack 2
On This PageThis article describes the following about this hotfix release:
SYMPTOMSYou have a view in a database in SQL Server 2005 or SQL Server 2008. In the definition of the view, the SELECT statement meets the following requirements:
However, this behavior is different in Microsoft SQL Server 2000. In SQL Server 2000, the result is returned in the order that is specified in the ORDER BY clause. SQL Server 2008The fix for this issue was first released in Cumulative Update 1. For more information about how to obtain this cumulative update package for SQL Server 2008, click the following article number to view the article in the Microsoft Knowledge Base:956717 Note Because the builds are cumulative, each new fix release contains all the hotfixes and all the security fixes that were included with the previous SQL Server 2008 fix release. We recommend that you consider applying the most recent fix release that contains this hotfix.
For more information, click the following article number to view the article in the Microsoft Knowledge Base:
(http://support.microsoft.com/kb/956717/
)
Cumulative update package 1 for SQL Server 2008
956909
(http://support.microsoft.com/kb/956909/
)
The SQL Server 2008 builds that were released after SQL Server 2008 was released
SQL Server 2005Two versions of this hotfix exist. One version is designed to be applied to the release version of SQL Server 2005. The other version is designed to be applied to SQL Server 2005 Service Pack 2 (SP2). If you are running the release version of SQL Server 2005, apply the hotfix that is described in this article (build 1554). If you are running SQL Server 2005 SP2, apply cumulative update package 2 for SQL Server 2005 SP2 (build 3175). If you are running SQL Server 2005 Service Pack 1 (SP1), install SQL Server 2005 SP2, and then apply cumulative update package 2 for SQL Server 2005 SP2 (build 3175). Cumulative update package 2 for SQL Server 2005 SP2 (build 3175) is described in Microsoft Knowledge Base article 936305. For more information, click the following article number to view the article in the Microsoft Knowledge Base:936305
(http://support.microsoft.com/kb/936305/
)
Cumulative update package 2 for SQL Server 2005 Service Pack 2 is available
Hotfix informationA supported hotfix is available from Microsoft. However, this hotfix is intended to correct only the problem that is described in this article. Apply this hotfix only to systems that are experiencing this specific problem.If the hotfix is available for download, there is a "Hotfix download available" section at the top of this Knowledge Base article. If this section does not appear, submit a request to Microsoft Customer Service and Support to obtain the hotfix. Note If additional issues occur or if any troubleshooting is required, you might have to create a separate service request. The usual support costs will apply to additional support questions and issues that do not qualify for this specific hotfix. For a complete list of Microsoft Customer Service and Support telephone numbers or to create a separate service request, visit the following Microsoft Web site: http://support.microsoft.com/contactus/?ws=support Note The "Hotfix download available" form displays the languages for which the hotfix is available. If you do not see your language, it is because a hotfix is not available for that language.
(http://support.microsoft.com/contactus/?ws=support)
PrerequisitesYou must have installed the release version of SQL Server 2005 to apply this hotfix.Restart informationYou must restart the SQL Server service after you apply this hotfix.Registry informationYou do not have to change the registry after you apply this hotfix.Actions after you apply this hotfixThis hotfix introduces trace flag 168. After you apply this hotfix, you must enable trace flag 168. For information about how to enable a trace flag in SQL Server 2005, see the "Remark" section of the following Microsoft Developer Network (MSDN) Web site:http://msdn2.microsoft.com/en-us/library/ms188396.aspx Additionally, you must change the compatibility level of the database that contains the view to 80.
(http://msdn2.microsoft.com/en-us/library/ms188396.aspx)
To change the compatibility level, follow these steps:
Hotfix file informationThis hotfix contains only those files that are required to correct the issues that this article lists. This hotfix may not contain all the files that you must have to fully update a product to the latest build.The English version of this hotfix has the file attributes (or later file attributes) that are listed in the following table. The dates and times for these files are listed in Coordinated Universal Time (UTC). When you view the file information, it is converted to local time. To find the difference between UTC and local time, use the Time Zone tab in the Date and Time item in Control Panel. Collapse this table
STATUS
This behavior is by design. This behavior in SQL Server 2005 will remain in the future releases of SQL Server.
SQL Server 2008For more information about what files are changed, and for information about any prerequisites to apply the cumulative update package that contains the hotfix that is described in this Microsoft Knowledge Base article, click the following article number to view the article in the Microsoft Knowledge Base:956717
(http://support.microsoft.com/kb/956717/LN/
)
Cumulative update package 1 for SQL Server 2008SQL Server 2005If you apply this hotfix to SQL Server 2005 before you migrate an application from SQL Server 2000 to SQL Server 2005, this hotfix will make the application work with SQL Server 2005. For example, you expect to obtain the data in a specific sorted order. To do this, you must use the ORDER BY clause in the SELECT statement that you use to query through the view. After you apply this hotfix and migrate the application, you will obtain a sorted query result.However, this hotfix is only a temporary resolution. After you migrate the application, you must update the application to work correctly with the new behavior in SQL Server 2005. After you update the application, you can disable trace flag 168 and change the compatibility level of the database back to 90. REFERENCESFor more information about the list of builds that are available after the release of SQL Server 2008, click the following article number to view the article in the Microsoft Knowledge Base:
956909 For more information about the Incremental Servicing Model for SQL Server, click the following article number to view the article in the Microsoft Knowledge Base:
(http://support.microsoft.com/kb/956909/
)
The SQL Server 2008 builds that were released after SQL Server 2008 was released
935897 For more information about the naming schema for SQL Server updates, click the following article number to view the article in the Microsoft Knowledge Base:
(http://support.microsoft.com/kb/935897/
)
An Incremental Servicing Model is available from the SQL Server team to deliver hotfixes for reported problems
822499 For more information about software update terminology, click the following article number to view the article in the Microsoft Knowledge Base:
(http://support.microsoft.com/kb/822499/
)
New naming schema for Microsoft SQL Server software update packages824684
For more information about the compatibility level of a database in SQL Server 2005, visit the following MSDN Web site:
(http://support.microsoft.com/kb/824684/
)
Description of the standard terminology that is used to describe Microsoft software updateshttp://msdn2.microsoft.com/en-us/library/ms178653.aspx For more information about how to configure server startup options in SQL Server 2005, visit the following MSDN Web site:
(http://msdn2.microsoft.com/en-us/library/ms178653.aspx)
http://msdn2.microsoft.com/en-us/library/ms345416.aspx For more information about how to use the SQL Server service startup options, visit the following MSDN Web site:
(http://msdn2.microsoft.com/en-us/library/ms345416.aspx)
http://msdn2.microsoft.com/en-us/library/ms190737.aspx
(http://msdn2.microsoft.com/en-us/library/ms190737.aspx)
PropertiesArticle ID: 926292 - Last Review: October 8, 2011 - Revision: 6.0 APPLIES TO
|



Back to the top








