DB2 - Problem description
| Problem IC87870 | Status: Closed |
MON_GET_LOCKS DOES NOT SHOW INFORMATION WHEN USING <TABLE_SCHEMA> AND <TABLE_NAME> | |
| product: | |
DB2 FOR LUW / DB2FORLUW / A10 - 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: * * See Error Description * **************************************************************** * RECOMMENDATION: * * Upgrade to DB2 Version 10.1 and Fix Pack 2 * **************************************************************** | |
| 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 10.1 Fix Pack 2 for Linux, UNIX, and Windows | |
| Solution | |
Problem was first fixed in DB2 Version 10.1 and Fix Pack 2 | |
| Workaround | |
not known / see Local fix | |
| Timestamps | |
Date - problem reported : Date - problem closed : Date - last modified : | 04.11.2012 17.12.2012 17.12.2012 |
| Problem solved at the following versions (IBM BugInfos) | |
| Problem solved according to the fixlist(s) of the following version(s) | |
| 10.1.0.2 |
|
| 10.5.0.2 |
|