Article ID: 956718 - Last Review: September 19, 2008 - Revision: 4.0 FIX: A MERGE statement may not enforce a foreign key constraint when the statement updates a unique key column that is not part of a clustering key and there is a single row as the update source in SQL Server 2008
Bug #: 50003167 (SQL Hotfix)
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
SYMPTOMSIn Microsoft SQL Server 2008, a foreign key constraint may not be enforced when the following conditions are true:
The result is that rows in Table1 are changed when they should not have been. Additionally, Table2 will have rows that have dangling references to Table1. This problem occurs for this scenario when the following conditions are true:
RESOLUTIONThe 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
(http://support.microsoft.com/kb/956717/
)
Cumulative update package 1 for SQL Server 2008
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:
956909
(http://support.microsoft.com/kb/956909/
)
The SQL Server 2008 builds that were released after SQL Server 2008 was released
WORKAROUNDThe hotfix package eliminates the problem. If you use the MERGE statement in the scenario that is described in the "Symptoms" section and if you choose not to apply the hotfix, follow these steps to eliminate this problem:
For example, you have a script that resembles the following: STATUSMicrosoft has confirmed that this is a problem in the Microsoft products that are listed in the "Applies to" section. MORE INFORMATIONFor 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 2008 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
(http://support.microsoft.com/kb/956909/
)
The SQL Server 2008 builds that were released after SQL Server 2008 was released
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: 935897
(http://support.microsoft.com/kb/935897/
)
An Incremental Servicing Model is available from the SQL Server team to deliver hotfixes for reported problems
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: 822499
(http://support.microsoft.com/kb/822499/
)
New naming schema for Microsoft SQL Server software update packages For more information about software update terminology, click the following article number to view the article in the Microsoft Knowledge Base: 824684
(http://support.microsoft.com/kb/824684/
)
Description of the standard terminology that is used to describe Microsoft software updates REFERENCESFor more information about nonclustered indexes in SQL Server 2008, visit the following Microsoft Developer Network (MSDN) Web site: http://msdn.microsoft.com/en-us/library/ms179325(SQL.100).aspx
(http://msdn.microsoft.com/en-us/library/ms179325(SQL.100).aspx)
APPLIES TO
| Article Translations
|
Back to the top
