List of Database Events
System Events
System events are related to entire instances or schemas, not individual tables or rows. Triggers created on startup and shutdown events must be associated with the database instance. Triggers created on error and suspend events can be associated with either the database instance or a particular schema.
Table 10-2 contains a list of system manager events.
Table 10-2 System Manager Events
Client 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 10-3 contains a list of client events.
No hay comentarios:
Publicar un comentario