DB2 - Problembeschreibung
Problem IC74708 | Status: Geschlossen |
ALTER TABLE OPERATION AGAINST MDC TABLE MISTAKENLY MARKS MATCHING INDEX AS UNIQUE THOUGH IT CONTAINS DUPLICATE KEYS. | |
Produkt: | |
DB2 FOR LUW / DB2FORLUW / 950 - DB2 | |
Problembeschreibung: | |
An ALTER TABLE operation against an MDC table which defines a primary key or unique constraint can mistakenly mark a matching existing index as unique although it contains duplicated keys. Once the index is mistakenly marked as unique, queries against the table can return incorrect results. You can find potentially affected index(s) by querying the system catalogs with the following query: select TABSCHEMA, TABNAME, CONSTNAME, TYPE from SYSCAT.TABCONST where (TYPE = 'P' or TYPE = 'U') and (TABSCHEMA, TABNAME) in ( select T.TABSCHEMA, T.TABNAME from SYSCAT.INDEXES I, SYSCAT.TABLES T where I.MADE_UNIQUE = 'Y' and I.TABNAME = T.TABNAME and I.TABSCHEMA = T.TABSCHEMA and T.CLUSTERED ='Y' ) | |
Problem-Zusammenfassung: | |
**************************************************************** * USERS AFFECTED: * * All * **************************************************************** * PROBLEM DESCRIPTION: * * ALTER TABLE OPERATION AGAINST MDC TABLE MISTAKENLY MARKS * * MATCHING INDEX AS UNIQUE THOUGH IT CONTAINS DUPLICATE KEYS. * **************************************************************** * RECOMMENDATION: * * Upgrade to DB2 LUW Version 9.5 Fix Pack 8 * **************************************************************** | |
Local-Fix: | |
Drop the primary key or unique constraint and verify uniqueness by selecting the GROUP BY index key columns along with columns with the following property: HAVING COUNT(*) > 1. Note that this query will not return correct values if the invalid unique constraint is still on the table; it must be dropped first. There must not be a unique index on the table when the uniqueness of the rows is being checked, regardless of whether the index is used or not. | |
verfügbare FixPacks: | |
DB2 Version 9.5 Fix Pack 8 for Linux, UNIX, and Windows | |
Lösung | |
Problem was first fixed in Version 9.5 Fix Pack 8 | |
Workaround | |
see LOCAL FIX | |
Weitere Daten | |
Datum - Problem gemeldet : Datum - Problem geschlossen : Datum - der letzten Änderung: | 25.02.2011 05.07.2011 05.07.2011 |
Problem behoben ab folgender Versionen (IBM BugInfos) | |
9.5.FP8 | |
Problem behoben lt. FixList in der Version | |
9.5.0.8 |