Database Triggers and event attributes--Database System Events【Blog 搬家】
Database Triggers and event attributes--Database System Events
There are six database system event triggers. The six database system event triggers are outlined below, along with a description and the event attributes that are set for each event.
Database Trigger |
BEFORE/AFTER Execution |
Description |
Attribute Event |
LOGOFF |
BEFORE |
Executed when a user logs off, at the start of the logoff process |
ora_sysevent ora_login_user ora_instance_num ora_database_name |
LOGON |
AFTER |
Executed when a user logs into the database, after a successful login of the user |
ora_sysevent ora_login_user ora_instance_num ora_database_name ora_client_ip_address |
STARTUP |
AFTER |
Executed when the database is opened; starts a separate transaction and commits after this trigger is complete |
ora_sysevent ora_login_user ora_instance_num ora_database_name
|
SHUTDOWN |
BEFORE |
Executed when the instance is shutdown; prior to the shutdown of the instance process; not always executed on abnormal shutdown; starts a separate transaction and commits after this trigger is complete |
ora_sysevent ora_login_user ora_instance_num ora_database_name
|
SERVERERROR |
AFTER |
Executes when an Oracle error occurs (can check for a specific error number to only execute for (errno=eno)); does not execute for certain errors (1034, 1403, 1422, 1423, 4030); starts a separate transaction and commits after this trigger is complete |
ora_sysevent ora_login_user ora_instance_num ora_database_name ora_server_error ora_is_servererror space_error_info |
SUSPEND |
AFTER |
Executed whenever a server error causes a transaction to be suspended (example: out-of-space error) |
ora_sysevent ora_login_user ora_instance_num ora_database_name ora_server_error ora_is_servererror space_error_info |
The startup and shutdown triggers can only be created at the database level. The other four database system events can be created at the database or schema levels. The STARTUP trigger returns a success, even if the trigger fails.
The SERVERERROR trigger does not execute when the following Oracle errors are returned:
· ORA-01403: data not found
· ORA-01422: exact fetch returns more than requested number of rows
· ORA-01423: error encountered while checking for extra rows in exact fetch
· ORA-01034: ORACLE not available
· ORA-04030: out of process memory
For these triggers, Oracle opens an autonomous transaction scope, fires the trigger, and commits any separate transaction.
來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/34596/viewspace-661921/,如需轉載,請註明出處,否則將追究法律責任。
相關文章
- Database Triggers and event attributes--Database System EventsDatabase
- Database Triggers and event attributes--DDL/Client Events【Blog 搬家】Databaseclient
- Database Triggers and event attributes--Event Attributes【Blog 搬家】Database
- Database Triggers and event attributes--Introduction[Blog 搬家]Database
- oracle Database Event trace 設定【Blog 搬家】OracleDatabase
- Database Triggers and event attributes--DDL/Client EventsDatabaseclient
- Oracle System Event TriggersOracle
- float datatype in Oracle database 【Blog 搬家】OracleDatabase
- Database Triggers and event attributes--Event AttributesDatabase
- Oracle Database Link Problems【Blog 搬家】OracleDatabase
- HP -Data Protector Restore file system【Blog 搬家】REST
- alter system events與alter system event的區別
- Oracle event 10231 【Blog 搬家】Oracle
- Database Triggers and event attributes--IntroductionDatabase
- Database Link 建立注意的兩點【Blog 搬家】Database
- alter system set event和set events的區別
- Oracle backgroud Process【Blog 搬家】Oracle
- alter session|system set eventsSession
- oracle Distinct|Unique 異同【Blog 搬家】Oracle
- Oracle DDL 執行過程【Blog 搬家】Oracle
- V$SESSION_LONGOPS bug 【Blog 搬家】SessionGo
- 限制End User Session數量 【Blog 搬家】Session
- Trim() 函式的介紹【Blog 搬家】函式
- Oracle Date Function 講解和事例【Blog 搬家】OracleFunction
- ora -03232 問題解決【Blog 搬家】
- oracle ora-00997 problems【Blog 搬家】Oracle
- v$system_event解析
- RMAN 只備份當前資料?【Blog 搬家】
- alter system set events 相關知識
- alter system set events 知識 [final]
- alter system set events相關知識:
- alter system set events相關知識
- 【Oracle】alter system set events 相關知識Oracle
- mysql的mysql.event和information_schema.eventsMySqlORM
- exp/imp expdp/impdp Tables 萬用字元 % 的使用【Blog 搬家】字元
- Oracle Optimizer -RBO (理解Rule-based 優化器)【Blog 搬家】Oracle優化
- oracle Database Event trace 設定OracleDatabase
- 資料庫加密Product_user_profile(PUP) TABLE FOR security 【Blog 搬家】資料庫加密