SQL Query to Find Out Hourly Redo Log Generation

_____________________________________________________________________________________________________________________

The Eucharistic Miracles of the World
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

_____________________________________________________________________________________________________________________

Website Stats

0 comments:

Post a Comment

Labels

Oracle (578) General (60) Unix (47) Script (41) Blog (23) OCI (3) SQL* Loader (3) Datapump (2) Software (1)
DBA Tips
 

acehints.com Copyright 2011-21 All Rights Reserved | Site Map | Contact | Disclaimer