Create triggers on system events

System events are particular database states that can be used to fire a system trigger.
Is possibile to create triggers for these events at DATABASE or SCHEMA level.
When a triggering event occurs, the database will open an autonomous transaction scope, fire the trigger and commit any transaction imbedded in the trigger.
The available system events are:
AFTER STARTUP        Causes the DataBase to fire the trigger whenever the database is opened. This event is valid only with DATABASE, not with SCHEMA
BEFORE SHUTDOWN      Causes the DataBase to fire the trigger whenever an instance of the database is shut down. This event is valid only with DATABASE, not with SCHEMA
AFTER DB_ROLE_CHANGE In a Data Guard configuration, causes the database to fire the trigger whenever a role change occours from standby to primary or from primary
                     to standby. This event is valid only with DATABASE, not with SCHEMA
AFTER SERVERERROR    Causes the DataBase to fire the trigger whenever a servererror message is logged
AFTER LOGON          Causes the database to fire the trigger whenever a client application logs onto the database
BEFORE LOGOFF        Causes the database to fire the trigger whenever a client application logs off the database
AFTER SUSPEND        Causes the database to fire the trigger whenever a server error causes a transaction to be suspended

You may also like...

Leave a Reply

Your email address will not be published. Required fields are marked *