TO VIEW BACKUP STATUS for RMAN BACKUP Processes
SELECT b.opname,b.SID, b.SERIAL#, a.status,b.CONTEXT, b.SOFAR, b.TOTALWORK,
ROUND (b.SOFAR/b.TOTALWORK*100, 2) "% COMPLETE"
FROM gV$SESSION_LONGOPS b, gv$session a
WHERE b.OPNAME LIKE 'RMAN%'
AND b.OPNAME NOT LIKE '%aggregate%'
and a.sid=b.sid
AND b.TOTALWORK! = 0 AND b.SOFAR <> b.TOTALWORK;
TO GENERATE KILL SESSION scripts for RMAN BACKUP Processes
select 'alter system kill session '''||sid||'',''||serial#||''' immediate;' FROM V$SESSION_LONGOPS
WHERE OPNAME LIKE 'RMAN%' AND OPNAME NOT LIKE '%aggregate%'
AND TOTALWORK! = 0 AND SOFAR <> TOTALWORK;
1. Pause/Resume/Kill a Running RMAN Backup
To Check if there is an RMAN backup is currently running:
col START_TIME for a15
col END_TIME for a15
col TIME_TAKEN_DISPLAY for a10
col INPUT_BYTES_DISPLAY heading "DATA SIZE" for a10
col OUTPUT_BYTES_DISPLAY heading "Backup Size" for a11
col OUTPUT_BYTES_PER_SEC_DISPLAY heading "Speed/s" for a10
col output_device_type heading "Device_TYPE" for a11
SELECT to_char (start_time,'DD-MON-YY HH24:MI') START_TIME,to_char(end_time,'DD-MON-YY HH24:MI') END_TIME, time_taken_display, status,input_type, output_device_type,input_bytes_display, output_bytes_display,output_bytes_per_sec_display,COMPRESSION_RATIO COMPRESS_RATIO FROM v$rman_backup_job_details WHERE status like 'RUNNING%';
2. To Pause an already running RMAN backup: [This is only applicable for Linux OS]
set pages 0 feedback off
select 'TO PAUSE THE RUNNING RMAN BACKUP RUN THIS OS COMMAND:=> kill -STOP '||listagg (p.spid, ' ') WITHIN GROUP (ORDER BY p.spid) from v$session s, v$process p where s.program like 'rman@%' and p.addr=s.paddr;
3. To Resume an already "Paused" RMAN backup: [This is only applicable for Linux OS]
set pages 0 feedback off
select 'TO RESUME A "PAUSED" RMAN BACKUP RUN THIS OS COMMAND:=> kill -CONT '||listagg (p.spid, ' ') WITHIN GROUP (ORDER BY p.spid) from v$session s, v$process p where s.program like 'rman@%' and p.addr=s.paddr;
4. To Terminate an already running RMAN backup: [This is only applicable for Linux OS]
set pages 0 feedback off
select 'TO KILL THE RUNNING RMAN BACKUP RUN THIS OS COMMAND:=> kill -9 '||listagg (p.spid, ' ') WITHIN GROUP (ORDER BY p.spid) from v$session s, v$process p where s.program like 'rman@%' and p.addr=s.paddr;
No comments:
Post a Comment