Many database administration tasks are best carried out systematically. For example, a regular backup procedure is an important part of proper database administration procedures.
You can automate routine tasks in Sybase IQ by adding an event to a database, and providing a schedule for the event. Whenever one of the times in the schedule passes, a sequence of actions called an event handler is executed by the database server.
Database administration also requires taking action when certain conditions occur. For example, it may be appropriate to e-mail a notification to a system administrator when a disk containing the transaction log is filling up, so that the administrator can handle the situation. These tasks can be automated by defining event handlers for one of a set of system events.
This chapter contains the following material:
An introduction to scheduling and event handling (this section).
Concepts and background information to help you design and use schedules and event handlers:
A discussion of techniques for developing event handlers:
Internals information:
Step by step instructions for how to carry out automation tasks.
To answer the question... |
Consider reading... |
---|---|
What is a schedule? |
|
What is a system event? |
|
What is an event handler? |
|
How do I debug event handlers? |
|
How does the database server use schedules to trigger event handlers? |
|
How can I schedule regular backups? |
For an example, see “Understanding schedules” |
What kind of system events can the database server use to trigger event handlers? |
“CREATE EVENT statement” in Chapter 6, “SQL Statements” of the Sybase IQ Reference Manual |
What connection do event handlers get executed on? |
|
How do event handlers get information about what triggered them? |
“EVENT_PARAMETER function [System]” in Chapter 5, “SQL Functions” of the Sybase IQ Reference Manual |