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

Over the weekend, one of our Windows Oracle database servers suffered a power failure the same time it was being backed up by CommVault Oracle client. This left the database in a state where it wouldn’t start up, to rectify this, the following steps should help.
Open a DOS window.

set ORACLE_SID=<database SID>
sqlplus / as sysdba
SQL> shutdown immediate
ORA-01109: database not open
Database dismounted.
ORACLE instance shut down.
SQL> startup
ORACLE instance started.
Total System Global Area 1068937216 bytes
Fixed Size 2288080 bytes
Variable Size 629147184 bytes
Database Buffers 432013312 bytes
Redo Buffers 5488640 bytes
Database mounted.
ORA-10873: file 1 needs to be either taken out of backup mode or media recovered
ORA-01110: data file 1: 'E:\ORADATA\TESTEBS\SYSTEM01.DBF'
SQL> shutdown immediate
ORA-01109: database not open
Database dismounted.
ORACLE instance shut down.
SQL> startup mount
ORACLE instance started.
Total System Global Area 1068937216 bytes
Fixed Size 2288080 bytes
Variable Size 629147184 bytes
Database Buffers 432013312 bytes
Redo Buffers 5488640 bytes
Database mounted.

Now you can check the state of the backup files.

SQL> select * from v$backup;
FILE# STATUS CHANGE# TIME
---------- ------------------ ---------- ---------
1 ACTIVE 4124699 12-MAR-16
2 ACTIVE 4124705 12-MAR-16
3 ACTIVE 4124711 12-MAR-16
4 ACTIVE 4124717 12-MAR-16

This shows that the files are still in backup mode, we now need to take the database out of backup mode.

SQL> alter database end backup;
Database altered.
SQL> alter database open;
Database altered.

Now the database files are out of backup mode it is a good idea to get a clean DB shutdown and startup.

SQL> shutdown immediate
Database closed.
Database dismounted.
ORACLE instance shut down.
SQL> startup
ORACLE instance started.
Total System Global Area 1068937216 bytes
Fixed Size 2288080 bytes
Variable Size 629147184 bytes
Database Buffers 432013312 bytes
Redo Buffers 5488640 bytes
Database mounted.
Database opened.

Posted

in

by

Comments

One response to “ORA-10873: file 1 needs to be either taken out of backup mode or media recovered”

  1. volunteer Belize avatar

    Who were your parents? I think they deserve a trophy for a job well done. All of this will change in time. Excellent article, very useful. All have used social media to raise awareness.

Leave a Reply

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