Recently, there is a connection alarm received an Oracle server, just started to think that Oracle's monitoring is turned off, the results of a server to see the Oracle's listening process is normal, the connection once found that there is reported ORA-00257 error, And go to the surveillance system. After looking at the log and then using Sqlplus to connect to Oracle, knowing that Oracle's archive log fills the flashback zone causing an Oracle connection exception, view the archive log method as follows:
Sql> show parameter db_recovery_file_dest; #查看归档日志的物理路径及闪回区的大小SQL > select File_type, percent_space_used as used, Percent_space_reclaimable as reclaimable, number_of_files as "number" from V$flash_recovery_area_usage; #查询闪回区利用率
Connect Oracle with the Rman tool to clean up some old history archive logs:
[[email protected] ~]$ Rman target/rman> DELETE ARCHIVELOG all completed before ' SYSDATE-30 '; Slightly... Really want to delete the above objects (enter YES or NO)? YES ... Slightly... Rman> quit
Here is deleted 30 days before the archive log, of course, can be modified according to the actual situation, the connection once
Archived logs under Oracle can be used for data recovery in the event that other online logs are lost, so they are typically turned on in the production environment, but if some unused or historically archived logs are not cleaned up, a full flashback zone will cause a connection exception. Of course, you need to pay attention to clean up Oracle's archive log cleanup, and write a script that cleans up Oracle's archived logs on a daily schedule:
#!/bin/bash#remove_archivelog.shsu-oracle-c "Rman target/<<eofdelete archivelog all completed before ' SYSDATE- 30 '; Yesexiteof "
Of course, you can keep the required archive log time according to the actual situation
This article from "Jim's Technical Essay" blog, declined to reprint!
Oracle Archive log full causes Oracle Connectivity (ORA-00257) error handling