ORA-00257:archiver error.Connect internal only,until freed.

问题现象

使用navicat连接oracle时无法连接上去,提示这个错误

问题原因

归档日志占用空间满了,注意这里分为两个

  1. 硬盘空间不足了
  2. 硬盘空间足够但是归档日志空间不够了

解决方案

  1. 针对第一种情况,拓展本地硬盘空间,或删除之前日志
  2. 针对第二种情况,需要设置归档日志大小,或删除归档日志

连接到SQL查询归档状态

shell 复制代码
[root@localhost ~]# docker exec -it oracle11g bash
[oracle@82a1fe0258ea /]$ sqlplus / as sysdba
SQL*Plus: Release 11.2.0.1.0 Production on Wed Apr 10 09:05:12 2024

Copyright (c) 1982, 2009, Oracle.  All rights reserved.


Connected to:
Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - 64bit Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options

SQL> select flashback_on from v$database;

FLASHBACK_ON
------------------
NO

SQL> archive log list;
Database log mode              Archive Mode
Automatic archival             Enabled
Archive destination            USE_DB_RECOVERY_FILE_DEST
Oldest online log sequence     265
Next log sequence to archive   265
Current log sequence           268
SQL> show parameter recover;

NAME                                 TYPE        VALUE
------------------------------------ ----------- ------------------------------
db_recovery_file_dest                string      /home/oracle/app/oracle/flash_
                                                 recovery_area
db_recovery_file_dest_size           big integer 3882M
recovery_parallelism                 integer     0
SQL> alter system set db_recovery_file_dest_size=100G scope=both;

System altered.

SQL> exit
Disconnected from Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - 64bit Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options

操作说明

复制代码
1.查看归档路径
archive log list;
Arcive destination      USE_DB_RECOVERY_FILE_DEST
此参数代表归档存放路径,本地存放为/opt/oracle...,asm为+archdg
当为以上参数时,代表存放到数据闪回区

2.查看闪回区设置
show parameter recover;

db_recovery_file_dest  #表示存放路径
db_recovery_file_dest_size  #表示可以使用的空间大小


3.设置闪回区大小
alter system set db_recovery_file_dest_size=100G scope=both;


4.查看归档空间使用情况
select * from v$flash_recovery_area_usage;


查看闪回区是否开启

select flashback_on from v$database;

开启闪回
SQL>shutdown immediate;
SQL>startup mount;
SQL>alter database archivelog;
SQL> alter database flashback on;

关闭闪回
SQL>shutdown immediate;
SQL>startup mount;
SQL>alter database flashback off;

切换到rman删除归档日志

shell 复制代码
[oracle@82a1fe0258ea /]$ rman target /

Recovery Manager: Release 11.2.0.1.0 - Production on Wed Apr 10 09:07:55 2024

Copyright (c) 1982, 2009, Oracle and/or its affiliates.  All rights reserved.

connected to target database: HELOWIN (DBID=1384114315)

RMAN> list archivelog all;

using target database control file instead of recovery catalog
List of Archived Log Copies for database with db_unique_name HELOWIN
=====================================================================

Key     Thrd Seq     S Low Time 
------- ---- ------- - ---------
1       1    1       A 04-JAN-16

RMAN> crosscheck archivelog all;

allocated channel: ORA_DISK_1
channel ORA_DISK_1: SID=131 device type=DISK
validation succeeded for archived log
archived log file name=/home/oracle/app/oracle/flash_recovery_area/HELOWIN/archivelog/2024_04_07/o1_mf_1_1_m1467glz_.arc RECID=1 STAMP=1165665262


RMAN> delete archivelog all completed before 'sysdate-1'; 

released channel: ORA_DISK_1
allocated channel: ORA_DISK_1
channel ORA_DISK_1: SID=131 device type=DISK
List of Archived Log Copies for database with db_unique_name HELOWIN
=====================================================================

Key     Thrd Seq     S Low Time 
------- ---- ------- - ---------
1       1    1       A 04-JAN-16
        Name: /home/oracle/app/oracle/flash_recovery_area/HELOWIN/archivelog/2024_04_07/o1_mf_1_1_m1467glz_.arc
Do you really want to delete the above objects (enter YES or NO)? yes
deleted archived log
archived log file name=/home/oracle/app/oracle/flash_recovery_area/HELOWIN/archivelog/2024_04_07/o1_mf_1_1_m1467glz_.arc RECID=1 STAMP=1165665262

Deleted 50 objects


RMAN> delete archivelog all completed before 'trunc(sysdate-1)+2/24';

released channel: ORA_DISK_1
allocated channel: ORA_DISK_1
channel ORA_DISK_1: SID=131 device type=DISK

RMAN> list archivelog all;

List of Archived Log Copies for database with db_unique_name HELOWIN
=====================================================================

Key     Thrd Seq     S Low Time 
------- ---- ------- - ---------
51      1    51      A 09-APR-24
        Name: /home/oracle/app/oracle/flash_recovery_area/HELOWIN/archivelog/2024_04_09/o1_mf_1_51_m195pxfd_.arc
相关推荐
代码老y1 小时前
穿透、误伤与回环——Redis 缓存防御体系的负向路径与治理艺术
数据库·redis·缓存
Themberfue1 小时前
Redis ①⑥-缓存
数据库·redis·adb·缓存
Kyln.Wu1 小时前
【python实用小脚本-139】Python 在线图片批量下载器:requests+PIL 一键保存网络图像
数据库·python·php
李元豪3 小时前
grpo nl2sql qwen3 模型强化学习训练有效果的成立条件有哪些
数据库·oracle
Hello.Reader6 小时前
RedisJSON 路径语法深度解析与实战
数据库·redis·缓存
TDengine (老段)7 小时前
TDengine 使用最佳实践(2)
大数据·数据库·物联网·时序数据库·iot·tdengine·涛思数据
设计师小聂!9 小时前
Linux系统中部署Redis详解
linux·运维·数据库·redis
kfepiza9 小时前
Debian-10编译安装Mysql-5.7.44 笔记250706
linux·数据库·笔记·mysql·debian·bash
Touper.9 小时前
Redis 基础详细介绍(Redis简单介绍,命令行客户端,Redis 命令,Java客户端)
java·数据库·redis
不剪发的Tony老师9 小时前
phpMyAdmin:一款经典的MySQL在线管理工具又回来了
数据库·mysql·phpmyadmin