IBM Support

Fail to create or drop the same event monitor

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=4271
0

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.

[{"Product":{"code":"SSEPGG","label":"Db2 for Linux, UNIX and Windows"},"Business Unit":{"code":"BU058","label":"IBM Infrastructure w\/TPS"},"Component":"Performance - Event Monitor","Platform":[{"code":"PF002","label":"AIX"},{"code":"PF010","label":"HP-UX"},{"code":"PF016","label":"Linux"},{"code":"PF027","label":"Solaris"},{"code":"PF033","label":"Windows"}],"Version":"10.1;10.5;11.1;9.7","Edition":"","Line of Business":{"code":"LOB10","label":"Data and AI"}}]

Document Information

Modified date:
16 June 2018

UID

swg21988729