Ora 00257 ошибка архивации пока свободно только внутр соединение

Содержание

  • 1 1. Закончилось место на дисковом томе, куда пишутся архивные логи
    • 1.1 Варианты минимизации ошибок:
  • 2 2. Закончилось место выделенное под FRA

ORA-00257: archiver error. Connect internal only, until freed. (Ошибка архиватора. Не могу подсоедениться пока занят ресурс)

Эта ошибка может быть вызвана несколькими причинами:

1. Закончилось место на дисковом томе, куда пишутся архивные логи

Для начала нужно понять, куда пишутся архивлоги. Для этого возьмем значения следующих параметров в представлении V$PARAMETER:

  • LOG_ARCHIVE_DEST (Устаревший, используется для БД редакции не Enterprise)
  • LOG_ARCHIVE_DEST_n
  • DB_RECOVERY_FILE_DEST. Этот параметр используется, если не установлено значение для любого параметра LOG_ARCHIVE_DEST_n, либо если для параметра LOG_ARCHIVE_DEST_1 установлено значение USE_DB_RECOVERY_FILE_DEST.
SELECT NAME, VALUE
  FROM V$PARAMETER
 WHERE     (   NAME LIKE 'db_recovery_file_dest'
            OR NAME LIKE 'log_archive_dest__'
            OR NAME LIKE 'log_archive_dest___'
            OR NAME = 'log_archive_dest'
            OR NAME = 'log_archive_duplex_dest')
       AND VALUE IS NOT NULL;

И проверим, по каким из путей нет дискового пространства. Для этого можно воспользоваться командой df -Pk. Далее либо чистим место, на тех томах, где пространство занято на 100 процентов, либо командой ALTER изменяем том на который пишутся архивлоги.

Варианты минимизации ошибок:

1. Если используется параметр LOG_ARCHIVE_DEST, то можно указать дополнительно параметры LOG_ARCHIVE_DUPLEX_DEST и LOG_ARCHIVE_MIN_SUCCEED_DEST.

  • LOG_ARCHIVE_DUPLEX_DEST — в этом параметре указываем каталог на дисковом томе, отличном от используемого в параметре LOG_ARCHIVE_DEST.
  • LOG_ARCHIVE_MIN_SUCCEED_DEST — значение этого параметра указываем равным 1. В этом случае, если том указанный в LOG_ARCHIVE_DEST будет заполнен на 100 процентов, но при этом архивлог будет записан в каталог указанный в LOG_ARCHIVE_DUPLEX_DEST, мы не получим ошибку.
ALTER SYSTEM SET LOG_ARCHIVE_DEST = '/u01/ARC/TST/' SCOPE=spfile;
ALTER SYSTEM SET LOG_ARCHIVE_DUPLEX_DEST = '/u02/ARC/TST/' SCOPE=spfile;
ALTER SYSTEM SET LOG_ARCHIVE_MIN_SUCCEED_DEST = 1 SCOPE=spfile;

И перезапускаем БД.

2. Если используются параметры LOG_ARCHIVE_DEST_n. В данном случае нам может помочь опция ALTERNATE этого параметра. В случае, если недоступен путь для архивирования лог файла, то архивирование идет по альтернативно указанному пути:

ALTER SYSTEM SET LOG_ARCHIVE_DEST_1='LOCATION=/u01/ARC/TST/ MANDATORY MAX_FAILURE=1 REOPEN ALTERNATE=LOG_ARCHIVE_DEST_2' SCOPE=both;
ALTER SYSTEM SET LOG_ARCHIVE_DEST_STATE_1=ENABLE SCOPE=both;
ALTER SYSTEM SET LOG_ARCHIVE_DEST_2='LOCATION=/u02/ARC/TST/ MANDATORY' SCOPE=both;
ALTER SYSTEM SET LOG_ARCHIVE_DEST_STATE_2=ALTERNATE SCOPE=both;
ALTER SYSTEM SET LOG_ARCHIVE_DEST_3='SERVICE=standby_path1 ALTERNATE=LOG_ARCHIVE_DEST_4' SCOPE=both;
ALTER SYSTEM SET LOG_ARCHIVE_DEST_STATE_3=ENABLE SCOPE=both;
ALTER SYSTEM SET LOG_ARCHIVE_DEST_4='SERVICE=standby_path2' SCOPE=both;
ALTER SYSTEM SET LOG_ARCHIVE_DEST_STATE_4=ALTERNATE SCOPE=both;

