日期:2014-05-16 浏览次数:20493 次
解决ORA-00257: archiver error. Connect internal only, until freed
此问题属于归档日志满了。
解决办法:
SQL> select * from V$FLASH_RECOVERY_AREA_USAGE;
FILE_TYPE??? PERCENT_SPACE_USED PERCENT_SPACE_RECLAIMABLE NUMBER_OF_FILES
------------ ------------------ ------------------------- ---------------
CONTROLFILE?????????????????? 0???????????????????????? 0?????????????? 0
ONLINELOG???????????????????? 0???????????????????????? 0?????????????? 0
ARCHIVELOG????????????????? 99.9???????????????????????? 0?????????????? 255
BACKUPPIECE?????????????????? 0???????????????????????? 0?????????????? 0
IMAGECOPY???????????????????? 0???????????????????????? 0?????????????? 0
FLASHBACKLOG????????????????? 0???????????????????????? 0?????????????? 0
注:可以看出,ARCHIVELOG日志已经达到99.9%了。要把它清除掉!
SQL> quit
C:\Documents and Settings\Administrator>rman
RMAN> connect target system/myoracle@orcl
注:system为oracle用户,myoracle为oracle用户密码,orcl为连接的数据库名称SID。
RMAN> crosscheck archivelog all;
RMAN> delete expired archivelog all;
注:删除过期的归档
这样就把归档文件删除了。再进入sqlplus 查看ARCHIVELOG日志使用率!
第二种方法就是增大闪回日志文件的最大大小。如下:
alter system set DB_RECOVERY_FILE_DEST_SIZE=10g
?
以上处理方法是当遇到出现日志写满报错时的处理,建议最好做个任务,定时删除日志,如下:
DELETE?ARCHIVELOG?ALL?COMPLETED?BEFORE?'SYSDATE-7';?//删除七天前的归档 ??
DELETE?ARCHIVELOG?FROM?TIME?'SYSDATE-7';?//删除七天到现在的归档 ??