代码改变世界

ORA-00257 archiver error 处理思路

  AlfredZhao  阅读(967)  评论(0编辑  收藏  举报

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;

4.查看备份是否存在问题

①检查备份策略
比如备份之后是否有删除机制,

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-字样的分析原因。

编辑推荐:
· Java 中堆内存和栈内存上的数据分布和特点
· 开发中对象命名的一点思考
· .NET Core内存结构体系(Windows环境)底层原理浅谈
· C# 深度学习:对抗生成网络(GAN)训练头像生成模型
· .NET 适配 HarmonyOS 进展
阅读排行:
· 本地部署 DeepSeek:小白也能轻松搞定!
· 如何给本地部署的DeepSeek投喂数据,让他更懂你
· 从 Windows Forms 到微服务的经验教训
· 李飞飞的50美金比肩DeepSeek把CEO忽悠瘸了,倒霉的却是程序员
· 超详细,DeepSeek 接入PyCharm实现AI编程!(支持本地部署DeepSeek及官方Dee
点击右上角即可分享
微信分享提示