DB2 - Problem description
| Problem IC82199 | Status: Closed |
MON_GET_LOCKS DOES NOT SHOW INFORMATION WHEN USING <TABLE_SCHEMA> AND <TABLE_NAME> | |
| product: | |
DB2 FOR LUW / DB2FORLUW / 970 - DB2 | |
| Problem description: | |
Even though there are locks held on a table the MON_GET_LOCKS
table function shows no rows when queried using table_schema and
table_name.
To reproduce
- db2 "create table test.test (a char(3))"
- db2 +c "insert into test.test values('111')"
- db2 +c "select * from sysibmadm.locks_held where tabschema =
'TEST' and tabname = 'TEST' "
==> 2 locks
- db2 +c "select * from table
(MON_GET_LOCKS(CLOB('<table_schema>TEST</table_schema><table_nam
e>TEST</table_name>'),-1)) AS T "
==> none
The issue does not occur on Windows. | |
| Problem Summary: | |
**************************************************************** * USERS AFFECTED: * * ALL * **************************************************************** * PROBLEM DESCRIPTION: * * The wrong casting on passing the length of the table_name * * and table_schema to search in the catalogs, makes DB2 fail * * to find the table in the catalogs. * **************************************************************** * RECOMMENDATION: * * Upgrade to DB2 Version 9.7 and Fix Pack 7 * **************************************************************** | |
| Local Fix: | |
The following query will show the locks (Substitute schema and
table name appropriately)
db2 +c "select * from table(MON_GET_LOCKS(CLOB(''),-2)) where
tab_file_id = (select tableid from syscat.tables where
tabname='TEST' and tabschema='TEST')" | |
| available fix packs: | |
DB2 Version 9.7 Fix Pack 7 for Linux, UNIX, and Windows | |
| Solution | |
Problem was first fixed in DB2 Version 9.7 and Fix Pack 7 | |
| Workaround | |
not known / see Local fix | |
| BUG-Tracking | |
forerunner : APAR is sysrouted TO one or more of the following: IC87870 follow-up : | |
| Timestamps | |
Date - problem reported : Date - problem closed : Date - last modified : | 22.03.2012 20.10.2012 20.10.2012 |
| Problem solved at the following versions (IBM BugInfos) | |
9.7. | |
| Problem solved according to the fixlist(s) of the following version(s) | |
| 9.7.0.7 |
|