Way to success...

--"Running Away From Any PROBLEM Only Increases The DISTANCE From The SOLUTION"--.....--"Your Thoughts Create Your FUTURE"--.....--"EXCELLENCE is not ACT but a HABIT"--.....--"EXPECT nothing and APPRECIATE everything"--.....

Friday, November 11, 2016

Query To Get Archive Log Apply Rate Speed of a Standby Database

Please run below query on Standby Oracle Database

Download(archlogapplymon.sql)


REM +======================================================================+
REM                    
REM File Name: archlogapplymon.sql
REM 
REM Description:
REM   Query To Get Archive Log Apply Rate Speed of a Standby Database
REM   
REM Notes:
REM   Usage: sqlplus "/ as sysdba" @archlogapplymon.sql 
REM
REM   
REM +======================================================================+

set linesize 180
col Values for a70
col Recovery_start for a21
select to_char(START_TIME,'dd.mm.yyyy hh24:mi:ss') "Recovery_start",
to_char(item)||' = '||to_char(sofar)||' '||to_char(units)||' '|| to_char(TIMESTAMP,'dd.mm.yyyy hh24:mi') "Values" 
from v$recovery_progress 
where start_time=(select max(start_time) from v$recovery_progress);

Sample Output:


1 comment:

  1. -- display progress of recovery
    -- set manually sequence numbers you expect to be applied into logs_to_apply
    define logs_to_apply="53262-53050"
    set linesize 180
    col Values for a70
    col Recovery_start for a21
    select start_time, sysdate+((sysdate-start_time)/sofar)*(&&logs_to_apply) est_end from v$recovery_progress where ITEM='Log Files';
    /

    ReplyDelete