Active Session History (ASH) Performed An Emergency Flush Messages In The Alert Log
One day suddenly, I got a warning on my RAC system that,
"Active Session History (ASH) performed an emergency flush. This may mean that ASH is undersized. If emergency flushes are a recurring issue, you may consider increasing ASH size by setting the value of _ASH_SIZE to a sufficiently large value. Currently, ASH size is <some value> bytes. Both ASH size and the total number of emergency flushes since instance startup can be monitored by running the following query: select total_size,awr_flush_emergency_count from v$ash_info;"
It's also not a warning, I was just checking alert log and found this lines. I did some googling and found the some activity on system causes more active sessions, therefore filling the ASH buffers faster than usual causing this message to be displayed. It is not a problem per session, just indicates the buffers might need to be increased to support peak activity on the database.
use below command to overcome this lines.
alter system set "_ash_size"=(current_value+50% of current_value);
Now, the question is how to get current _ash_size?
Here is the query.
select total_size from v$ash_info;
Note : The value from above query is in BYTES. So, do accordingly.