Databases Reference
In-Depth Information
if you're using a recovery catalog, you can query rC_rMan_BaCKup_JOB_DetaiLS for the same information
as found in V$rMan_BaCKup_JOB_DetaiLS. the view rC_rMan_BaCKup_JOB_DetaiLS may contain a longer history
than what's available in V$rMan_BaCKup_JOB_DetaiLS.
Note
The rows in V$RMAN_BACKUP_JOB_DETAILS are aggregated for all backup jobs that have run during a
connection to RMAN. That means the first timestamp recorded is for the first backup operation that the session
performs, and the last timestamp recorded is when the last backup command finishes (for the connected session).
Be careful about interpreting the contents of the view. The view records statistics, such as the aggregated duration
and number of bytes, but it does not report on what actual backup or restore commands were executed during a session.
You are limited only by your imagination as to what you can report on with RMAN backups. For example,
suppose you wanted to report the average amount of time for an RMAN backup, rank the backups by time taken, and
also report on the average of the prior three backups. Here is a query that uses analytic (window) functions to display
the desired information:
SELECT
ROUND((end_time - start_time)*24*60,2) AS minutes
,end_time
,RANK() OVER (ORDER BY end_time - start_time DESC) rank_row
,ROUND(
AVG((end_time - start_time)*24*60) OVER ()
,2) average_all
,ROUND(
AVG((end_time - start_time)*24*60)
OVER (ORDER BY rownum
ROWS BETWEEN 3 PRECEDING AND 1 PRECEDING)
,2) average_prev_3
FROM v$rman_backup_job_details
ORDER BY end_time;
Here is some sample output:
MINUTES END_TIME RANK_ROW AVERAGE_ALL AVERAGE_PREV_3
-------- --------- ---------- ----------- --------------
49.25 27-JUL-12 15 54.05
57.68 28-JUL-12 8 54.05 49.25
52.40 29-JUL-12 11 54.05 53.47
52.05 30-JUL-12 13 54.05 53.11
47.52 31-JUL-12 17 54.05 54.04
49.20 01-AUG-12 16 54.05 50.66
67.00 02-AUG-12 2 54.05 49.59
52.17 03-AUG-12 12 54.05 54.57
56.52 04-AUG-12 10 54.05 56.12
64.23 05-AUG-12 5 54.05 58.56
51.20 06-AUG-12 14 54.05 57.64
64.77 07-AUG-12 4 54.05 57.32
60.67 08-AUG-12 6 54.05 60.07
64.98 09-AUG-12 3 54.05 58.88
67.72 10-AUG-12 1 54.05 63.47
57.78 11-AUG-12 7 54.05 64.46
57.50 12-AUG-12 9 54.05 63.49
 
Search WWH ::




Custom Search