DB2 - Problem description
Problem IC75867 | Status: Closed |
DB2 MIGHT ENCOUNTER 'DEADLOCK' ERROR WHEN PERFORMING CREATE VIEW AND DROP TABLE SIMULTANEOUSLY. | |
product: | |
DB2 FOR LUW / DB2FORLUW / 950 - DB2 | |
Problem description: | |
When concurrently perform DROP TABLE and CREATE VIEW on a view that references an underlying table that's different from the table getting dropped but with similar namings, the two statements may lead to a deadlock among the catalog tables, SYSIBM.SYSTABAUTH and SYSIBM.SYSVIEWDEP. The problem is more likely to happen if the table being dropped has dependent views and other objects (e.g. index or trigger) defined on it. To identify the problem, you need to use DB2 event monitor to collect detailed information for deadlocks. When the deadlock error occurs, in the event monitor output you will see the following entries: Table of lock waited on : SYSTABAUTH Schema of lock waited on : SYSIBM Type of lock: Row Mode of lock: U - Update Mode application requested on lock: NW - Next Key Weak Exclusive Text : CREATE VIEW NEWTON.V1 AS SELECT * FROM NEWTON.T1 Table of lock waited on : SYSVIEWDEP Schema of lock waited on : SYSIBM Type of lock: Row Mode of lock: X - Exclusive Mode application requested on lock: S - Share Text : drop table NEWTON.T2 | |
Problem Summary: | |
**************************************************************** * USERS AFFECTED: * * All users of version 9.5 on Linux, Unix and Windows * * platforms. * **************************************************************** * PROBLEM DESCRIPTION: * * When concurrently perform DROP TABLE and CREATE VIEW on a * * view that references an underlying table that's different * * from the table getting dropped but with similar namings, the * * two statements may lead to a deadlock among the catalog * * tables, SYSIBM.SYSTABAUTH and SYSIBM.SYSVIEWDEP. * * The problem is more likely to happen if the table being * * dropped has dependent views and other objects (e.g. index or * * trigger) defined on it. * * * * To identify the problem, you need to use DB2 event monitor * * to collect detailed information for deadlocks. * * When the deadlock error occurs, in the event monitor output * * you will see the following entries: * * * * Table of lock waited on : SYSTABAUTH * * Schema of lock waited on : SYSIBM * * Type of lock: Row * * Mode of lock: U - Update * * Mode application requested on lock: NW - Next Key Weak * * Exclusive * * Text : CREATE VIEW NEWTON.V1 AS SELECT * FROM * * NEWTON.T1 * * * * Table of lock waited on : SYSVIEWDEP * * Schema of lock waited on : SYSIBM * * Type of lock: Row * * Mode of lock: X - Exclusive * * Mode application requested on lock: S - Share * * Text : drop table NEWTON.T2 * **************************************************************** * RECOMMENDATION: * * Upgrade to DB2 UDB Version 9.5 FixPak 9 or higher levels. * **************************************************************** | |
Local Fix: | |
Perform CREATE VIEW statement and DROP TABLE statement sequentially. | |
available fix packs: | |
DB2 Version 9.5 Fix Pack 9 for Linux, UNIX, and Windows | |
Solution | |
First fixed in DB2 UDB Version 9.5 FixPak 9. | |
Workaround | |
Perform CREATE VIEW statement and DROP TABLE statement sequentially. | |
BUG-Tracking | |
forerunner : APAR is sysrouted TO one or more of the following: IC76306 follow-up : | |
Timestamps | |
Date - problem reported : Date - problem closed : Date - last modified : | 18.04.2011 09.04.2012 09.04.2012 |
Problem solved at the following versions (IBM BugInfos) | |
9.0., 9.5. | |
Problem solved according to the fixlist(s) of the following version(s) | |
9.5.0.9 |