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.
[@more@]來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/34596/viewspace-780679/,如需轉載,請註明出處,否則將追究法律責任。
相關文章
- Database Triggers and event attributes--Database System Events【Blog 搬家】Database
- Database Triggers and event attributes--DDL/Client EventsDatabaseclient
- Database Triggers and event attributes--DDL/Client Events【Blog 搬家】Databaseclient
- Oracle System Event TriggersOracle
- Database Triggers and event attributes--Event AttributesDatabase
- alter system events與alter system event的區別
- Database Triggers and event attributes--IntroductionDatabase
- Database Triggers and event attributes--Event Attributes【Blog 搬家】Database
- alter system set event和set events的區別
- Database Triggers and event attributes--Introduction[Blog 搬家]Database
- alter session|system set eventsSession
- v$system_event解析
- 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
- oracle Database Event trace 設定OracleDatabase
- v session_wait v session_event v system_eventSessionAI
- v$session_event , v$system_event , v$session_waitSessionAI
- V$SYSTEM_EVENT等使用詳解
- How To List All The Named Events Set For A Database [ID 436036.1]Database
- alter system set events相關知識(轉帖2)
- alter system set events相關知識(轉帖1)
- the program list about oracle database in SAP systemOracleDatabase
- Database System Concepts(Fourth Edition)Database
- Database links of distributed oracle systemDatabaseOracle
- How To List All The Named Events Set For A Database (Doc ID 436036.1)Database
- oracle Database Event trace 設定【Blog 搬家】OracleDatabase
- 執行node提示:events.js:160 throw er; // Unhandled 'error' eventJSError
- zt_關於wait events asynch descriptor resize_wait eventAI
- Oracle Database 11gR2引入的DBFS(Database File System)OracleDatabase
- Tasks of a Database Administrator : Enroll System Users (12)Database
- wait event_Additional Statistics_that do not have corresponding wait eventsAI
- 學習動態效能表(18)--V$SYSTEM_EVENT
- 幾個重要檢視(V$SYSTEM_EVENT V$SESSION_EVENT V$SESSION_WAIT)SessionAI
- The Database Administrator's Operating System Account (25)Database