SELECT OPERATION, STATUS, MBYTES_PROCESSED, START_TIME, END_TIME from V$RMAN_STATUS;
COLUMN CLIENT_INFO FORMAT a30
COLUMN SID clear
COLUMN SPID FORMAT 9999
SELECT s.SID, p.SPID, s.CLIENT_INFO
FROM V$PROCESS p, V$SESSION s
WHERE p.ADDR = s.PADDR
AND CLIENT_INFO LIKE 'rman%';
SELECT SID, SERIAL#, CONTEXT, SOFAR, TOTALWORK,ROUND(SOFAR/TOTALWORK*100,2) "%_COMPLETE" FROM V$SESSION_LONGOPS WHERE OPNAME LIKE 'RMAN%' AND OPNAME NOT LIKE '%aggregate%' AND TOTALWORK != 0 AND SOFAR <> TOTALWORK;
***To calculate the progress of an RMAN job, run the following query in SQL*Plus while the RMAN job is executing:
SELECT SID, SERIAL#, CONTEXT, SOFAR, TOTALWORK,
ROUND(SOFAR/TOTALWORK*100,2) "% COMPLETE"
FROM V$SESSION_LONGOPS
WHERE OPNAME LIKE 'RMAN%' AND OPNAME LIKE '%aggregate%'
AND TOTALWORK != 0 AND SOFAR <> TOTALWORK;
set lines 200
col "Time Now" for a25
select sid,SERIAL#,sofar,totalwork, substr(to_char(sysdate,'dd:mon:yyyy hh24:mi:ss'),1,20) "Time Now", ROUND(SOFAR/TOTALWORK*100,2) "% COMPLETE",
time_remaining/60 Time_to_complete_Minutes,elapsed_seconds/60/60 Elapsed_time_hours from gv$session_longops
where OPNAME LIKE 'RMAN%' AND OPNAME LIKE '%aggregate%' AND TOTALWORK != 0 AND SOFAR <> TOTALWORK;
***********This script will report on all backups – full, incremental and archivelog backups -
col STATUS format a9
col hrs format 999.99
select
SESSION_KEY, INPUT_TYPE, STATUS,
to_char(START_TIME,'mm/dd/yy hh24:mi') start_time,
to_char(END_TIME,'mm/dd/yy hh24:mi') end_time,
elapsed_seconds/3600 hrs
from V$RMAN_BACKUP_JOB_DETAILS
where status='RUNNING'
--order by session_key
order by start_time;
*********** This script will report all on full and incremental backups, not archivelog backups -
col STATUS format a9
col hrs format 999.99
select
SESSION_KEY, INPUT_TYPE, STATUS,
to_char(START_TIME,'mm/dd/yy hh24:mi') start_time,
to_char(END_TIME,'mm/dd/yy hh24:mi') end_time,
elapsed_seconds/3600 hrs
from V$RMAN_BACKUP_JOB_DETAILS
where input_type='DB INCR'
order by session_key;
COLUMN CLIENT_INFO FORMAT a30
COLUMN SID clear
COLUMN SPID FORMAT 9999
SELECT s.SID, p.SPID, s.CLIENT_INFO
FROM V$PROCESS p, V$SESSION s
WHERE p.ADDR = s.PADDR
AND CLIENT_INFO LIKE 'rman%';
SELECT SID, SERIAL#, CONTEXT, SOFAR, TOTALWORK,ROUND(SOFAR/TOTALWORK*100,2) "%_COMPLETE" FROM V$SESSION_LONGOPS WHERE OPNAME LIKE 'RMAN%' AND OPNAME NOT LIKE '%aggregate%' AND TOTALWORK != 0 AND SOFAR <> TOTALWORK;
***To calculate the progress of an RMAN job, run the following query in SQL*Plus while the RMAN job is executing:
SELECT SID, SERIAL#, CONTEXT, SOFAR, TOTALWORK,
ROUND(SOFAR/TOTALWORK*100,2) "% COMPLETE"
FROM V$SESSION_LONGOPS
WHERE OPNAME LIKE 'RMAN%' AND OPNAME LIKE '%aggregate%'
AND TOTALWORK != 0 AND SOFAR <> TOTALWORK;
set lines 200
col "Time Now" for a25
select sid,SERIAL#,sofar,totalwork, substr(to_char(sysdate,'dd:mon:yyyy hh24:mi:ss'),1,20) "Time Now", ROUND(SOFAR/TOTALWORK*100,2) "% COMPLETE",
time_remaining/60 Time_to_complete_Minutes,elapsed_seconds/60/60 Elapsed_time_hours from gv$session_longops
where OPNAME LIKE 'RMAN%' AND OPNAME LIKE '%aggregate%' AND TOTALWORK != 0 AND SOFAR <> TOTALWORK;
***********This script will report on all backups – full, incremental and archivelog backups -
col STATUS format a9
col hrs format 999.99
select
SESSION_KEY, INPUT_TYPE, STATUS,
to_char(START_TIME,'mm/dd/yy hh24:mi') start_time,
to_char(END_TIME,'mm/dd/yy hh24:mi') end_time,
elapsed_seconds/3600 hrs
from V$RMAN_BACKUP_JOB_DETAILS
where status='RUNNING'
--order by session_key
order by start_time;
*********** This script will report all on full and incremental backups, not archivelog backups -
col STATUS format a9
col hrs format 999.99
select
SESSION_KEY, INPUT_TYPE, STATUS,
to_char(START_TIME,'mm/dd/yy hh24:mi') start_time,
to_char(END_TIME,'mm/dd/yy hh24:mi') end_time,
elapsed_seconds/3600 hrs
from V$RMAN_BACKUP_JOB_DETAILS
where input_type='DB INCR'
order by session_key;
No comments:
Post a Comment