3. Если используется параметр DB_RECOVERY_FILE_DEST, желательно перейти на использование LOG_ARCHIVE_DEST_n.

Для просмотра текущих путей копирования архивлогов можно воспользоваться следующим представлением: V$ARCHIVE_DEST.

2. Закончилось место выделенное под FRA

Если архивлоги настроены на запись в DB_RECOVERY_FILE_DEST_SIZE, то можно так же словить сообщение ORA-00257, в alert.log при этом будет сообщение с ошибкой ORA-19815:

ARC0: Error 19809 Creating archive log file to '/u01/FRA/TST/archivelog/2013_06_28/o1_mf_1_5734_%u_.arc'
Errors in file /orasft/app/diag/rdbms/dwh/TST/trace/TST_arc0_8386.trc:
ORA-19815: WARNING: db_recovery_file_dest_size of 644245094400 bytes is 100.00% used, and has 0 remaining bytes available.
************************************************************************
You have following choices to free up space from recovery area:
1. Consider changing RMAN RETENTION POLICY. If you are using Data Guard,
   then consider changing RMAN ARCHIVELOG DELETION POLICY.
2. Back up files to tertiary device such as tape using RMAN
   BACKUP RECOVERY AREA command.
3. Add disk space and increase db_recovery_file_dest_size parameter to
   reflect the new space.
4. Delete unnecessary files using RMAN DELETE command. If an operating
   system command was used to delete files, then use RMAN CROSSCHECK and
   DELETE EXPIRED commands.
************************************************************************

Тут же дают и варианты решения:

  1. Изменить политику удержания и удаления архивлогов rman.
  2. Сделать бекап архивлогов на ленту с удалением с диска.
  3. Добавить дисковое пространство во FRA командой: ALTER SYSTEM SET DB_RECOVERY_FILE_DEST_SIZE = 1024g  SCOPE=both;
  4. Удалить ненужные архивлоги командами RMAN:
orasft@DB:/home/orasft$ rman target /
-- Если архивлоги не нужны для бекапа:

DELETE ARCHIVELOG ALL COMPLETED BEFORE 'SYSDATE-7';

-- Если архивлоги нужны для бекапа:

CROSSCHECK ARCHIVELOG ALL; 

DELETE EXPIRED ARCHIVELOG ALL;

При удалении архивлогов можем получить ошибку:

RMAN-06207: WARNING: 1235 objects could not be deleted for DISK channel(s) due
RMAN-06208:          to mismatched status.  Use CROSSCHECK command to fix status
RMAN-06210: List of Mismatched objects
RMAN-06211: ==========================
RMAN-06212:   Object Type   Filename/Handle
RMAN-06213: --------------- ---------------------------------------------------
RMAN-06214: Archivelog      /u01/FRA/archivelog/2013_06_09/o1_mf_1_6468_95bhbb33_.arc
RMAN-06214: Archivelog      /u01/FRA/archivelog/2013_06_09/o1_mf_1_6469_95bhh7rb_.arc

Это означает, что rman не может найти файлы для удаления. Тут же нам предлагают воспользоваться командой CROSSCHECK перед удалением: CROSSCHECK ARCHIVELOG ALL;

Чтобы избежать возникновения ошибки переполнения места выделенного под FRA используем для архивлогов параметр LOG_ARCHIVE_DEST_n.

Проверить насколько заполнена FRA можно следующей командой:

SELECT SUM (PERCENT_SPACE_USED) AS "% Used FRA"
  FROM V$FLASH_RECOVERY_AREA_USAGE S;

Автор Андрей Котован

When I try connecting to my database, I get the following error.

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

Till yesterday, the database was pretty functional.

Any workaround?

skaffman's user avatar

skaffman

398k96 gold badges816 silver badges768 bronze badges

asked Apr 26, 2011 at 4:27

MAlex's user avatar

3

In SQL*Plus, can you

SQL> show parameter log_archive
  • If LOG_ARCHIVE_START is FALSE,
    you’ll want to set it to TRUE.
  • If
    LOG_ARCHIVE_DEST points to an
    invalid directory, you’ll want to
    change it to point to a valid
    directory.

answered Apr 26, 2011 at 6:39

Justin Cave's user avatar

Justin CaveJustin Cave

226k24 gold badges364 silver badges382 bronze badges

3

ORA-00257:archiver error is occured when your archivelog reached the FRA limit. So you have to clear the archivelogs or you may increase the FRA limit.

To clear the archivelogs, connect to the command prompt and follow steps below:

rman target /
RMAN> delete archivelog all;

It will ask for confirmation and you have to give ‘yes’.

answered Jun 19, 2018 at 11:54

Enthusiastic learner's user avatar

1

please note that you can only access SQL*PLUS if you login as
sqlplus / as sysdba

Plus, I think the problem here is space quota for archiving
reaching its max limit.

So its best to clear the logs after making backup on a flash or something

answered Dec 7, 2011 at 6:10

nikunj jain's user avatar

ORA-00257: archiver error. Connect internal only, until freed. problem can be solved as following:
copy archivelog folder to a new destination and empty this directory.

The real problem is that online-backup limit increased what was set as n GB and that become full when you empty this archivelog folder then it will start working fine

answered Apr 6, 2017 at 10:29

Ghayel's user avatar

GhayelGhayel

1,1132 gold badges10 silver badges19 bronze badges

I have encountered this error couple of times, it simply tells that archivelog space has exhausted and need to be freed.

run cmd as administrator

> set oracled_sid=write_oracle_sid_here
> rman target sys/put_sys_password_here
> crosscheck archivelog all;
> delete noprompt expired archivelog all;
>exit;

answered Aug 13, 2019 at 6:01

Sadeq Aramideh's user avatar

Sadeq AramidehSadeq Aramideh

431 gold badge2 silver badges7 bronze badges

Open rman or cmd, then type:
connect target sys/live; press enter
then:
delete archivelog all; press enter

Ask for confirmation press y then enter.
Your issue will be solved.

Dennis Kozevnikoff's user avatar

answered Aug 17, 2021 at 8:48

user16686736's user avatar

Oracle 10204, sm2k 1.026sp3
Была ошибка: ORA-01033: ORACLE initialization or shutdown in progress. Как выяснил считали себестоимость, перенос прервали, не дождались прерывания и ребутнули по питанию. После этого не запускались модули см2к, выдавая ORA-01033.

SQLplus не запускался, поиском находил https://olegon.ru/showthread.php?t=5…ight=ORA-01033
Делал в cmd: https://storage.olegon.ru/supermag/u…й документ.txt
Запускался оптимайзер кроном, после обнаружил, что в службах см2к «запустилась» база. В адм. модуле видел не завершенный перенос, полную очистку попробовал сделать — зависло приложение «не отвечает», снял задачу, запустил еще раз адм.модуль, решил продолжить перенос. Перенос пошел, на 3% остановился, 1.5часа прошло с момента старта. При логине в еще 1 копию адм.модуля, либо базовый модуль выдается ORA-00257 (в SQLplus звучит: ошибка архивации. Пока свободно только внутр. соединение)
Что делать?

Hello Readers, You are here because you faced ORA-00257: Archiver error. Connect AS SYSDBA only until resolved error ? Lets come to point ->

ORA-00257: Archiver error. Connect AS SYSDBA only until resolved error means archiver process is stuck because of various reasons due to which redo logs are not available for further transaction as database is in archive log mode and all redo logs requires archiving. And your database is in temporary still state.

Environment Details –

OS Version – Linux 7.8
DB Version – 19.8 (19)
Type – Test environment


SQL> select name,open_mode,database_role,log_mode from v$database;

NAME		     OPEN_MODE		  DATABASE_ROLE    LOG_MODE
-------------------- -------------------- ---------------- ----------
ORACLEDB	     READ WRITE 	  PRIMARY          ARCHIVELOG

SQL>

SQL> select GROUP#,SEQUENCE#,BYTES,MEMBERS,ARCHIVE,STATUS from v$log;

GROUP# SEQUENCE# BYTES     MEMBERS ARC STATUS   
------ --------- --------- ------- --- -------- 
     1	      25 209715200       2 NO  CURRENT	 
     2	      23 209715200       2 NO  INACTIVE
     3	      24 209715200       2 NO  INACTIVE

SQL> 

There are various reason which cause this error-

  1. One of the common issue here is archive destination of your database is 100% full.
  2. The mount point/disk group assigned to archive destination or FRA is dismounted due to OS issue/Storage issue.
  3. If db_recovery_file_dest_size is set to small value.
  4. Human Error – Sometimes location doesn’t have permission or we set to location which doesn’t exists.

What Happens when ORA-00257: Archiver error. Connect AS SYSDBA only until resolved Error occurs

Lets us understand what end user see and understand there pain as well. So when a normal user try to connect to the database which is already in archiver error (ORA-00257: Archiver error. Connect AS SYSDBA only until resolved ) state then they directory receive the error –

ORA-00257: Archiver error. Connect AS SYSDBA only until resolved on the screen.

SQL> conn dbsnmp/oracledbworld
ERROR:
ORA-00257: Archiver error. Connect AS SYSDBA only until resolved.


Warning: You are no longer connected to ORACLE.
SQL> 

You might be wondering what happens to the user which is already connected to the oracle database. In this case if they trying to do a DML, it will stuck and will not come out. For example here I am just trying to insert 30k record here again which is stuck and didn’t came out.

SQL> conn system/oracledbworld
connected.

SQL> create table oracledbworld2 as select * from oracledbworld;

Table created.

SQL> insert into oracledbworld select * from oracledbworld2;

29965 rows created.

SQL> /


How to Check archive log location

Either you can fire archive log list or check your log_archive_dest_n to see what location is assigned

SQL> select name,open_mode,database_role,log_mode,force_logging from v$database;

NAME	  OPEN_MODE    DATABASE_ROLE	LOG_MODE     FORCE_LOGGING
--------- ------------ ---------------- ------------ ----------------
ORACLEDB  READ WRITE   PRIMARY		ARCHIVELOG   YES

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

When you see USE_DB_RECOVERY_FILE_DEST, that means you have enabled FRA location for your archive destination. So here you have to check for db_recover_file_dest to get the diskgroup name / location where Oracle is dumping the archive log files.

SQL> show parameter db_recover_file_dest

What are Different Ways to Understand if there is ORA-00257: Archiver error. Connect AS SYSDBA only until resolved Error

There are different ways to understand what is there issue. Usually end user doesn’t understand the ORA- code and they will rush to you with a Problem statement as -> DB is running slow or I am not able to login to the database.

Check the Alert Log First –

Always check alert log of the database to understand what is the problem here –

I have set the log_archive_dest_1 to a location which doesn’t exists to reproduce ORA-00257: Archiver error. Connect AS SYSDBA only until resolved Error. So alert log clearly suggest that

ORA-19504: failed to create file %s
ORA-27040: file create error, unable to create file
Linux-x86-64 Error: 13: Permission denied.

In middle of the alert – “ORACLE Instance oracledb, archival error, archiver continuing”

At 4th Last line you might seen the error – “All online logs need archiving”

ORA-00257: Archiver error. Connect AS SYSDBA only until resolved Error

Check Space availability –

Once you rule out that there is no human error, and the archive log location exists Now you should check if mount point/ disk group has enough free space available, if it is available for writing and you can access it.

If your database is on ASM, then you can use following query – Check for free_mb/usable file mb and state column against your diskgroup name.

SQL> select name,state,free_mb,usable_file_mb,total_mb from v$asm_diskgroup;

If your database is on filesystem, then you can use following OS command –

For linux, sun solaris -

$df -kh 

For AIX -

$df -gt   

If case you have FRA been used for archive destination then we have additional query to identify space available and how much is allocated to it.

SQL> select name, space_limit as Total_size ,space_used as Used,SPACE_RECLAIMABLE as reclaimable ,NUMBER_OF_FILES as "number" from  V$RECOVERY_FILE_DEST;

NAME			           TOTAL_SIZE USED       RECLAIMABLE number
---------------------------------- ---------- ---------- ----------- ----------
/u01/app/oracle/fast_recovery_area 10485760   872185344  68794880	  25
SQL> Select file_type, percent_space_used as used,percent_space_reclaimable as reclaimable,number_of_files as "number" from v$recovery_area_usage;

FILE_TYPE	        USED       RECLAIMABLE number
----------------------- ---------- ----------- ----------
CONTROL FILE		100.94	   0		1
REDO LOG		6000	   0		3
ARCHIVED LOG		1900.78	   452.02	18
BACKUP PIECE		306.09	   204.06	3
IMAGE COPY		0	   0		0
FLASHBACK LOG		0	   0		0
FOREIGN ARCHIVED LOG	0	   0		0
AUXILIARY DATAFILE COPY 0	   0		0

8 rows selected.

You can look at sessions and event to understand what is happening in the database.

If you see there are 3 sessions, SID 237 is my session Rest two sessions are application session and when we look at the event of those two application session it clearly suggest session is waiting for log file switch (archiving needed).

select sid,serial#,event,sql_id from v$session where username is not null and status='ACTIVE';

SID    SERIAL# EVENT				        SQL_ID	    
--- ---------- ---------------------------------------- -------------
237	 59305 SQL*Net message from client	        7wcvjx08mf9r6
271	 46870 log file switch (archiving needed)       7zq6pjtwy552p
276	 18737 log file switch (archiving needed)       a5fasv0jz2mx2

