If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > Database Server Software > DB2 > DB2 creating event monitor.

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 10-31-10, 03:48
db2_9 db2_9 is offline
Registered User
 
Join Date: Oct 2010
Posts: 3
DB2 creating event monitor.

Hello,

I'd like to create event monitor on DB2 z/OS 9.2 i have spent a lot of time trying resolve this problem.

So i suggest this link: Tuning DB2 Universal Database Using the Statement Event Monitor

and trying to make this steps:

Code:
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:

Code:
"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:

Code:
connect to mydatabase user db2admin password xyz
Code:
grant DBADM to db2admin
but get another error:

Code:
The name "DBADM" cannot be used because the specified identifier is reserved for system use.. SQLCODE=-707, SQLSTATE=42939, DRIVER=3.58.8
1

So, i tried this one:

Code:
grant DBADM on mydatabase to user db2admin
but got error:

Code:
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).

Any ideas ?

Thanks
Reply With Quote
  #2 (permalink)  
Old 10-31-10, 09:52
n_i n_i is offline
:-)
 
Join Date: Jun 2003
Location: Toronto, Canada
Posts: 4,449
Quote:
Originally Posted by db2_9 View Post

I'd like to create event monitor on DB2 z/OS 9.2 i have spent a lot of time trying resolve this problem.
No wonder, as there is no such thing in DB2 for z/OS. I don't think there was version 9.2 either.

Apart from using DB2 monitoring tools (DB2 V9.1 - Monitoring and tuning DB2 performance), you could capture your SQL queries in Optim Development Studio or by enabling the JDBC trace (DB2 V9.1 - Java - Example of using configuration properties to start a JDBC trace).
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On