Monday, November 14, 2022

Oracle Database 11g -- How to Dump Active Session History (ASH) to a File

Problem

You want to dump the ASH into a trace file for offline analysis

Solution

Use any of the following:

SQL> alter session set events 'immediate trace name ashdump level <time_preiod_in_minutes>';

Or:

SQL> alter system set events 'immediate trace name ashdump level <time_preiod_in_minutes>'; 

Or:

SQL> oradebug setmypid
SQL> oradebug dump ashdump <time_preiod_in_minutes>; 

Reference:

  • ashdump* scripts and post-load processing of MMNL traces (Doc ID 555303.1)
  •  Analysis of Active Session History (Ash) Online and Offline (Doc ID 243132.1)
 

No comments: