he following commands will helpful to delete the expired archive log files using Oracle Recovery Manager(RMAN).Connect to the Rman prompt and try the bellow commands.

    RMAN>list expired archivelog all;

RMAN>crosscheck archivelog all;
RMAN>delete noprompt expired archivelog all;
RMAN>list expired archivelog all;

Sample Ouptut:

RMAN> list expired archivelog all;
specification does not match any archived log in the repository
RMAN>

Disable Archive log mode

startup mount

alter database noarchivelog;

alter database open;

 

方法一:
rman target/
或rman target/@orcl
在命令窗口里面执行
delete noprompt archivelog until time 'sysdate-7'; //删除七天前的归档,果使用了闪回功能,也会删除闪回的数据。 
DELETE ARCHIVELOG FROM TIME 'SYSDATE-7'; //删除七天到现在的归档 

方法二:(rman登不进去)

执行find /archive/ -name "*.dbf"|wc –l查看有多少归档日志
删除7天之前的所有归档文件
find /archive/ -name "*.dbf" -mtime +7  -exec rm -f {} ;

将归档日志信息进行更新

asm 就得用asmcmd交互界面rm了
RMAN> crosscheck archivelog all;
RMAN> delete noprompt expired archivelog all; 
RMAN> exit
 

相关文章: