Skip to Main Content

Oracle Database Discussions

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

DBA_HIST_ACTIVE_SESS_HISTORY missing data for one RAC node

Dan JankowskiMay 27 2016 — edited May 27 2016

We have a busy 4-node RAC data warehouse (Oracle 11.2.0.4 on Linux), with hourly AWR snapshots and 32-day retention.

I discovered there are hourly gaps in DBA_HIST_ACTIVE_SESS_HISTORY on one of the four nodes. In each hour, there is no sampled activity for the first 30-40 minutes of each hour. The other three nodes have complete sample history for the full hour. For example, here is the history for a 6 hour period yesterday.

SELECT snap_id

     , instance_number

     , MIN(sample_time) first_sample

     , MAX(sample_time) last_sample

     , COUNT(DISTINCT TRUNC(sample_time,'mi')) AS nbr_mins

     , COUNT(*) AS nbr_samples

FROM   dba_hist_active_sess_history

WHERE  snap_id BETWEEN 43766 AND 43771

GROUP BY snap_id

     , instance_number

ORDER BY 1,2;

SNAP_IDINSTANCE_NUMBERFIRST_SAMPLELAST_SAMPLENBR_MINSNBR_SAMPLES
4376612016-05-26 06:00:542016-05-26 06:59:51607240
4376622016-05-26 06:40:532016-05-26 06:59:49206635
4376632016-05-26 06:00:092016-05-26 06:59:496010101
4376642016-05-26 06:00:182016-05-26 06:59:51607373
4376712016-05-26 07:00:012016-05-26 07:59:51603956
4376722016-05-26 07:39:512016-05-26 07:59:46216735
4376732016-05-26 07:00:002016-05-26 07:59:46606540
4376742016-05-26 07:00:012016-05-26 07:59:43604979
4376812016-05-26 08:00:012016-05-26 09:00:036113251
4376822016-05-26 08:42:372016-05-26 09:00:02196707
4376832016-05-26 07:59:562016-05-26 09:00:03627436
4376842016-05-26 07:59:532016-05-26 08:59:56614882
4376912016-05-26 09:00:132016-05-26 09:59:53603437
4376922016-05-26 09:46:252016-05-26 09:59:48146992
4376932016-05-26 09:00:132016-05-26 09:59:49607418
4376942016-05-26 09:00:062016-05-26 09:59:48603207
4377012016-05-26 10:00:032016-05-26 10:59:53602843
4377022016-05-26 10:45:402016-05-26 10:59:54156624
4377032016-05-26 10:00:002016-05-26 10:59:56607218
4377042016-05-26 09:59:582016-05-26 10:59:49614059
4377112016-05-26 11:00:032016-05-26 12:00:05614447
4377122016-05-26 11:43:232016-05-26 12:00:08186678
4377132016-05-26 11:00:062016-05-26 12:00:06619261
4377142016-05-26 10:59:592016-05-26 12:00:03625052

Also, checking the contents of V$ACTIVE_SESSION_HISTORY, it seems there is is only around 20 minutes data in the buffer for this node.

SELECT inst_id

     , sysdate

     , oldest_sample_time

     , sample_count

     , sampled_bytes

     , awr_flush_emergency_count

FROM   gv$ash_info

ORDER BY 1;

INST_IDSYSDATEOLDEST_SAMPLE_TIMESAMPLE_COUNTSAMPLED_BYTESAWR_FLUSH_EMERGENCY_COUNT
12016-05-27 10:07:142016-05-27 08:38:06599699142560153644
22016-05-27 10:07:142016-05-27 09:49:22411849620886653201004
32016-05-27 10:07:142016-05-27 09:13:1641212051148471496336
42016-05-27 10:07:142016-05-27 08:30:3940155582953448344459

The AWR_FLUSH_EMERGENCY_COUNT is not incrementing for Node 2, and there is no mention of emergency flushes in the alert log. Having said that, I would expect that, even if emergency flushes were occuring, the data would be persisted to DBA_HIST_ACTIVE_SESS_HISTORY.

Based on the above, I suspect that V$ACTIVE_SESSION_HISTORY is unable to hold the entire hour's data, but rather than performing an emergency flush, the data is being lost.

Any suggestions what might be causing this, and what can be done to prevent loss of this data?

Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Jun 24 2016
Added on May 27 2016
7 comments
1,941 views