This topic contains examples of Database Trigger jobs that monitor IBM DB2 database tables.
Example: Monitor an IBM DB2 Database Table for Added Rows with a Trigger Condition
Suppose that you want a job to monitor the STAFF table for added rows. When the total number of rows is greater than or equal to 37, the job completes.
AGENT DB_AGENT USER entadm DB_URL jdbc:db2://10.1.4.131:50000/SAMPLE TRIG_TYPE INSERT TRIG_COND '(select count(*) from STAFF)>=37' TABLE_NAME STAFF
Example: Monitor an IBM DB2 Database Table for Changes
Suppose that you want to monitor the STAFF table for changes to the DEPT and JOB columns. The job runs on the DB_AGENT agent computer and connects to the SAMPLE database. The job runs under the entadm user and completes once DEPT or JOB is updated.
AGENT DB_AGENT USER entadm DB_URL jdbc:db2://10.1.4.131:50000/SAMPLE TABLE_NAME STAFF TRIG_TYPE 'UPDATE of DEPT, JOB'
|
Copyright © 2013 CA Technologies.
All rights reserved.
|
|