How to Resolve ORA-00257: Archiver error. Connect AS SYSDBA only until resolved error

It’s always better to know the environment before firing any command. Archive deletion can be destructive for DR setup or Goldengate Setup.

Solution 1

Check if you have DR database and it’s in sync based on that take a call of clearing the archive until sequence. You can use following command on RMAN prompt.

delete archivelog until sequence <sequence> thread <thread no>;

Solution 2

You can change destination to a location which has enough space.

SQL>archive log list
SQL>show parameter log_archive_dest_1 
(or whichever you are using it, usually we use dest_1)

Say your diskgroup  +ARCH is full and +DATA has lot of space then you can fire

SQL> alter system set log_archive_dest_1='location=+DATA reopen';

You might be wondering why reopen. So since your archive location was full. There are chances if you clear the space on OS level and archiver process still remain stuck. Hence we gave reopen option here.

Solution 3

Other reason could be your db_recovery_file_dest_size is set to lower size. Sometimes we have FRA enabled for archivelog. And we have enough space available on the diskgroup/ filesystem level.

archive log list;
show parameter db_recovery_file_dest_size
alter system set db_recovery_file_dest_size=<greater size then current value please make note of filesystem/diskgroup freespace as well>
example -
Initially it was 20G
alter system set db_recovery_file_dest_size=100G sid='*';

Reference – archive Document 2014425.1

RU

ORA-00257: ошибка архивации. Пока свободно только внутр. соединение

Данная ошибка связана с переполнением диска/пространства для FRA.
Для диагностики данной ошибки проверить свободное пространство на диске, после проверить размер области FRA и в случаи необходимости ее расширить.

Ошибка может быть следствием поломки наката на standby или системы резервного копирования.
Проверить процент свободного места во FRA можно используя следующий запрос:

Исправление:
1. Увеличить значение параметра db_recovery_file_dest_size (текущее значение 50G)

Если база не открыта:


sqlplus / as sysdba
sql> startup nomount;
sql> alter system set db_recovery_file_dest_size=100G scope=both
sql> shutdown immediate
sql> startup


Если база открыта:


sqlplus / as sysdba
sql> alter system set db_recovery_file_dest_size=100G scope=both
sql>alter system switch logfile;
sql>exit;


Разобраться в причинах:

1. Сломался бэкап и архивные журналы перестали зачищаться.
2. Увеличилась нагрузка на БД и места просто не хватает.
3. База тестовая, настройка включена ошибочно. Рассмотреть возможность перевода БД в режим noarchivelog или добавить в cron (scheduller) скрипт удаляющий старые архивные журналы

EN

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

This error is related to disk / space overflow for FRA.
To diagnose this error, check the free space on the disk, then check the size of the FRA area and, if necessary, expand it.

The error may be the result of a breakdown of the roll-forward to standby or the backup system.
You can check the percentage of free space in the FRA using the following query:
Correction:
1. Increase the value of the db_recovery_file_dest_size parameter (the current value is 50G)
If the base is not open:


sqlplus / as sysdba
sql> startup nomount;
sql> alter system set db_recovery_file_dest_size = 100G scope = both
sql> shutdown immediate
sql> startup


If the base is open:


sqlplus / as sysdba
sql> alter system set db_recovery_file_dest_size = 100G scope = both
sql> alter system switch logfile;
sql> exit



Understand the reasons:

1. The backup broke and the archived logs were no longer cleaned up.
2. The load on the database has increased and there is simply not enough space.
3. The base is test, the setting is turned on by mistake. Consider the possibility of switching the database to noarchivelog mode or add a script to cron (scheduller) that deletes old archived logs

SQL =>

select name,
round(space_limit/1024/1024/1024) "limit",
round(space_used/1024/1024/1024) "used",
round(((space_limit-space_used)/space_limit)*100) "free"
from v$recovery_file_dest
where name is not null

Возможно, вам также будет интересно:

  • Or trash 08 ошибка
  • Or pmsa 59 ошибка тинькофф
  • Or pmsa 59 ошибка при оплате
  • Or imira 34 код ошибки что значит
  • Or ieh 01 ошибка как исправить

  • Понравилась статья? Поделить с друзьями:
    0 0 голоса
    Рейтинг статьи
    Подписаться
    Уведомить о
    guest

    0 комментариев
    Старые
    Новые Популярные
    Межтекстовые Отзывы
    Посмотреть все комментарии