Thursday, February 22, 2024

RDBMS 19C -- Tablespace and File I/O Stats missing in AWR reports / real fix -> dbms_workload_repository.modify_table_settings , flush_level

You may be hitting this bug even if your Oracle database version is 19C (even if it is 19.14..)

You have a workaround (setting statistics_level to ALL), but it is not recommended.. (due to the fact that, you may end up collecting too much data for the  AWR snapshots) Note that, your AWR snapshot related data collection tasks may also take too much time to complete, if you set statistics_level to ALL.. especially if you have a large buffer cache...

At the first glance, this problem seems addressed with the patch 22048821 TABLESPACE IO STATISTICS MISSING FROM AWR REPORT (Patch).. But it is actually not so :)

Also, this seems already fixed (the fix is already delivered) in versions like "19.8.0.0.200714 (Jul 2020) Database Release Update (DB RU)", but it is practically not so :)

Note that, this problem is also seen in 19.14, but when I checked my 19.20 DB, the issue is not there.. It seems the Enhancement request which is opened for 19.14 received a good response...

Related ER -> Bug 35122334 : REQUEST TO INCLUDE TYPICAL AS A DEFAULT VALUE TO BYPASS MANUAL EXECUTION OF DBMS_WORKLOAD_REPOSITORY.MODIFY_TABLE_SETTINGS AFTER APPLYING FIX 25416731

Related MOS Doc. -> Missing Tbspace I/O Stats AWR Report need to change the default dbms_workload_repository.modify_table_settings for WRH$_FILESTATXS WRH$_DATAFILE Tempfile WRH$_TEMPFILE and WRH$_TEMPSTATXS (Doc ID 2954137.1)

Probably, after 19.14, the issue is fixed. That is, after the Release 19.14, Oracle included the fix for bypassing the need of manual execution of the DBMS_WORKLOAD_REPOSITORY.MODIFY_TABLE_SETTINGS.

Anyways, for Oracle 19.x (<=19.14), the fix of that bug and fix of related the Enhancement Request 27871293 doesn't really fix this problem.  

To fix this and get the TBS and File I/O Stats data back in AWR reports in 19.X versions, we should enable flushing for the WRH$_FILESTATXS, WRH$_DATAFILE, WRH$_TEMPFILE and WRH$_TEMPSTATXS tables by taking the statistics level of the Tempfile Group into consideration.

Well.. We have to run the following in order to do that;

     $ sqlplus / as sysdba

        exec dbms_workload_repository.modify_table_settings(table_name  => 'WRH$_FILESTATXS', flush_level => 'TYPICAL');

        exec dbms_workload_repository.modify_table_settings(table_name  => 'WRH$_DATAFILE', flush_level => 'TYPICAL');

        exec dbms_workload_repository.modify_table_settings(table_name  => 'Tempfile Group', flush_level => 'TYPICAL');

        exec dbms_workload_repository.modify_table_settings(table_name  => 'WRH$_TEMPFILE', flush_level => 'TYPICAL');

        exec dbms_workload_repository.modify_table_settings(table_name  => 'WRH$_TEMPSTATXS', flush_level => 'TYPICAL');

After these actions, we will have those missing stats back.. but! as you may imagine -> we will have those stats in the new snapshots and in the new AWR reports...

This is a very important thing and should be taken care off.. You may not be aware of this... But without having these stats in place, believe me, one day your AWR reports will leave you alone in dealing with a real performance problem 

It is important for being able to check historical IO performance of Oracle Database and that's why I shared it with you.

No comments :

Post a Comment

If you will ask a question, please don't comment here..

For your questions, please create an issue into my forum.

Forum Link: http://ermanarslan.blogspot.com.tr/p/forum.html

Register and create an issue in the related category.
I will support you from there.