查看RMAN历史备份情况及大小

select to_char(start_time, 'yyyy-mm-dd') start_time,
INCREMENTAL_LEVEL,
BACKUP_TYPE,
device_type,
to_char(start_time, 'day') day,
round(sum(OUTPUT_BYTES) / 1024 / 1024 / 1024, 2) SIZE_GB
from v$backup_set_details
group by to_char(start_time, 'yyyy-mm-dd'),
to_char(start_time, 'day'),
INCREMENTAL_LEVEL,
BACKUP_TYPE,device_type
order by start_time desc;
最后一次全备时间及大小
incremental_level = 0

select *
from (select to_char(start_time, 'yyyy-mm-dd') start_time,
INCREMENTAL_LEVEL,
BACKUP_TYPE,
device_type,
to_char(start_time, 'day') day,
round(sum(OUTPUT_BYTES) / 1024 / 1024 / 1024, 2) SIZE_GB
from v$backup_set_details
where incremental_level = 0
group by to_char(start_time, 'yyyy-mm-dd'),
INCREMENTAL_LEVEL,
BACKUP_TYPE,
device_type,
to_char(start_time, 'day')
order by start_time desc) c
where rownum = 1;
v$backup_set_details displays information about backup sets from the control file. A backup set record is inserted after the backup set is successfully completed.
| Column | Datatype | Description |
| RECID | NUMBER | Backup set record ID |
| STAMP | NUMBER | Backup set record stamp |
| SET_STAMP | NUMBER | Backup set stamp. The backup set stamp and count uniquely identify the backup set. the foreign key for the following tables: V$BACKUP_PIECE,V$BACKUP_DATAFILE, V$BACKUP_REDOLOG,V$BACKUP_CORRUPTION. |
| SET_COUNT | NUMBER | Backup set count. The backup set count is incremented by one every time a new backup set is started (if the backup set is never completed the number is "lost"). If the control file is re-created then the count is reset to 1. |

最低0.47元/天 解锁文章
2968

被折叠的 条评论
为什么被折叠?



