标题: 如何在pfile中设置多个event 参数 [打印本页] 作者: 郑全 时间: 2016-4-19 13:05 标题: 如何在pfile中设置多个event 参数 How to Set Multiple Events in INIT.ORA
PURPOSE
-------
How do you set multiple events in the init.ora file?
OVERVIEW
--------
If you have to set more than one event in the init.ora, how can
you specify multiple events on the same line?
HOW TO SET MULTIPLE EVENTS IN INIT.ORA FILE
-------------------------------------------
The syntax to specify multiple events in the init.ora is:
event="<event 1>:<event 2>: <event 3>: <event n>"
you can also split the events on multiple lines by using the continuation
"\" backslash character at the end of each event and continue the next
event on the next line.
Such As:
For Example:
event="\
10210 trace name context forever, level 10:\
10211 trace name context forever, level 10:\
10231 trace name context forever, level 10:\
10232 trace name context forever, level 10"
After setting the events, bounce the instance and be sure to check
the alert.log and verify if the events are in effect.
The alert.log should show the events that are in effect, for example:
System parameters with non-default values:
...
event = "10210 trace name context forever, level 10:10211 trace name
context forever, level 10:10231 trace name context forever, level
10:10232 trace name context forever, level 10"
...
It is also possible to set multiple events in multiple subsequent lines in the init.ora, e.g.
event="10210 trace name context forever, level 10"
event="10211 trace name context forever, level 10"
event="10231 trace name context forever, level 10"
Note that using the separate lines it is essential to set the events on subsequent lines.
Otherwise, only the last event will be used due to the generic parsing of the init.ora values.
NOTE:
=====
For current Oracle versions. e.g. 11g, you can also use the next commands
to list the set event in a trace file:
SQL> alter session set events 'immediate eventdump(session)';
SQL> alter system set events 'immediate eventdump(system)';
Please note that from 11g the alter system set events also affects all current sessions, and not only the new ones.
References
NOTE:160178.1 - How To Set EVENTS In The SPFILE