HA & DR

ORA-00257: The Database Stopped Accepting Writes. The Archiver Is Stuck.


The pager goes off at 3 a.m.: the application is frozen. Every screen that tries to save hangs, and the ones that time out come back with ORA-00257: archiver error. Connect internal only, until freed. The database didn’t crash — SELECT still works, you can connect as SYSDBA, the alert log shows no corruption. But nothing can write. The whole business is stopped by a message that reads like a riddle.

Here’s the part that turns the panic into a ten-minute fix: ORA-00257 is not a failure — it’s a refusal. The database is in ARCHIVELOG mode, which means it promises to archive every online redo log before reusing it, so you never lose a committed transaction. The archiver can’t keep that promise right now, so rather than overwrite redo it hasn’t safely copied, it stops accepting new redo altogether. Nine times out of ten the reason is mundane: the place the archived logs go is full. This post is what ORA-00257 actually means, how to confirm the cause in three queries, the fix that clears it without throwing away your recovery window, and a lab that forces the error on demand and then resolves it.

What ORA-00257 actually is

In ARCHIVELOG mode, Oracle writes changes to the online redo logs in a circle — a small, fixed set of groups it fills and reuses. Before it can reuse a group, the archiver process (ARCn) must copy that group to an archive destination — almost always the Fast Recovery Area (FRA), the managed disk area Oracle also uses for backups and flashback logs. That archived copy is what lets RMAN recover the database to any point in time.

ORA-00257 happens when the archiver cannot write the next archived log, so the online logs can’t be recycled, so the database runs out of redo space — and refuses new redo rather than lose it. The message says “connect internal only” (on current releases, Connect AS SYSDBA only until resolved): privileged sessions can still get in to fix it, but everyone else is locked out the instant they try to generate redo.

The critical reframing: ORA-00257 is the symptom the user sees; it is almost never the actual error. The real error is on the archiver side, and it’s usually ORA-19809: limit exceeded for recovery files — the FRA is full. Chase the ORA-00257 and you’ll go in circles; chase the ORA-19809 and you’ll be done in minutes.

Why it happens

The most common cause is the least dramatic one: archived logs piled up and nobody removed them. The FRA has a fixed size (db_recovery_file_dest_size). Every log switch adds an archived log to it. If your backups aren’t also deleting the archived logs they’ve captured — or you have no archive-log backup at all — the FRA fills at exactly the rate the database generates redo. A busy day, a bulk load, an index rebuild, and the area that was “80% full, we’ll deal with it later” tips over.

Then the chain reaction:

  • The FRA hits its size limit. ARCn tries to create the next archived log, fails with ORA-19809, and marks the archive destination ERROR. The alert log says, in as many words, Stuck archiver condition declared.
  • The online redo logs keep filling with new changes, but none of them can be archived, so none can be reused.
  • The moment the database needs to advance into a log it can’t recycle, it stops. Sessions generating redo block; new non-SYSDBA sessions are turned away with ORA-00257.

Other flavors exist — the archive destination points at a filesystem that filled, a directory that lost its permissions, or a Data Guard standby that’s unreachable — but they all reduce to the same thing: the archiver has nowhere to put the next log. The FRA-full case is by far the most common, and the one this lab reproduces.

flowchart TD
A["ARCHIVELOG mode: every online redo log<br/>must be archived before reuse"] --> B["archived logs accumulate<br/>in the fixed-size FRA"]
B --> C{"Are archived logs<br/>backed up and removed?"}
C -->|"yes — RMAN backup + delete"| G["FRA stays healthy,<br/>archiver keeps up"]
C -->|"no — they just pile up"| D["FRA hits its size limit"]
D --> E["ARCn can't write next log → ORA-19809<br/>archive destination = ERROR"]
E --> F["online logs can't be reused →<br/>instance refuses redo → ORA-00257"]
F --> H["Fix: back up + delete archived logs<br/>(and grow the FRA) → archiver resumes"]
H --> G
ARCHIVELOG mode promises to archive every online redo log before reusing it. Archived logs accumulate in the fixed-size Fast Recovery Area; if backups never remove them, the FRA fills. ARCn then can't write the next archived log (ORA-19809), the archive destination goes to ERROR, the online logs can't be recycled, and the instance refuses new redo — non-SYSDBA sessions get ORA-00257. Freeing the FRA (back up and delete the archived logs, and/or grow it) lets the archiver resume and writes continue.

