Monitor the
progress of backups, copies, and restores by querying the V$SESSION_LONGOPS
view. RMAN uses detail and aggregate rows in V$SESSION_LONGOPS. Detail rows
describe the files that are being processed by one job step. Aggregate rows
describe the files that are processed by all job steps in an RMAN command. A
job step is the creation or restoration of one backup set or data file copy.
The detail rows are updated with every buffer that is read or written during
the backup step, so their granularity of update is small. The aggregate rows are
updated when each job step is completed, so their granularity of update is
large.
Note: Set the STATISTICS_LEVEL parameter
to TYPICAL (the default value) or ALL to populate the V$SESSION_LONGOPS view.
The
relevant columns in V$SESSION_LONGOPS for RMAN include:
•
OPNAME: A text description of the row.
Detail rows include RMAN:datafile copy, RMAN:full datafile backup, and
RMAN:full datafile restore.
•
CONTEXT: For backup output rows, the value
of this column is 2. For all the other rows except proxy copy (which does not
update this column), the value is 1.
SQL>
SELECT OPNAME, CONTEXT, SOFAR, TOTALWORK,
2
ROUND(SOFAR/TOTALWORK*100,2) "%_COMPLETE"
3 FROM
V$SESSION_LONGOPS
4
WHERE OPNAME LIKE 'RMAN%'
5 AND
OPNAME NOT LIKE '%aggregate%'
6 AND
TOTALWORK != 0
7 AND
SOFAR <> TOTALWORK;
•
SOFAR: For image copies, the number of
blocks that have been read; for backup input rows, the number of blocks that
have been read from the files that are being backed up; for backup output rows,
the number of blocks that have been written to the backup piece; for restores,
the number of blocks that have been processed to the files that are being
restored in this one job step; and for proxy copies, the number of files that
have been copied
•
TOTALWORK: For image copies, the total number
of blocks in the file; for backup input rows, the total number of blocks to be
read from all files that are processed in this job step; for backup output
rows, the value is 0 because RMAN does not know how many blocks it will write
into any backup piece; for restores, the total number of blocks in all files
restored in this job step; and for proxy copies, the total number of files to
be copied in this job step