What is a database EVENT and how does one set events?
Oracle trace events are useful for debugging the Oracle database server.
The following two examples are simply to demonstrate syntax. Refer to later notes on this page for an explanation of what these particular events do.
Events can be activated by either adding them to the INIT.ORA parameter file. E.g.:
event=’1401 trace name errorstack, level 12′ … or, by issuing an ALTER SESSION SET EVENTS command: E.g.
alter session set events ‘10046 trace name context forever, level 4’;
Frequently Used Events:
10046 trace name context forever, level 4 | Trace SQL statements and show bind variables in trace output. |
10046 trace name context forever, level 8 | Shows wait events in the SQL trace files |
10046 trace name context forever, level 12 | Shows both bind variable names and wait events in the SQL trace files |
1401 trace name errorstack, level 12, 1401 trace name errorstack, level 4 , 1401 trace name processstate |
Dumps out trace information if an ORA-1401 “inserted value too large for column” error occurs. The 1401 can be replaced by any other Oracle Server error code that you want to trace. |
60 trace name errorstack level 10 | Show where in the code Oracle gets a deadlock (ORA-60), and may help to diagnose the problem. |
10210 trace name context forever, level 10 ,10211 trace name context forever, level 10 ,10231 trace name context forever, level 10 | These events prevent database block corruptions |
10049 trace name context forever, level 2 | Memory protect cursor |
10210 trace name context forever, level 2 | Data block check |
10211 trace name context forever, level 2 | Index block check |
10235 trace name context forever, level 1 | Memory heap check |
10262 trace name context forever, level 300 | Allow 300 bytes memory leak for connections |
Where to find Event Numbers ?
Event numbers can be found in $ORACLE_HOME/rdbms/mesg/oraus.msg
cd $ORACLE_HOME/rdbms/mesg
vi oraus.msg
/10015
10015, 00000, “Undo Segment Recovery”
// *Cause:
// *Action:
Leave a Reply
You must be logged in to post a comment.