SQL Query to Find Out Hourly Redo Log Generation

advertisements

_____________________________________________________________________________________________________________________

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 (629) Script (86) General (77) Unix (47) Blog (23) Technology (19) gadget (6) games (6) Business (3) OCI (3) SQL* Loader (3) Datapump (2)
 

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