db2 => connect to dbname user username using password
db2 => update monitor switches using statement on
db2 => create event monitor rkmon for statements write to file '/tmp'
db2 => set event monitor rkmon state=1
but when I put command: create event monitor rkmon for statements write to file '/tmp' Db2 throw me an error:
"DB2ADMIN" does not have the privilege to perform operation "CREATE EVENT MONITOR".. SQLCODE=-552, SQLSTATE=42502, DRIVER=3.58.81
so, then i try add some privilege to my db2admin user:
connect to mydatabase user db2admin password xyz
grant DBADM to db2admin
but get another error:
The name "DBADM" cannot be used because the specified identifier is reserved for system use.. SQLCODE=-707, SQLSTATE=42939, DRIVER=3.58.8
So, i tried this one:
grant DBADM on mydatabase to user db2admin
but got error:
DB2ADMIN.MYDATABASE is an undefined name. SQLSTATE=42704
I understand this error like, I'm logged and "in" database so there is undenfiend name.
Now, I don't have any idea what shoould i do to resolve this problem.
Maybe, there is some othere way to logs sql queries sends to my db2 ?
(I develop some java apps using hibernate and db2, and sometimes quickest way to resolve some problem is see what sql queries is send to db).