This section contains the following topics:
How Database Trigger Jobs Differ from Database Monitor Jobs
Defining Database Monitor Jobs
Defining Database Stored Procedure Jobs
Defining Database Trigger Jobs
Database jobs let you automate common database tasks on Oracle, Microsoft SQL Server, and IBM DB2 databases.
Note: To run these jobs, your system requires CA WA Agent for UNIX, Linux, or Windows and CA WA Agent for Databases.
You can define the following database jobs:
Lets you monitor for an increase or decrease in the number of rows in a database table.
Lets you run a stored procedure.
Lets you monitor for added, deleted, and updated rows in a database table.
Lets you execute an SQL statement.
You can monitor database tables using Database Monitor or Database Trigger jobs.
A Database Monitor job can monitor a database table for an increase or decrease in the number of rows. To monitor the database for specific changes, you can add a monitor condition to the job definition. Database Monitor jobs count the number of rows that satisfy the monitor condition using a polling interval, which is every 10 seconds by default. Database Monitor jobs do not detect other updates to a row or changes to the number of rows that cancel each other out during the polling interval. For example, suppose that within a 10-second interval, a row is added while another row is deleted. Since the total number of rows did not change, the Database Monitor job does not detect the row addition and deletion.
Alternatively, a Database Trigger job can monitor a database table for added rows, deleted rows, or updated rows. To monitor the database for specific changes, you can add a trigger condition to the job definition. Each Database Trigger job creates a database trigger on the database. The database trigger templates that the agent uses are located in the directory where the agent is installed. The template files are named dbtrigdatabase_type.properties, for example, dbtrigOracle.properties. Contact your database administrator before choosing to use a Database Trigger job.
For either job type, you can set up continuous monitoring so that each time a database change occurs, an alert or an event is triggered.
Note: Not all scheduling managers support alerts and events.
Important! You should not drop a table that is being referenced by either a Database Monitor or a Database Trigger job. The job will remain active, even though the table has been dropped.
|
Copyright © 2013 CA Technologies.
All rights reserved.
|
|