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
相关推荐
fensnote2 小时前
QTableView使用QSortFilterProxyModel后行号错乱
数据库
huapiaoy4 小时前
Redis的一些通用指令
数据库·redis·缓存
Lojarro4 小时前
后端-navicat查找语句(单表与多表)
数据库·mysql
月泪同学5 小时前
数据库面试题整理
数据库·mysql·面试
程序员学习随笔6 小时前
PostgreSQL技术内幕11:PostgreSQL事务原理解析-MVCC
数据库·postgresql
莫叫石榴姐8 小时前
一份热乎的阿里25届数据分析面试题
数据库·数据仓库·sql·算法·数据挖掘·数据分析
cong*8 小时前
数据库提权【笔记总结】
数据库·笔记·adb
没明白白9 小时前
Redis 缓存雪崩、缓存穿透、缓存击穿详解
数据库·redis·缓存
gbase_lmax9 小时前
gbase8s数据库常见的索引扫描方式
数据库
阳光九叶草LXGZXJ9 小时前
南大通用数仓-GCDW-学习-03-用户管理
linux·运维·数据库·学习