Confirm the cause in three queries

Don’t guess — the state is fully visible. As SYSDBA:

-- 1. How full is the FRA, and is it the problem?
select space_limit/1024/1024 as limit_mb,
       space_used /1024/1024 as used_mb,
       round(space_used/space_limit*100) as pct
from   v$recovery_file_dest;

-- 2. What is filling it? (almost always ARCHIVED LOG)
select file_type, percent_space_used
from   v$recovery_area_usage
order  by percent_space_used desc;

-- 3. Is the archive destination in error, and why?
select dest_id, status, error
from   v$archive_dest
where  destination is not null;

If query 1 shows ~100% used, query 2 shows ARCHIVED LOG dominating it, and query 3 shows STATUS = ERROR with ORA-19809, you have the FRA-full case — and the alert log will confirm it with Stuck archiver condition declared. That’s your whole diagnosis.

Reproduce it

You don’t have to wait for a 3 a.m. page to see this. Put a database in ARCHIVELOG mode, point archiving at a deliberately tiny 50 MB Fast Recovery Area, and generate a little redo. A couple of log switches fill the FRA; the archiver’s destination fails; then one “application” session floods redo and blocks on a log switch it can’t complete — driving the online logs to full-and-unarchived. Now a normal user tries to connect and work:

round 1: FRA=78%  dest_1=ERROR
>> A normal (non-SYSDBA) user now tries to connect and write...
   ORA-00257: Archiver error. Connect AS SYSDBA only until resolved.

That’s the outage, reproduced deterministically: the archive destination is in ERROR (ORA-19809 under the hood), and every non-SYSDBA session is refused with ORA-00257 — while / as sysdba still connects, exactly as the message promises.

The fix

Two levers, in order. First stop the bleeding, then fix the cause.

Immediate relief — give the archiver room. If you have disk headroom, growing the recovery area unsticks the database in one command, because the archiver retries automatically the moment space appears:

alter system set db_recovery_file_dest_size = 500m scope=both;   -- size to your reality

The real fix — back the archived logs up and remove them. Growing the FRA only delays the next fill; the archived logs are still piling up. Reclaim the space and keep your recovery window by backing the logs up to a location outside the FRA and deleting the inputs, with RMAN:

RMAN> backup archivelog all format '/backup/arch_%U' delete all input;

That copies every archived log to /backup, deletes the FRA copies it just secured, and frees the space — so you can still recover, and the FRA drains. Once there’s room, the destination returns to VALID and writes resume:

FRA now 14% full, dest_1 = VALID
ARC_OK ROWS=450002

Same database, same user that was locked out a moment ago — now connecting and writing.

Don’t take my word for it — run it. The archiver-stuck lab puts Oracle Database Free in ARCHIVELOG mode with a 50 MB FRA, fills it until the archive destination goes to ERROR (ORA-19809), and asserts that a normal user is refused with ORA-00257 while SYSDBA still connects. Then it runs the RMAN backup-and-delete plus a size bump and asserts the destination returns to VALID and the same user writes again. If the outage doesn’t reproduce — or survives the fix — the run fails. Proven on every CI push.

The point isn’t the emergency; it’s that you should never have to run it. Once you’re back up: schedule the archive-log backup (BACKUP ARCHIVELOG ALL DELETE INPUT on a cadence that keeps ahead of your redo rate), size the FRA for real workload plus a safety margin, and monitor V$RECOVERY_FILE_DEST percent-used with an alert well below 100% — 85% is a good line. The whole outage is a monitoring gap wearing an error number.

