※ 필수 파일 
1. 닫힌 백업한 파일중 복원시킬 데이터 파일 or 열린 백업한 파일중 복원시킬 데이터 파일
2. 백업이후 생성된 아카이브 로그파일
3. 여기에는 열린 상태에서 복원하지만 데이터베이스를 마운트 상태에 두고 복구한 다음 오픈해도 된다.
=======================================================================================


SQL> select v$tablespace.name, v$datafile.name from v$tablespace, v$datafile
  2  where v$tablespace.ts# = v$datafile.ts#;

NAME                                     NAME
---------------------------------------- ----------------------------------------
SYSTEM                                   /oracle/oradata/ora10g/system01.dbf
UNDOTBS1                                 /oracle/oradata/ora10g/undotbs01.dbf
SYSAUX                                   /oracle/oradata/ora10g/sysaux01.dbf
USERS                                    /oracle/oradata/ora10g/users01.dbf
EXAMPLE                                  /oracle/oradata/ora10g/example01.dbf

SQL> !rm /oracle/oradata/ora10g/users01.dbf

SQL> shutdown abort
ORACLE instance shut down.
SQL> startup mount
ORA-32004: obsolete and/or deprecated parameter(s) specified
ORACLE instance started.

Total System Global Area  167772160 bytes
Fixed Size                  1218316 bytes
Variable Size              92276980 bytes
Database Buffers           71303168 bytes
Redo Buffers                2973696 bytes
Database mounted.
SQL>
SQL> col tablespace_name format a15
SQL> col name format a40
SQL> col error format a15
SQL> select h.tablespace_name, d.name, h.error
  2  from v$datafile d, v$datafile_header h
  3  where d.file# = h.file#;

TABLESPACE_NAME NAME                                     ERROR
--------------- ---------------------------------------- ---------------
SYSTEM          /oracle/oradata/ora10g/system01.dbf
UNDOTBS1        /oracle/oradata/ora10g/undotbs01.dbf
SYSAUX          /oracle/oradata/ora10g/sysaux01.dbf
                /oracle/oradata/ora10g/users01.dbf       FILE NOT FOUND
EXAMPLE         /oracle/oradata/ora10g/example01.dbf

SQL> alter database datafile '/oracle/oradata/ora10g/users01.dbf' offline;

Database altered.

SQL> select d.file#, d.name, d.status, h.status
  2  from v$datafile d, v$datafile_header h
  3  where d.file# = h.file#;

     FILE# NAME                                     STATUS  STATUS
---------- ---------------------------------------- ------- -------
         1 /oracle/oradata/ora10g/system01.dbf      SYSTEM  ONLINE
         2 /oracle/oradata/ora10g/undotbs01.dbf     ONLINE  ONLINE
         3 /oracle/oradata/ora10g/sysaux01.dbf      ONLINE  ONLINE
         4 /oracle/oradata/ora10g/users01.dbf       RECOVER OFFLINE
         5 /oracle/oradata/ora10g/example01.dbf     ONLINE  ONLINE

SQL> alter database open;

Database altered.

SQL> !mkdir /oracle/oradata/temp

SQL> !cp /backup/close/ora10g/users01.dbf /oracle/oradata/temp
혹은
SQL> !cp /backup/open/ora10g/users01.dbf /oracle/oradata/temp

SQL> !ls /oracle/oradata/temp
users01.dbf

SQL> alter database rename file
  2  '/oracle/oradata/ora10g/users01.dbf' to
  3  '/oracle/oradata/temp/users01.dbf';

Database altered.

SQL> col file_name format a40
SQL> select file_name, tablespace_name from dba_data_files;

FILE_NAME                                TABLESPACE_NAME
---------------------------------------- ---------------
/oracle/oradata/temp/users01.dbf         USERS
/oracle/oradata/ora10g/sysaux01.dbf      SYSAUX
/oracle/oradata/ora10g/undotbs01.dbf     UNDOTBS1
/oracle/oradata/ora10g/system01.dbf      SYSTEM
/oracle/oradata/ora10g/example01.dbf     EXAMPLE


SQL> recover datafile '/oracle/oradata/temp/users01.dbf';
ORA-00279: change 4194796 generated at 11/01/2006 11:05:15 needed for thread 1
ORA-00289: suggestion : /backup/archive2/1_121_601220550.arc
ORA-00280: change 4194796 for thread 1 is in sequence #121


ORA-00279: change 4196859 generated at 11/03/2006 17:00:47 needed for thread 1
ORA-00289: suggestion : /backup/archive2/1_122_601220550.arc
ORA-00280: change 4196859 for thread 1 is in sequence #122
ORA-00278: log file '/backup/archive2/1_121_601220550.arc' no longer needed for this recovery

.
.
.

ORA-00279: change 5364496 generated at 11/16/2006 22:02:16 needed for thread 1
ORA-00289: suggestion : /backup/archive2/1_161_601220550.arc
ORA-00280: change 5364496 for thread 1 is in sequence #161
ORA-00278: log file '/backup/archive2/1_160_601220550.arc' no longer needed for this recovery


Log applied.
Media recovery complete.
SQL> alter database datafile '/oracle/oradata/temp/users01.dbf' online;

Database altered.

SQL> select d.file#, d.name, d.status, h.status
  2  from v$datafile d, v$datafile_header h
  3  where d.file# = h.file#;

     FILE# NAME                                     STATUS  STATUS
---------- ---------------------------------------- ------- -------
         1 /oracle/oradata/ora10g/system01.dbf      SYSTEM  ONLINE
         2 /oracle/oradata/ora10g/undotbs01.dbf     ONLINE  ONLINE
         3 /oracle/oradata/ora10g/sysaux01.dbf      ONLINE  ONLINE
         4 /oracle/oradata/temp/users01.dbf         ONLINE  ONLINE
         5 /oracle/oradata/ora10g/example01.dbf     ONLINE  ONLINE

SQL> select h.tablespace_name, d.name, h.error   
  2  from v$datafile d, v$datafile_header h
  3  where d.file# = h.file#;

TABLESPACE_NAME NAME                                     ERROR
--------------- ---------------------------------------- ---------------
SYSTEM          /oracle/oradata/ora10g/system01.dbf
UNDOTBS1        /oracle/oradata/ora10g/undotbs01.dbf
SYSAUX          /oracle/oradata/ora10g/sysaux01.dbf
USERS           /oracle/oradata/temp/users01.dbf
EXAMPLE         /oracle/oradata/ora10g/example01.dbf

SQL>