ORA-01113 – On Renaming file Mistakenly
Incident
DBA tried to add a datafile to database, but misnamed it and issued the following command
alter database datafile ‘/opt/oracle/emtprod/u18/oradata/EMTDB/mtm_data3_03_EMTDB.dbf’ offline drop;
Copied the file to it’s new location/name and then issued the following
alter database rename file ‘/opt/oracle/emtprod/u18/oradata/EMTDB/mtm_data3_03_EMTDB.dbf’
to ‘/opt/oracle/emtprod/u20/oradata/EMTDB/mtm_data2_04_EMTDB.dbf’;
When dba made the datafile online …
alter database datafile ‘/opt/oracle/emtprod/u20/oradata/EMTDB/mtm_data2_04_EMTDB.dbf’ online;
DBA received the following error
ERROR at line 1:
ORA-01113: file 26 needs media recovery
ORA-01110: data file 26: ‘/opt/oracle/emtprod/u20/oradata/EMTDB/mtm_data2_04_EMTDB.dbf’
Solution:
If this happened just a few minutes ago, Just needed to do
SQL> alter database recover datafile ……
Brought file back into offline mode and then you will be able to online the file.
