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

问题现象

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

问题原因

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

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

解决方案

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

连接到SQL查询归档状态

[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删除归档日志

[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

相关推荐

  1. Oracle 解决ORA-00257 Archiver error 报错

    2024-04-10 15:24:04       67 阅读
  2. ORA-00257:archiver error.Connect internal only,until freed.

    2024-04-10 15:24:04       34 阅读
  3. <span style='color:red;'>ORA</span>-29548

    ORA-29548

    2024-04-10 15:24:04      37 阅读
  4. expdp时报错ORA-31693&ORA-02354&ORA-01555

    2024-04-10 15:24:04       53 阅读
  5. ORA-01031: insufficient privileges

    2024-04-10 15:24:04       60 阅读

最近更新

  1. docker php8.1+nginx base 镜像 dockerfile 配置

    2024-04-10 15:24:04       99 阅读
  2. Could not load dynamic library ‘cudart64_100.dll‘

    2024-04-10 15:24:04       107 阅读
  3. 在Django里面运行非项目文件

    2024-04-10 15:24:04       90 阅读
  4. Python语言-面向对象

    2024-04-10 15:24:04       98 阅读

热门阅读

  1. ffmpeg视频转换 webp

    2024-04-10 15:24:04       37 阅读
  2. 微信h5实现上传不低于30s

    2024-04-10 15:24:04       38 阅读
  3. 力扣经典150题第五题:多数元素

    2024-04-10 15:24:04       37 阅读
  4. 去了加拿大才能知道的一些事

    2024-04-10 15:24:04       33 阅读
  5. Eureka注册步骤

    2024-04-10 15:24:04       33 阅读