<

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

x

How to set multiple events in Oracle

Published on
22,528 Points
19,428 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

Big Business Goals? Which KPIs Will Help You

The most successful MSPs rely on metrics – known as key performance indicators (KPIs) – for making informed decisions that help their businesses thrive, rather than just survive. This eBook provides an overview of the most important KPIs used by top MSPs.

Join & Write a Comment

This video shows information on the Oracle Data Dictionary, starting with the Oracle documentation, explaining the different types of Data Dictionary views available by group and permissions as well as giving examples on how to retrieve data from th…
This video explains what a user managed backup is and shows how to take one, providing a couple of simple example scripts.
Next Article:

Keep in touch with Experts Exchange

Tech news and trends delivered to your inbox every month