<

How to set multiple events in Oracle

Published on
22,112 Points
19,012 Views
1 Endorsement
Last Modified:
A quick example on how to set multiple events.
(For example, you are asked by Oracle support to set an event and you already have one that you want to keep)

In the spfile:
the name is 'event' and values are quoted then comma separated as in:
 
ALTER SYSTEM SET event='10235 trace name context forever, 
level 2','27072 trace name errorstack level 3' COMMENT='TEST' SCOPE=SPFILE;

Open in new window

If bad syntax, you will get ORA-2194 at next database restart, so double check and copy old spfile just in case.

You can remove all events with:
 
ALTER SYSTEM RESET EVENT SCOPE=SPFILE SID='*' ;

Open in new window


In memory:
the name is 'events' and values are column-separated then quoted as in:
 
ALTER SYSTEM SET events='10235 trace name context forever, 
level 2:27072 trace name errorstack level 3';

Open in new window


In the pfile:

- the name is 'event' and values are column-separated then quoted as in:
event='10235 trace name context forever, level 2:27072 trace name errorstack level 3'

- or set parameters one by one (must follow eachother):
event='10235 trace name context forever, level 2'
event='27072 trace name errorstack level 3'


 
{ alter system set event = | alter session set events [=] } 
"<dbg_evt> trace name context {forever, level <n> | off}"

alter session set events [=] {
"immediate trace name 
{ heapdump | blockdump | treedump | controlf | systemstate | buffers } level <n>"
| "<oerr> trace name errorstack level <n> [; name processstate level <n>]"
}

{ alter system set event = | alter session set events [=] } 
"<dbg_evt> trace name context {forever, level <n> | off}"

alter session set events [=] {
"immediate trace name 
{ heapdump | blockdump | treedump | controlf | systemstate | buffers } level <n>" 
| "<oerr> trace name errorstack level <n> [; name processstate level <n>]"
}

Open in new window

1
Comment
1 Comment
 

Expert Comment

by:Nenad Noveljic
Useful information. Thanks.
0

Featured Post

Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

Join & Write a Comment

Video by: Steve
Using examples as well as descriptions, step through each of the common simple join types, explaining differences in syntax, differences in expected outputs and showing how the queries run along with the actual outputs based upon a simple set of dem…
This video shows how to Export data from an Oracle database using the Datapump Export Utility.  The corresponding Datapump Import utility is also discussed and demonstrated.

Keep in touch with Experts Exchange

Tech news and trends delivered to your inbox every month