What teams get wrong

  • rm on the archived logs. Deleting archived logs at the OS level frees space and silently breaks your backups: RMAN still thinks those logs exist, its recovery catalog is now wrong, and your next restore fails at the worst possible time. Always delete through RMAN (DELETE ARCHIVELOG, or DELETE ... INPUT on a backup), or at minimum CROSSCHECK ARCHIVELOG ALL afterward so RMAN knows what’s really there.
  • Deleting without backing up. Freeing the FRA by deleting archived logs you never captured unsticks the database and destroys your ability to recover to any point after your last full backup. Back up first, then delete — that’s what DELETE INPUT does in one step.
  • Turning off ARCHIVELOG mode to make it stop. NOARCHIVELOG makes ORA-00257 impossible because it makes point-in-time recovery impossible. That’s not a fix; it’s trading an outage for the inability to recover from the next one. Keep archiving on and fix the space.
  • Sizing the FRA once and forgetting it. Redo volume grows with the workload. An FRA that held three days of logs last year holds eight hours during this year’s migration. Size it against current redo generation, not the day you built the database.
  • No monitoring. ORA-00257 almost never arrives without warning — the FRA climbs through 80%, 90%, 95% over hours or days. A single alert on V$RECOVERY_FILE_DEST percent-used turns a 3 a.m. outage into a ticket you handle at 4 p.m.
  • Assuming it’s always the FRA. Usually it is, but check V$ARCHIVE_DEST.ERROR — a full non-FRA archive filesystem, a permissions change, or an unreachable Data Guard destination produces the same ORA-00257 with a different root error. Fix the destination the error actually names.

Frequently asked questions

What does ORA-00257 archiver error mean?

ORA-00257 means the database is in ARCHIVELOG mode and the archiver process (ARCn) cannot write the next archived redo log, so the database has run out of reusable online redo log space and is refusing new redo rather than overwriting redo it has not safely archived. Because writing any change requires redo, the database effectively stops accepting writes: SELECT and existing read-only work continue, but any session that tries to generate redo hangs or is turned away. The message 'connect internal only, until freed' (on current releases, 'Connect AS SYSDBA only until resolved') means privileged administrative sessions can still connect to fix the problem while ordinary sessions are locked out. It is a protective refusal, not a crash or corruption — no committed data is lost, and the database recovers fully once the archiver can write again.

Why is my Oracle database stuck with ORA-00257?

In the overwhelming majority of cases the archive destination is full — specifically the Fast Recovery Area (FRA), the fixed-size disk area Oracle archives into. Archived redo logs accumulate there at the rate the database generates redo, and if your backups do not also delete the archived logs they capture (or you have no archive-log backup), the FRA fills to its db_recovery_file_dest_size limit. ARCn then fails to create the next archived log with ORA-19809 (limit exceeded for recovery files), marks the archive destination ERROR, the online redo logs can no longer be recycled, and the instance refuses redo with ORA-00257. Less commonly the cause is a non-FRA archive directory that filled up, a permissions or path change on the archive location, or an unreachable Data Guard standby destination — all of which leave the archiver with nowhere to write. Check V$ARCHIVE_DEST.ERROR to see which.

How do I fix ORA-00257?

Fix it in two steps. First, get the database writable again by giving the archiver room: if the cause is a full FRA and you have disk headroom, ALTER SYSTEM SET db_recovery_file_dest_size to a larger value clears the stuck condition immediately because the archiver retries automatically as soon as space appears. Second, fix the real cause by reclaiming space the right way: use RMAN to back up the archived logs to a location outside the FRA and delete the inputs in one step (BACKUP ARCHIVELOG ALL DELETE ALL INPUT), which frees the FRA while preserving your ability to recover. Never delete archived logs with an OS rm, because RMAN's view of them becomes wrong and future restores fail. After you are back up, schedule regular archive-log backups that delete input, size the FRA for the real workload, and monitor its percent-used so the next fill is a ticket, not an outage.

What is the difference between ORA-00257 and ORA-19809?

They are two ends of the same problem. ORA-19809, 'limit exceeded for recovery files,' is the error the archiver itself hits when it tries to write into a Fast Recovery Area that has reached its size limit; you see it in the alert log and in V$ARCHIVE_DEST.ERROR, and it is the root cause. ORA-00257, 'archiver error, connect internal only,' is the downstream symptom that ordinary user sessions see once the archiver is stuck and the database can no longer accept redo. Diagnosing from ORA-00257 alone tends to go in circles because it does not say why the archiver failed; the actionable error is ORA-19809 (or whatever error V$ARCHIVE_DEST shows for the failed destination), which points directly at the full recovery area.

