Skip to content

Instantly share code, notes, and snippets.

@fljdin
Last active August 29, 2015 13:59
Show Gist options
  • Save fljdin/d9bb4dbf57e77b1273b4 to your computer and use it in GitHub Desktop.
Save fljdin/d9bb4dbf57e77b1273b4 to your computer and use it in GitHub Desktop.
select ctime "Date",
decode(backup_type, 'L', 'Archive Log', 'D', 'Full', 'Incremental') backup_type,
bsize "Size MB"
from (
select trunc(bp.completion_time) ctime, backup_type,
round(sum(bp.bytes/1024/1024),2) bsize
from v$backup_set bs, v$backup_piece bp
where bs.set_stamp = bp.set_stamp
and bs.set_count = bp.set_count
and bp.status = 'A'
group by trunc(bp.completion_time), backup_type
) order by 1, 2;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment