advertisements
_____________________________________________________________________________________________________________________
This query will give you the hourly redo log generation for each day.
SQL Query
SET PAGES 1000 LINES 120 COL DAY FORMAT a15; COL HOUR FORMAT a4; COL HOUR_TOTAL FORMAT 999; SELECT TO_CHAR(FIRST_TIME,'YYYY-MON-DD') DAY, TO_CHAR(FIRST_TIME,'HH24') HOUR, COUNT(*) HOUR_TOTAL FROM V$LOG_HISTORY GROUP BY TO_CHAR(FIRST_TIME,'YYYY-MON-DD'),TO_CHAR(FIRST_TIME,'HH24') ORDER BY TO_CHAR(FIRST_TIME,'YYYY-MON-DD'),TO_CHAR(FIRST_TIME,'HH24') ASC;
advertisements
Sample Output
DAY HOUR HOUR_TOTAL --------------- ---- ---------- 2021-MAY-11 12 4 2021-MAY-11 13 3 2021-MAY-11 14 4 2021-MAY-11 15 3 2021-MAY-11 16 3 2021-MAY-11 17 1 2021-MAY-11 18 3 2021-MAY-11 19 2 2021-MAY-11 20 8 2021-MAY-11 21 2 2021-MAY-11 22 4 2021-MAY-11 23 2
_____________________________________________________________________________________________________________________
0 comments:
Post a Comment