Monday, March 28, 2011

Query size rman backups

set linesize 200 heading off
set heading on pagesize 200

column status format a10
column COMMAND_ID for a12
column time_taken_display format a10;
column input_bytes_display format a12;
column output_bytes_display format a12;
column output_bytes_per_sec_display format a10;
column ses_key format 9999999
column ses_recid format 9999999
column device_type format a10
column OutBytesPerSec for a13

SELECT b.session_key ses_key,
b.session_recid ses_recid,
b.session_stamp,
b.command_id,
b.input_type,
b.status,
to_char(b.start_time,'DD-MM-YY HH24:MI') "Start Time",
b.time_taken_display,
b.output_device_type device_type,
b.input_bytes_display,
b.output_bytes_display,
b.output_bytes_per_sec_display "OutBytesPerSec"
FROM v$rman_backup_job_details b
WHERE b.start_time > (SYSDATE - &)
ORDER BY b.start_time desc;

Did this post help you in any way can you please leave a comment? This will motivate me writing more posts.

10 comments:

  1. Hi Arjan,

    Good one. I too found this query useful.Using this can we find the size of the database when the rman command is backup database plus archive log?


    Thank you,
    Vijay

    ReplyDelete
  2. Hi Arjan,
    I use following select to find the size of backups by Tag:
    ~~~
    select TAG,sum(BYTES/1024/1024) from V$BACKUP_PIECE_DETAILS group by tag order by 2
    ~~~

    Eugene

    ReplyDelete
  3. Wonderful script;Thank you sooooooooo much.Appreciate your rimely help.

    ReplyDelete
  4. Thank you, Helped me a lot

    ReplyDelete
  5. nice post.
    please keep up the helping work.

    ReplyDelete
  6. could you please explain difference between input byte and output byte ?

    ReplyDelete
  7. Input Byte: Sum of sizes of all the DB files.
    Output Byte: Sum of the size of the RMAN backup.

    ReplyDelete
  8. It really appreciate you. This query help me a lot.

    ReplyDelete
  9. HI ,

    Your command shows the size , do you have anything for size time and type all 3

    ReplyDelete

comment