If you currently have a cold backup, but you are missing one of the data files, but you currently have all the archives, if you want to restore the data files, you can refer to the following examples:
Copy Code code as follows:
[Oracle@jumper eygle]$ Sqlplus "/As SYSDBA"
Sql*plus:release 9.2.0.4.0-production on Sun Aug 20 01:22:50 2006
Copyright (c) 1982, 2002, Oracle Corporation. All rights reserved.
Connected to a idle instance.
Sql> Startup Mount
ORACLE instance started.
Total System Global area 252777592 bytes
Fixed Size 451704 bytes
Variable Size 134217728 bytes
Database buffers 117440512 bytes
Redo buffers 667648 bytes
Database mounted.
sql> ALTER DATABASE open;
ALTER DATABASE Open
*
ERROR at line 1:
Ora-01157:cannot identify/lock data file 3-see DBWR trace file
Ora-01110:data file 3: '/OPT/ORACLE/ORADATA/EYGLE/EYGLE02.DBF '
sql> ALTER DATABASE create datafile 3 as '/opt/oracle/oradata/eygle/eygle02.dbf ';
Database altered.
Sql> select name from V$datafile;
NAME
-------------------------------------------------------
/opt/oracle/oradata/eygle/system01.dbf
/opt/oracle/oradata/eygle/undotbs01.dbf
/opt/oracle/oradata/eygle/eygle02.dbf
/opt/oracle/oradata/eygle/eygle01.dbf
sql> ALTER DATABASE open;
ALTER DATABASE Open
*
ERROR at line 1:
Ora-01113:file 3 Needs Media recovery
Ora-01110:data file 3: '/OPT/ORACLE/ORADATA/EYGLE/EYGLE02.DBF '
sql> recover datafile 3;
Media recovery complete.
sql> ALTER DATABASE open;
Database altered.
Sql>