Subject: EVENT: Full Event Syntax (from ksdp.c) Creation Date: 07-APR-1997 This is the full event specification syntax from ksdp.c These are the source code comments. /* The syntax of the event specification in init.ora and the SQL "ALTER SESSION SET EVENTS" DDL is described below. Event Specification Syntax: The parameter keyword name is "event", with its value of string type. The string value is typically quoted, and has the following syntax (white space separators are implicit throughout): {:}* where: is a symbolic name associated with the event, or optionally an event number. There is a special name: "immediate": immediate unconditional event, does not wait for somebody to post it. If a number is specified, it is taken to be an Oracle error number. If a name is specified, the parser looks it up in an event name table if it is not "immediate". is: where: is: "trace"|"debugger"|"crash" is: {,}* Qualifier syntax depends on the action, as follows: Action "crash": "" (nothing, use all defaults) | "off" (disable crash action for this event) | "after times" (crash after occurrences of this event) Action "debugger": "" (nothing, use all defaults) | "off" (disable debugger invocation action for this event) | "after times" (start invoking debugger on this event after occurrences of this event) | "forever" (once debugger is invoked, invoke each time event occurs) | "lifetime " (once debugger is invoked, invoke each time for successive ocurrences of this event, then disable debugger action for this event) Action "trace": {;}* : "name "{,}* : Symbolic name associated with an internal trace id which is used to associate a trace with a (context-independent) debug dump operation. A special trace name is "context", which means a context- specific trace which does not cause a debug dump operation to be invoked, but which instead returns to the caller who posted the event and informs it whether context tracing is active for that event, and if so, what the trace level is. The trace level is used internally by the dump routines to control the level of detail in the dump. By convention, the level of detail increases with the level number, with the lowest level being 1. The caller is then responsible for invoking whatever dump operation it wants to, with whatever parameters are relevant. Another special trace name is "all", which expands to mean all trace names that were declared at compile time through the "ksdtradv" macro, as well as the (last) "context" trace. If more than one trace is associated with an event, at most one can be "context". Correspondingly, the last action associated with an event posting is to return the level number associated with the context-dependent trace. The event numbers had better be unique among different callers. : "" (nothing, use all defaults) | "off" (disable this trace for current event) | "after times" (start doing this trace after occurrences of this event) | "forever" (once this trace is activated, activate it each time this event occurs) | "lifetime " (once this trace is activated, activate it each time for successive occurrences of this event, then disable this trace for this event) | "level " (when the trace is activated the first time, set its initial level to . Levels for subsequent activations are determined by the trace type specification below) | "type " (how to modify trace level) : "increment" (increment level up to ceiling) | "decrement" (decrement level down to 0 and disable) | "constant" (no change in level) Defaults: (a) action "crash" No delay specified - delay of 0 ie. on first event. (b) action "debugger" No delay specified - delay of 0 ie. on first event. No lifetime specified - lifetime of 1. (c) action "trace" No delay specified - delay of 0 ie. on first event. No lifetime specified - lifetime of 1. No level specified - level of 1 (terse). No type specified - type "constant" Additionally, for trace specifications, one can specify an event named "immediate" which is interpreted to mean don't wait for an event before doing the trace. For this case, no trace qualifiers except the trace level qualifier must be specified. The lifetime of the trace is implicitly 1. A duplicate event specification with the same action supercedes the old specification. Specifications of different actions for the same event may coexist, with the action taken according to the following precedence: 1. context-independent traces in order of declaration. 2. context-specific trace. 3. debugger call. 4. Oracle crash. Examples: 1. endtransaction crash after 3 times 2. searchloop debugger lifetime 10 3. aborttransaction crash off 4. fatalbug trace name statetree forever,type increment; \ name freelist lifetime 10, after 10 times 5. immediate trace name cachebufs level 2; name locks; \ name tree level7 6. 2134 trace name context level 3, after 3 times, forever 7. 1 trace name all:2 debug after 2 times:2 trace name context NOTE: none of the debug facilities are available until after process has actually initialized its fixed-PGA-part (which will happen at connect time). */