Skip to content

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

15/03/2016

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.
Advertisements

From → ORA Errors

Leave a Comment

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: