Tuesday, April 21, 2020

ARCHIVE GENERATION

ARCHIVE GENERATION:

set pagesize 26;
set linesize 95;
col date_hour format a15;
set trimout on trimspool on echo off;

prompt "========================================="
prompt "+++ Hourly Archive Generation Details +++"
prompt "========================================="
select to_char(first_time, 'dd-mm-yy hh24:')||'00' date_hour,
       thread# thread,
       min(sequence#) min_sequence,
       max(sequence#) max_sequence,
       max(sequence#)-min(sequence#) cnt
from   v$log_history
where  trunc(first_time) >= trunc(sysdate)-1
group  by to_char(first_time, 'dd-mm-yy hh24:'), thread#
order  by 1, 2;

prompt "========================================"
prompt "+++ Daily Archive Generation Details +++"
prompt "========================================"
select trunc(first_time) on_date,
       thread# thread,
       min(sequence#) min_sequence,
       max(sequence#) max_sequence,
       max(sequence#) - min(sequence#) cnt
from   v$log_history
group  by trunc(first_time), thread#
order  by 1, 2;

No comments:

Post a Comment

student guide Dataguard: GLOBAL_DBNAME = <dbuniquename>_DGMGRL.example.com  Example: listener.ora on Primary Hosts Static listener ent...