PDB SEED(种子 PDB)通常以只读模式打开,只有在执行 Oracle 数据库补丁的数据补丁时才会更新scn,这样会导致PDB SEED备份要比其他数据文件的scn小,为了保证恢复,归档日志会一直保留,即使已经超过了保留时间依然无法删除。

解决办法:

$ cat reopen_seed.sql
alter session set container = PDB$SEED;
alter session set "_oracle_script"=TRUE;
alter pluggable database PDB$SEED close immediate;
alter pluggable database PDB$SEED open read write;
alter pluggable database PDB$SEED close;
alter pluggable database PDB$SEED open read only;
exit;

$ cat REOPEN_SEED.sh
#/bin/bash
source .bashrc
sqlplus / as sysdba @reopen_seed.sql
exit

0级备份前执行一次,保证sedd能正常更新scn

RMAN Retains Archivelog Backups Beyond Recovery Window for PDB(PDB$SEED) Recovery (Doc ID 2492130.1)