Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion Groups
Database Servers
DB2InformixIngresMS SQLOraclePervasive.SQLPostgreSQLProgressSybase
Desktop Databases
FileMakerFoxProMS AccessParadox
General
General DB TopicsDatabase Theory
Related Topics
Java Development.NET DevelopmentVB DevelopmentMore Topics ...

Database Forum / DB2 Topics / June 2006

Tip: Looking for answers? Try searching our database.

event monitor for statements

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Raj - 16 Jun 2006 16:38 GMT
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
Serge Rielau - 16 Jun 2006 22:29 GMT
> Can we create an event monitor for statements in a partitioned
> environment?
[quoted text clipped - 8 lines]
> clause are
> present.  SQLSTATE=42613
PARTITION 0 and GLOBAL ?

Signature

Serge Rielau
DB2 Solutions Development
IBM Toronto Lab

IOD Conference
http://www.ibm.com/software/data/ondemandbusiness/conf2006/

Raj - 17 Jun 2006 17:33 GMT
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
Shashi Mannepalli - 19 Jun 2006 15:41 GMT
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

> Thanks for the reply
> write to table works fine i guess it is global by default, I tried the
[quoted text clipped - 37 lines]
> WRITE TO FILE '/tmp/dlevents'
> ON PARTITION 3 GLOBAL
Raj - 19 Jun 2006 17:39 GMT
Thanks a lot...
> Raj:
>
[quoted text clipped - 65 lines]
> > WRITE TO FILE '/tmp/dlevents'
> > ON PARTITION 3 GLOBAL
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2009 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.