Monitoring RMAN Backups

逍遙三人發表於2012-02-19
To correlate a process with a channel during a backup, perform. the following steps:
1. Start Recovery Manager and connect to the target database and, optionally, the recovery 
catalog.
2. Set the COMMAND ID parameter after allocating the channels and then copy the desired 
object. The string specified by the SET COMMAND ID command is entered into the 
V$SESSION.CLIENT_INFO column of all allocated channels. 
run {
allocate channel t1 type disk;
set command id to 'rman';
backup datafile 1;
release channel t1;}
3. Query the V$PROCESS and V$SESSION views to get the session identifier (SID) and the 
operating system process identifier (SPID) for the channels using the previously 
specified COMMAND ID string. 
SELECT sid, spid, client_info 
FROM v$process p, v$session s 
WHERE p.addr = s.paddr 
AND client_info LIKE '%id=rman%';
4. Query the V$SESSION_LONGOPS view to get the status of the copy.
SELECT sid, serial#, context, sofar, totalwork,
round(sofar/totalwork*100,2) "% Complete"
FROM V$SESSION_LONGOPS
WHERE opname LIKE 'RMAN:%' 
AND opname NOT LIKE 'RMAN: aggregate%'
AND totalwork != 0;
5. If you use a channel of type sbt and the copy process appears to hang, query 
V$SESSION_WAIT by using the SID obtained in step 3 to determine whether RMAN is 
waiting for a media manager function call to complete. 
SELECT * FROM V$SESSION_WAIT WHERE event LIKE '%sbt%';

來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/21584437/viewspace-716755/,如需轉載,請註明出處,否則將追究法律責任。

相關文章