| |
 |
|
Script to monitor RMAN progress
Server Tips by Burleson Consulting
February 6, 2008
|
Question: I have a long running RMAN job, and
I want a script to monitor the progress of RMAN execution. How do you
monitor RMAN progress?
Answer: Oracle has several views that can
monitor long running jobs, including v$session_longops and v$process
with v$session.
select
sid,
start_time,
total_work
sofar,
(sofar/totalwork) * 100 pct_done
from
v$session_longops
where
totalwork > sofar
AND
opname NOT LIKE '%aggregate%'
AND
opname like 'RMAN%';
select
sid,
spid,
client_info,
event,
seconds_in_wait,
p1, p2, p3
from
v$process p,
v$session s
where
p.addr = s.paddr
and
client_info like 'rman channel=%';
Yousef Rifai has published this RMAN monitoring script, quite handy when you
need to monitor the status of a long running RMAN backup job:
REM RMAN Progress
alter session set nls_date_format='dd/mm/yy hh24:mi:ss'
/
select SID, START_TIME,TOTALWORK, sofar, (sofar/totalwork) * 100 done,
sysdate + TIME_REMAINING/3600/24 end_at
from v$session_longops
where totalwork > sofar
AND opname NOT LIKE '%aggregate%'
AND opname like 'RMAN%'
/
REM RMAN wiats
set lines 120
column sid format 9999
column spid format 99999
column client_info format a25
column event format a30
column secs format 9999
SELECT SID, SPID, CLIENT_INFO, event, seconds_in_wait secs, p1, p2, p3
FROM V$PROCESS p, V$SESSION s
WHERE p.ADDR = s.PADDR
and CLIENT_INFO like 'rman channel=%'
/
 |
If you like Oracle tuning, you
might enjoy my book "Oracle
Tuning: The Definitive Reference", with 950 pages of tuning tips and
scripts.
You can buy it direct from the publisher for 30%-off and get instant
access to the code depot of Oracle tuning scripts. |
|
|
Need an Oracle Health Check?
- Do you have
bad performance after an upgrade?
- Need to
certify that your database follows best practices?
BC Oracle performance gurus can quickly
certify every aspect of your
Oracle database and provide a complete verification that your database
is fully optimized. |

|
|