Monday, May 12, 2025

RMAN Backup Details

 1- 

set lines 200 
col START_TIME for a20 
col END_TIME for a20 
col Hours format 9999.99
col STATUS format a10
select SESSION_KEY, INPUT_TYPE, STATUS,
to_char(START_TIME,'mm-dd-yyyy hh24:mi:ss') as RMAN_Bkup_start_time,
to_char(END_TIME,'mm-dd-yyyy hh24:mi:ss') as RMAN_Bkup_end_time,
elapsed_seconds/3600 Hours from V$RMAN_BACKUP_JOB_DETAILS
order by session_key;


2- 

with backup size : 
------------------------------------------------------------

set lines 200
col OUTPUT_BYTES_DISPLAY for a30
col TIME_TAKEN_DISPLAY for a30 
select start_time, status, input_type, output_bytes_display, time_taken_display from v$rman_backup_job_details order by start_time desc;

Only INCR : 

set lines 200
col OUTPUT_BYTES_DISPLAY for a30
col TIME_TAKEN_DISPLAY for a30 
select start_time, status, input_type, output_bytes_display, time_taken_display from v$rman_backup_job_details where INPUT_TYPE='DB INCR' order by start_time desc;


------

rman target /

delete archivelog until time 'sysdate -30';

delete force archivelog until time 'SYSDATE-15';

delete force archivelog all completed before 'SYSDATE-30';



crosscheck backup of database;
crosscheck backup of archivelog all;
crosscheck backup of controlfile;
delete expired backup;
delete noprompt obsolete;

No comments:

Post a Comment