很多文章中说format中的%s代表的是备份集号,这个很容易引起误解。他不是bs key,而是对应set_count.
RMAN> list backupset 33194;
List of Backup Sets
===================
BS Key Size Device Type Elapsed Time Completion Time
------- ---------- ----------- ------------ ---------------
33194 115.78M DISK 00:00:13 24-MAY-17
BP Key: 33194 Status: AVAILABLE Compressed: YES Tag: FULLBAK
Piece Name: /backup/bak_20170524_33197_1
List of Archived Logs in backup set 33194
Thrd Seq Low SCN Low Time Next SCN Next Time
---- ------- ---------- --------- ---------- ---------
1 6000 1437317694 27-APR-17 1437397771 27-APR-17
看到bs key是33194,对应的备份片的名字中是bak_20170524_33197_1
可以查看视图,查看对应的关系
select bs_key,set_count
from v$backup_set_details
where device_type = ‘DISK’
and completion_time >= to_date(‘2017-05-24’, ‘yyyy-mm-dd’) order by completion_time ;
set_count是Backup count number