Skip to content
Home » Oracle » How to Resolve ORA-10873: file 1 needs to be either taken out of backup mode or media recovered

How to Resolve ORA-10873: file 1 needs to be either taken out of backup mode or media recovered

ORA-10873

Tried to open a database, but it failed with ORA-10873. Let's see a case.

SQL> startup
ORACLE instance started.
...
Database mounted.
ORA-10873: file 1 needs to be either taken out of backup mode or media
recovered
ORA-01110: data file 1: '/u01/app/oracle/oradata/ORCLCDB/system01.dbf'

ORA-10873 means that one or some data file is in backup mode before shutdown, which prevents the database from open. As a result, it stays at mount state.

Not only SHUTDOWN ABORT, in some cases, restart a database which was running RMAN backup might also see such error.

SQL> select open_mode from v$database;

OPEN_MODE
--------------------
MOUNTED

Let's see how we solve it.

Solutions

There're 2 ways to release data files from ACTIVE backup mode.

RECOVER DATABASE

RECOVER DATABASE can make all data file roll forward, which implicitly ends all ACTIVE backup mode.

SQL> recover database;
Media recovery complete.

Then we open it from mount state.

SQL> alter database open;

Database altered.

SQL> select open_mode from v$database;

OPEN_MODE
--------------------
READ WRITE

ALTER DATABASE END BACKUP

ALTER DATABASE END BACKUP explicitly disable backup mode, then all data files are ready to be modified.

SQL> alter database end backup;

Database altered.

Then we open it.

SQL> alter database open;

Database altered.

SQL> select open_mode from v$database;

OPEN_MODE
--------------------
READ WRITE

We solved it.

Leave a Reply

Your email address will not be published. Required fields are marked *