1.用catalog连接目标数据库
rman catalog rmanuser/rmanuser target sys/sysdba@rac1
2.建立catalog脚本
RMAN> replace global script global_del {
2> allocate channel d1 device type disk;
3> delete obsolete recovery window of 15 days;
4> release channel d1;
5> }
3.查看脚本列表
RMAN> list global script names;
4.查看脚本内容
RMAN> print global script global_del;
5.再次建立备份归档的脚本
RMAN> replace global script global_arch comment "backup archivelog as well as delete input" {
2> allocate channel d1 device type disk;