472,989 Members | 3,105 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 472,989 software developers and data experts.

event monitor for statements

Raj
Can we create an event monitor for statements in a partitioned
environment?
CREATE EVENT MONITOR stmt_event FOR STATEMENTS WRITE TO FILE
'/home/rajm/event' ON PARTITION 0 GLOBAL
DB21034E The command was processed as an SQL statement because it was
not a
valid Command Line Processor command. During SQL processing it
returned:
SQL0628N Multiple or conflicting keywords involving the "GLOBAL"
clause are
present. SQLSTATE=42613

Thanks,
Raj

Jun 16 '06 #1
4 6093
Raj wrote:
Can we create an event monitor for statements in a partitioned
environment?
CREATE EVENT MONITOR stmt_event FOR STATEMENTS WRITE TO FILE
'/home/rajm/event' ON PARTITION 0 GLOBAL
DB21034E The command was processed as an SQL statement because it was
not a
valid Command Line Processor command. During SQL processing it
returned:
SQL0628N Multiple or conflicting keywords involving the "GLOBAL"
clause are
present. SQLSTATE=42613

PARTITION 0 and GLOBAL ?

--
Serge Rielau
DB2 Solutions Development
IBM Toronto Lab

IOD Conference
http://www.ibm.com/software/data/ond...ness/conf2006/
Jun 16 '06 #2
Raj
Thanks for the reply
write to table works fine i guess it is global by default, I tried the
following this fails too..
CREATE EVENT MONITOR stmt_event FOR statements WRITE TO FILE
'/filesys/sql/snap' GLOBAL
DB21034E The command was processed as an SQL statement because it was
not a
valid Command Line Processor command. During SQL processing it
returned:
SQL0628N Multiple or conflicting keywords involving the "GLOBAL"
clause are
present. SQLSTATE=42613
From the sql reference..

ON DBPARTITIONNUM
Keyword that indicates that a specific database partition is specified.
db-partition-number
Specifies a database partition number where the event monitor runs
and writes the events. With the monitoring scope defined as
GLOBAL, all database partitions report to the specified database
partition number. The I/O component will physically run on the
specified database partition, writing its records to the file or pipe
specified above.
GLOBAL
The event monitor reports on all database partitions. For a partitioned
database in DB2 Universal Database Version 8, only deadlocks and
deadlocks with details event monitors can be defined as GLOBAL.
LOCAL
The event monitor reports only on the database partition that is
running.
It gives a partial trace of the database activity. This is the default.
example:
2. Specify if the event monitor data is to be collected at a local or
global
scope. To collect event monitor reports from all partitions issue the
following statement:
CREATE EVENT MONITOR dlmon FOR DEADLOCKS
WRITE TO FILE '/tmp/dlevents'
ON PARTITION 3 GLOBAL

Jun 17 '06 #3
Raj:

The definition is clear. For STATEMENTS you cannot use GLOBAL Key word.
GLOBAL
The event monitor reports on all database partitions. For a partitioned
database in DB2 Universal Database Version 8, only deadlocks and
deadlocks with details event monitors can be defined as GLOBAL.
LOCAL
The event monitor reports only on the database partition that is
running. It gives a partial trace of the database activity. This is the
default.

I ran this and it works well.

SET EVENT MONITOR dlmon2 STATE = 0;

DROP EVENT MONITOR dlmon2;

CREATE EVENT MONITOR dlmon2 FOR STATEMENTS WRITE TO FILE '/local/udb
/SAULB022/archive/SAACCNT/event_monitor/' BUFFERSIZE 8 BLOCKED
AUTOSTART;

SET EVENT MONITOR dlmon2 STATE = 1;
Cheers...
Shashi Mannepalli

Raj wrote:
Thanks for the reply
write to table works fine i guess it is global by default, I tried the
following this fails too..
CREATE EVENT MONITOR stmt_event FOR statements WRITE TO FILE
'/filesys/sql/snap' GLOBAL
DB21034E The command was processed as an SQL statement because it was
not a
valid Command Line Processor command. During SQL processing it
returned:
SQL0628N Multiple or conflicting keywords involving the "GLOBAL"
clause are
present. SQLSTATE=42613
From the sql reference..

ON DBPARTITIONNUM
Keyword that indicates that a specific database partition is specified.
db-partition-number
Specifies a database partition number where the event monitor runs
and writes the events. With the monitoring scope defined as
GLOBAL, all database partitions report to the specified database
partition number. The I/O component will physically run on the
specified database partition, writing its records to the file or pipe
specified above.
GLOBAL
The event monitor reports on all database partitions. For a partitioned
database in DB2 Universal Database Version 8, only deadlocks and
deadlocks with details event monitors can be defined as GLOBAL.
LOCAL
The event monitor reports only on the database partition that is
running.
It gives a partial trace of the database activity. This is the default.
example:
2. Specify if the event monitor data is to be collected at a local or
global
scope. To collect event monitor reports from all partitions issue the
following statement:
CREATE EVENT MONITOR dlmon FOR DEADLOCKS
WRITE TO FILE '/tmp/dlevents'
ON PARTITION 3 GLOBAL


Jun 19 '06 #4
Raj
Thanks a lot...
Shashi Mannepalli wrote:
Raj:

The definition is clear. For STATEMENTS you cannot use GLOBAL Key word.
GLOBAL
The event monitor reports on all database partitions. For a partitioned
database in DB2 Universal Database Version 8, only deadlocks and
deadlocks with details event monitors can be defined as GLOBAL.
LOCAL
The event monitor reports only on the database partition that is
running. It gives a partial trace of the database activity. This is the
default.

