Troubleshooting
Problem
Dropping the event monitor returns error SQL204N "undefined name", and creating the event monitor fails with SQL0601N the event monitor already exists.
Symptom
1. Dropping the event monitor fails with SQL0204N error:
$ db2 drop EVENT MONITOR evmon1
DB21034E The command was processed as an SQL statement because it was not a
valid Command Line Processor command. During SQL processing it returned:
SQL0204N "EVMON1" is an undefined name. SQLSTATE=42704
2. Creating the event monitor fails with SQL0601N error:
CREATE EVENT MONITOR evmon1 FOR STATEMENTS WRITE TO FILE '/evtmon/evmon1'
DB21034E The command was processed as an SQL statement because it was not a
valid Command Line Processor command. During SQL processing it returned:
SQL0601N The name of the object to be created is identical to the existing
name "EVMON1" of type "EVENT MONITOR". SQLSTATE=42710
Cause
There is inconsistence in system catalog table. The event monitor name should exist in both SYSIBM.SYSEVENTS and SYSIBM.SYSEVENTMONITORS. If it only exists in one system catalog table, you may see the above error. For example,
select substr(name,1,35) as name from SYSIBM.SYSEVENTS
NAME
-----------------------------------
DB2DETAILDEADLOCK
select substr(name,1,35) as name from SYSIBM.SYSEVENTMONITORS
NAME
-----------------------------------
EVMON1
DB2DETAILDEADLOCK
In the above, EVMON1 is missing in the SYSIBM.SYSEVENTS.
Resolving The Problem
Restore the database backup to resolve the issue. Alternatively you may engage IBM Support for further assistance.
Was this topic helpful?
Document Information
Modified date:
16 June 2018
UID
swg21988729