Using Events with RAC

Usefull RAC events

  • ASM : Event 15199 ( use 10298 event together with 15199 ) ..

Setting cluster wide EVENTs using ALTER SYSTEM SET EVENT .. scope=spfile sid=’*’


Check system events setting  
SQL> alter session set events 'immediate eventdump (system)';
*** ACTION NAME:() 2013-09-03 16:11:49.293
Dumping Event (group=SYSTEM) 
--> Here we have no system events active with our RAC system 
Set event  10706  on instance grac1
SQL>  select INSTANCE_NAME from v$instance;
INSTANCE_NAME
----------------
GRACE21
SQL>   ALTER SYSTEM SET EVENT='10706 trace name context forever, level 1'  scope=spfile  sid='*';
System altered.
--> Reboot instance GRACE23 ( should pick up the 10706 event now )
SQL>  select INSTANCE_NAME from v$instance;
INSTANCE_NAME
----------------
GRACE23
SQL> startup force
After reboot dump the system events again 
SQL> alter session set events 'immediate eventdump (system)'; 
*** 2013-09-03 16:19:38.003
Dumping Event (group=SYSTEM)
10706 trace name context forever, level 1
--> Now event 10706  is set now

Cleanup all system event on grac1 again, reboot grac3 and and verify 
SQL>  select INSTANCE_NAME from v$instance;
INSTANCE_NAME
----------------
GRACE21
SQL> alter system reset event scope=spfile sid='*' ;
Reboot grac3 and and verify 
SQL>  select INSTANCE_NAME from v$instance;
INSTANCE_NAME
----------------
GRACE23
SQL> startup force
After reboot dump the system events again 
SQL> alter session set events 'immediate eventdump (system)'; 
*** 2013-09-03 16:25:20.620
Dumping Event (group=SYSTEM)
--> No system event 10706 anymore - all system events are cleared

Setting events Instance wide using ALTER SYSTEM SET EVENTS

 SQL>  ALTER SYSTEM SET EVENTS '10706 trace name context forever, level 1'  ;
System altered.

Use the following PLSQL code to display the active event setting:
declare
event_level number;
begin
  for i in 10000..10999 loop
   sys.dbms_system.read_ev(i,event_level);
   if (event_level > 0) then
      dbms_output.put_line('Event '||to_char(i)||' set at level '|| to_char(event_level));
   end if;
  end loop;
end;
/ 
SQL>  @check_ev
Event 10706 set at level 1


Cleanup SET EVENTS setting:
SQL>  ALTER SYSTEM SET EVENTS '10706 trace name context off';
System altered.
SQL> @check_ev
PL/SQL procedure successfully complete

Leave a Reply

Your email address will not be published. Required fields are marked *