Oracle Database REAN recovery data file recovery is what we will introduce in this article. We know that apart from the system tablespace data file (mount, other data files can be restored in the open (mount) state. restoring data files in the open state can reduce the database downtime, so you should restore these data files in the open state.
Example 1: the data file is deleted by mistake.
Delete non-system tablespace data files when the database is closed.
Start the database to the mount status.
Offline data files lost, alter database datafile n offline.
Open the database and alter database open.
Dump data file, restore datafile n.
Use recover datafile n to archive logs.
Online data file, alter database datafile n online.
-- Delete non-system tablespace data files when the database is closed.
[Oracle @ localhost ~] $ Rm $ ORACLE_BASE/product/10.2.0/oradatabak/example01.dbf;
SQL> select file #, error from v $ recover_file;
FILE # ERROR
---------------------------------------------------------------------------
5 FILE NOT FOUND
SQL> select file #, name from v $ datafile where file # = 5;
FILE # NAME
------------------------------------------------------------------------------------------