Oracle8i Application Developer's Guide - Fundamentals Release 2 (8.1.6) Part Number A76939-01 |
|
System events, like LOGON
and SHUTDOWN
, provide a mechanism for tracking system changes. Oracle lets you combine this tracking with database event notification, which provides a simple and elegant method of delivering asynchrononous messaging to an application.
This chapter includes descriptions of the various events on which triggers can be created. It also provides the list of event attribute functions.
See Also:
To use the information in this chapter, you need to understand Chapter 12, "Using Triggers". |
You can obtain certain event-specific attributes when a trigger is fired. These attributes can be used as standalone functions.
CATPROC
.SQL
script.
Resource manager events are related to instance startup and shutdown.Triggers created on resource manager events must be associated with the database object.
Table 13-2 contains a list of resource manager events.
Client events are the events related to user logon/logoff, DML, and DDL operations. For example:
CREATE OR REPLACE TRIGGER On_Logon AFTER LOGON ON The_user.Schema BEGIN Do_Something; END;
The LOGON and LOGOFF events allow simple conditions on UID
( ) and USER
( ). All other events allow simple conditions on the type and name of the object, as well as functions like UID( ) and USER( ).
The LOGON event starts a separate transaction and commits it after firing the triggers. All other events fire the triggers in the existing user transaction.
The LOGON and LOGOFF events can operate on any objects. For all other events, the corresponding trigger cannot perform any DDL operations, such as DROP and ALTER, on the object that caused the event to be generated.
The DDL allowed inside these triggers is altering, creating, or dropping a table, creating a trigger, and compile operations.
If an event trigger becomes the target of a DDL operation (such as CREATE TRIGGER), it cannot be fired later during the same transaction
Table 13-3 contains a list of client events.
|
![]() Copyright © 1996-2000, Oracle Corporation. All Rights Reserved. |
|