DB2 - Problem description
Problem IC84422 | Status: Closed |
REFRESH TABLE OR SET INTEGRITY ON AN MQT MAY RETURN SQL204N. | |
product: | |
DB2 FOR LUW / DB2FORLUW / A10 - DB2 | |
Problem description: | |
REFRESH TABLE/SET INTEGRITY FOR <table> IMMEDIATE CHECKED may return SQL204N when the following sequence of events has occurred earlier: 1. <table> was originally created when CURRENT SCHEMA was set to a schema-name <schemaA>. 2. CURRENT SCHEMA was then changed to another schema-name <schemaB>. 3. <table> was then altered from a base table into an MQT using ALTER TABLE ... ADD QUERY (<MQT definition query>) 4. <MQT definition query> mentioned in #3 references an unqualified table <base>. 5. The table <schemaB>.<base> exists, but not <schemaA>.<base> Note: For #1, <table> could be initially created as a base table, or as an MQT that was subsequently altered into a base table Example: set current schema a; create table b.base (a int not null primary key, b int ); create table a.mqt (a int not null, b int); set current schema b; alter table a.mqt add query (select * from base where a between 1 and 10) data initially deferred refresh immediate; -- The following SET INTEGRITY statement returns SQL204N set integrity for a.mqt immediate checked; | |
Problem Summary: | |
**************************************************************** * USERS AFFECTED: * * DB2 UDB Version 10.1 * **************************************************************** * PROBLEM DESCRIPTION: * * See Error Description * **************************************************************** * RECOMMENDATION: * * Upgrade to Version 10.1 FixPack 1. * **************************************************************** | |
Local Fix: | |
Specify fully qualified object names in ALTER TABLE ... ADD QUERY <MQT definition query> Example: alter table a.mqt drop query; alter table a.mqt add query (select * from b.base where a between 1 and 10) data initially deferred refresh immediate; set integrity for a.mqt immediate checked; | |
available fix packs: | |
DB2 Version 10.1 Fix Pack 1 for Linux, UNIX, and Windows | |
Solution | |
Problem was first fixed in DB2 UDB Version 10.1 FixPack 1. | |
Workaround | |
not known / see Local fix | |
Timestamps | |
Date - problem reported : Date - problem closed : Date - last modified : | 14.06.2012 03.11.2012 03.11.2012 |
Problem solved at the following versions (IBM BugInfos) | |
Problem solved according to the fixlist(s) of the following version(s) | |
10.1.0.1 | |
10.5.0.1 |