Posts

Showing posts from January, 2023

Oracle: To get frequency of REDO log switches

 select    b.recid,    to_char(b.first_time,'dd-mon-yy hh24:mi:ss') start_time,    a.recid,    to_char(a.first_time,'dd-mon-yy hh24:mi:ss') end_time,    round(((a.first_time-b.first_time)*25)*60,2) minutes from    v$log_history a,    v$log_history b where    a.recid = b.recid+1 and    a.first_time between to_date('2023-01-30:21:45:00','yyyy-mm-dd:hh24:mi:ss') and    to_date('2023-01-30:22:15:00','yyyy-mm-dd:hh24:mi:ss') order by    a.first_time desc;

ORACLE: To find database startup time

set linesize 200 select instance_name, to_char(startup_time,'mm/dd/yyyy hh24:mi:ss') as startup_time from v$instance INSTANCE_NAME    STARTUP_TIME ---------------- --------------------------------------------------------------------------- fsprod           12/15/2022 03:44:39