代码改变世界

ORA-00257 archiver error 处理思路

2015-04-23 22:16  AlfredZhao  阅读(...)  评论(...编辑  收藏

1.首先查下oerr给出的简要说明

`oerr ora 257` ``` 00257, 00000, "archiver error. Connect internal only, until freed." // *Cause: The archiver process received an error while trying to archive // a redo log. If the problem is not resolved soon, the database // will stop executing transactions. The most likely cause of this // message is the destination device is out of space to store the // redo log file. // *Action: Check archiver trace file for a detailed description //of the problem. Also verify that the // device specified in the initialization parameter // ARCHIVE_LOG_DEST is set up properly for archiving. ```

2.查询V$RECOVERY_AREA_USAGE信息

SQL> select * from V$RECOVERY_AREA_USAGE;

FILE_TYPE            PERCENT_SPACE_USED PERCENT_SPACE_RECLAIMABLE NUMBER_OF_FILES
-------------------- ------------------ ------------------------- ---------------
CONTROL FILE                          0                         0               1
REDO LOG                              0                         0               0
ARCHIVED LOG                      79.36                         0              58
BACKUP PIECE                      18.98                         0               8
IMAGE COPY                            0                         0               0
FLASHBACK LOG                         0                         0               0
FOREIGN ARCHIVED LOG                  0                         0               0

7 rows selected.

SQL> select sum(percent_space_used) from v$recovery_area_usage;

SUM(PERCENT_SPACE_USED)
-----------------------
                  98.34

注:10g是v$flash_recovery_area_usage

确定归档位置:

SQL> archive log list
Database log mode              Archive Mode
Automatic archival             Enabled
Archive destination            USE_DB_RECOVERY_FILE_DEST
Oldest online log sequence     1412
Next log sequence to archive   1417
Current log sequence           1417

SQL> show parameter db_recovery

NAME                                 TYPE        VALUE
------------------------------------ ----------- ------------------------------
db_recovery_file_dest                string      +DATA
db_recovery_file_dest_size           big integer 350G

3.根据实际空间剩余情况先适当增加归档目录的大小,保证先恢复业务

``` SQL> select NAME, TOTAL_MB, FREE_MB from v$asm_diskgroup;

NAME TOTAL_MB FREE_MB


DATA 3068928 2418353

`alter system set db_recovery_file_dest_size = 600G;` 

<h1 id="4"> 4.查看备份是否存在问题 </h1>
①检查备份策略
比如备份之后是否有删除机制, 

crosscheck backup;
crosscheck archivelog all;
delete expired archivelog all;
delete archivelog until time 'sysdate-1';
backup archivelog all delete input fromat '';
delete noprompt obsolete;

②检查备份日志
vi 找`ORA-`字样的分析原因。