Can I just delete archived logs to fix ORA-00257?

You can, but only through RMAN, and ideally only after backing them up. Deleting archived logs with an OS-level rm frees the space but leaves RMAN and its recovery catalog believing those logs still exist, which silently corrupts your recovery picture and causes future restores to fail; if you ever must delete at the OS level, run CROSSCHECK ARCHIVELOG ALL afterward so RMAN reconciles what is actually on disk. The correct approach is RMAN BACKUP ARCHIVELOG ALL DELETE ALL INPUT, which captures the logs to a backup location and then deletes the originals in one operation, freeing the FRA without sacrificing your ability to recover to a point in time. Deleting logs you have not backed up unsticks the database at the cost of losing recoverability for the period those logs covered — a trade you rarely want to make.

How do I prevent ORA-00257 from happening again?

Treat it as a monitoring and housekeeping problem, because that is what it is. Schedule regular RMAN archive-log backups that delete the input logs (BACKUP ARCHIVELOG ALL DELETE INPUT) at a frequency that stays ahead of your redo generation rate, so archived logs never accumulate faster than they are removed. Size the Fast Recovery Area (db_recovery_file_dest_size) for the real workload plus a safety margin, remembering that redo volume grows during migrations, bulk loads, and index rebuilds. Most importantly, alert on V$RECOVERY_FILE_DEST percent-used at a threshold well below 100% — 85% is a reasonable line — so the FRA filling shows up as a warning hours in advance instead of a 3 a.m. outage. ORA-00257 almost never arrives without a slow, visible climb first; the only reason it becomes an emergency is that nobody was watching the number.

Does ORA-00257 mean I lost data or the database crashed?

No. ORA-00257 is a protective refusal, not a crash or corruption: the database is deliberately declining to generate new redo because it cannot safely archive the redo it already has, and it does this precisely so that no committed transaction is ever lost. The instance stays up, existing committed data is intact, SELECT and read-only work continue, and SYSDBA can still connect. Only new writes are blocked, and only until you free the archive destination. Once the archiver can write again, the online logs recycle and everything that was hanging proceeds normally — there is nothing to recover and no data loss to repair. The error is the database protecting your recovery guarantees, which is the opposite of losing data.

Why can I connect as SYSDBA but normal users get ORA-00257?

That asymmetry is the whole point of 'connect internal only, until freed.' When the archiver is stuck, the database blocks the operations that generate redo so it does not overwrite unarchived logs, but it deliberately leaves a privileged door open so an administrator can get in and fix the problem — otherwise you would be locked out of the very database you need to repair. A SYSDBA session can connect and run the diagnostic queries and the fix (growing the FRA, backing up and deleting archived logs) because administrative connection and recovery operations are permitted; ordinary application sessions are refused the moment they try to write, because that write would require redo the database cannot currently accommodate. So SYSDBA access working while everyone else sees ORA-00257 is expected behavior, and it is your route to resolving the outage.

Archiver-stuck belongs to the same reliability story as the rest of Oracle’s recovery machinery: the archived logs whose accumulation caused this outage are exactly what RMAN needs to recover the database to a point in time, which is why you delete them through RMAN and never with rm; ARCHIVELOG mode is also what makes Flashback Database and guaranteed restore points possible; and it is a different failure from the undo-side ORA-01555 snapshot too old, which people confuse with it because both involve a long-suffering database and a cryptic number. ORA-00257 is the archiver protecting your recovery guarantees — read the real error (ORA-19809, a full FRA), free the space the right way, put a monitor on the recovery area, and then prove the whole cycle with the archiver-stuck lab, where a full FRA locks out every non-SYSDBA session and an RMAN backup-and-delete brings it straight back.

Have a question or some feedback?

I write here in a personal capacity and enjoy comparing notes with other Oracle folks. Say hello.

Get in touch