Question & Answer
Question
How to log SQL without changing Maximo logging level.
Answer
Run the following statements from DB2 Command Line to create an event monitor for SQL statements and turn it on:
db2 update monitor switches using STATEMENT ON;
db2 CREATE EVENT MONITOR evtmon_issue
FOR STATEMENTS
WHERE AUTH_ID = 'MAXIMO'
WRITE TO FILE 'c:\global' ( any directory can be specified )
MAXFILES 5
MAXFILESIZE 1024
NONBLOCKED
APPEND;
db2 set event monitor evtmon_issue state 1;
Run Maximo process you would like to get SQL captured for. Afterwards, turn off the event monitor:
db2 set event monitor evtmon_issue state 0;
Format the output and write to a txt file:
db2evmon -path c:\global > c:\MaximoSQL.txt
and drop the event monitor:
db2 drop event monitor evtmon_issue;
db2 update monitor switches using STATEMENT OFF;
[{"Product":{"code":"SSLKT6","label":"IBM Maximo Asset Management"},"Business Unit":{"code":"BU059","label":"IBM Software w\/o TPS"},"Component":"--","Platform":[{"code":"PF002","label":"AIX"},{"code":"PF016","label":"Linux"},{"code":"PF033","label":"Windows"}],"Version":"6.2.1;6.2.2;6.2.3;6.2.4;6.2.5;6.2.6;6.2.7;6.2.8;7.1;7.1.1;7.5;7.6","Edition":"All Editions","Line of Business":{"code":"LOB59","label":"Sustainability Software"}}]
Was this topic helpful?
Document Information
Modified date:
17 June 2018
UID
swg21605339