I ran this and it works well.

SET EVENT MONITOR dlmon2 STATE = 0;

DROP EVENT MONITOR dlmon2;

CREATE EVENT MONITOR dlmon2 FOR STATEMENTS WRITE TO FILE '/local/udb
/SAULB022/archive/SAACCNT/event_monitor/' BUFFERSIZE 8 BLOCKED
AUTOSTART;

SET EVENT MONITOR dlmon2 STATE = 1;
Cheers...
Shashi Mannepalli

Raj wrote:
Thanks for the reply
write to table works fine i guess it is global by default, I tried the
following this fails too..
CREATE EVENT MONITOR stmt_event FOR statements WRITE TO FILE
'/filesys/sql/snap' GLOBAL
DB21034E The command was processed as an SQL statement because it was
not a
valid Command Line Processor command. During SQL processing it
returned:
SQL0628N Multiple or conflicting keywords involving the "GLOBAL"
clause are
present. SQLSTATE=42613
From the sql reference..

ON DBPARTITIONNUM
Keyword that indicates that a specific database partition is specified.
db-partition-number
Specifies a database partition number where the event monitor runs
and writes the events. With the monitoring scope defined as
GLOBAL, all database partitions report to the specified database
partition number. The I/O component will physically run on the
specified database partition, writing its records to the file or pipe
specified above.
GLOBAL
The event monitor reports on all database partitions. For a partitioned
database in DB2 Universal Database Version 8, only deadlocks and
deadlocks with details event monitors can be defined as GLOBAL.
LOCAL
The event monitor reports only on the database partition that is
running.
It gives a partial trace of the database activity. This is the default.
example:
2. Specify if the event monitor data is to be collected at a local or
global
scope. To collect event monitor reports from all partitions issue the
following statement:
CREATE EVENT MONITOR dlmon FOR DEADLOCKS
WRITE TO FILE '/tmp/dlevents'
ON PARTITION 3 GLOBAL


Jun 19 '06 #5

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: Jian Chen | last post by:
System with DB2 UDB V8.1 occasionally generates an event log file (db2eventlog.000) that resides at the directory of db2diag.log. Can anybody shed some light on what the file is used for, and how...
2
by: JS | last post by:
I have v8.1 fix5 using Win2k AS on 7 node logical system. I create event monitor writing to file and turn it on. Using application, I connect to db and navigate from screen to screen, generating...
1
by: Rohit Raghuwanshi | last post by:
Hello all, we are running a delphi application with DB2 V8.01 which is causing deadlocks when rows are being inserted into a table. Attaching the Event Monitor Log (DEADLOCKS WITH DETAILS) here....
1
by: jbaker | last post by:
I have run an statement event monitor and am digging through the data it produced. Some of the rows in the stmt table have me perplexed. These records have a stmt_text that is blank with a...
4
by: yoyo | last post by:
Is there any way in DB2 to get the exact command. I have an event monitor I created for statments, and all the statment values are filled with a question mark. I was using this at another site...
2
by: nekiv90 | last post by:
Greetings, How can 'rows read' from a DB2 CALL statement incur so many reads? I would expect it to be zero. Could someone enlighten me on this? Thanks! Here is output from executing event...
1
by: Jo | last post by:
Hi. I have a few questions regd event monitoring. Would appreciate some assistance with this. 1. Does the event monitor only insert data into the event monitoring tables once the connection has...
1
by: vijay.db | last post by:
Hi group, Have a problem with event monitor so my db2diag.log is getting filled like any thing.. Running DB2 V8.1 Fixpack 6 in AIX server. Created a event monitor and redirecting it's...
0
by: okonita | last post by:
Hi all, I am attempting to create a event monitor and comming up with error. Here's my statement that is failing: "db2 create event monitor afcarprd for statements, tables, transactions write to...
0
by: lllomh | last post by:
Define the method first this.state = { buttonBackgroundColor: 'green', isBlinking: false, // A new status is added to identify whether the button is blinking or not } autoStart=()=>{
0
tracyyun
by: tracyyun | last post by:
Hello everyone, I have a question and would like some advice on network connectivity. I have one computer connected to my router via WiFi, but I have two other computers that I want to be able to...
2
by: giovanniandrean | last post by:
The energy model is structured as follows and uses excel sheets to give input data: 1-Utility.py contains all the functions needed to calculate the variables and other minor things (mentions...
1
by: Teri B | last post by:
Hi, I have created a sub-form Roles. In my course form the user selects the roles assigned to the course. 0ne-to-many. One course many roles. Then I created a report based on the Course form and...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 1 Nov 2023 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM) Please note that the UK and Europe revert to winter time on...
3
by: nia12 | last post by:
Hi there, I am very new to Access so apologies if any of this is obvious/not clear. I am creating a data collection tool for health care employees to complete. It consists of a number of...
0
NeoPa
by: NeoPa | last post by:
Introduction For this article I'll be focusing on the Report (clsReport) class. This simply handles making the calling Form invisible until all of the Reports opened by it have been closed, when it...
0
isladogs
by: isladogs | last post by:
The next online meeting of the Access Europe User Group will be on Wednesday 6 Dec 2023 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, Mike...
3
SueHopson
by: SueHopson | last post by:
Hi All, I'm trying to create a single code (run off a button that calls the Private Sub) for our parts list report that will allow the user to filter by either/both PartVendor and PartType. On...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.