export ORACLE_SID=
rman
RMAN > CONNECT TARGET /
RMAN > CROSSCHECK archivelog all;
RMAN > list archivelog all;
RMAN > delete archivelog until sequence=1236;
RMAN > Delete archivelog until time 'sysdate-1'; //Delete archive log before today
To Run RMAN in Scripts :
Prepare a sh script file & a command file :
sample script :
export ORACLE_SID={SID}
rman target / @cmdfile.txt
sample command file :
RUN {
delete archivelog until time 'sysdate-2';
}
EXIT;
Add the scripts to Crontab
No comments:
Post a Comment