How to show currently active events

Found a helpful PL/SQL block in this presentation:

This shows you which events are set – i.e. by an alter system set events command.  I modified this to have a larger range of event values – to 29999.

event_level number;
for i in 10000..29999 loop
-- note: requires exec permission for DBMS_SYSTEM
if (event_level > 0) then
('Event '||i||' set at level '|| event_level);
end if;
end loop;

This shows the events that were set dynamically as well as any set in the init parameter event.


alter system set events
'10503 trace name context forever, level 4000';

Then run the PL/SQL block and you get this:

Event 10503 set at level 4000

Also, Oracle note 160178.1 has a good explanation of setting events dynamically and in an spfile.

– Bobby

About Bobby

I live in Chandler, Arizona with my wife and three daughters. I work for US Foods, the second largest food distribution company in the United States. I've been working as an Oracle database administrator and PeopleSoft administrator since 1994. I'm very interested in Oracle performance tuning.
This entry was posted in Uncategorized. Bookmark the permalink.

Leave a Reply