RMAN archive deletion script
vi rman_archive_deletion.sh
ORACLE_SID=testingdb1;export ORACLE_SID;
rm nohup.out
nohup rman target / catalog rman_racuser/password@rmandb cmdfile '/exportdump/RMAN/testing1DB/rman_archive_deletion_testing1db1.sh' msglog '/exportdump/RMAN/testing1DB/backup_archive_testing1db1_deletion1.out' &
vi rman_archive_deletion_testing1db1.sh
run {
ALLOCATE CHANNEL ch00 DEVICE TYPE DISK ;
crosscheck archivelog all;
RELEASE CHANNEL ch00;
sql 'alter system archive log current';
ALLOCATE CHANNEL ch00 DEVICE TYPE DISK ;
ALLOCATE CHANNEL ch01 DEVICE TYPE DISK ;
BACKUP
filesperset 20
FORMAT '/exportdump/RMAN/testing1DB/testing1db1_del_al_%s_%p_%t'
ARCHIVELOG ALL DELETE INPUT;
RELEASE CHANNEL ch00;
RELEASE CHANNEL ch01;
ALLOCATE CHANNEL ch00 DEVICE TYPE DISK;
BACKUP
# recommended format
FORMAT '/exportdump/RMAN/testing1DB/testing1db1_del_al_cntrl_%s_%p_%t'
CURRENT CONTROLFILE;
RELEASE CHANNEL ch00;
}
No comments:
Post a Comment