※ 필수 파일 
1. 백업이후 생성된 아카이브 로그파일
=======================================================================================


SQL> create tablespace insa
  2  datafile '/oracle/oradata/ora10g/insa01.dbf' size 3M;

Tablespace created.

SQL> create user insa
  2  identified by insa
  3  default tablespace insa
  4  temporary tablespace temp
  5  quota unlimited on insa;

User created.

SQL> grant connect to insa;

Grant succeeded.

SQL> grant resource to insa;

Grant succeeded.

SQL> connect insa/insa
Connected.
SQL> create table insa(id number);

Table created.

SQL> connect / as sysdba
Connected.
SQL> alter system switch logfile;

System altered.

SQL> connect insa/insa
Connected.
SQL> insert into insa values(10);

1 row created.

SQL> commit;

Commit complete.

SQL> select * from insa;

        ID
----------
        10

SQL> connect / as sysdba
Connected.
SQL> alter system switch logfile;

System altered.

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

SQL> alter tablespace insa offline immediate;
혹은
SQL> alter database datafile '/oracle/oradata/ora10g/insa01.dbf' offline;

Tablespace 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       ONLINE  ONLINE
         5 /oracle/oradata/ora10g/example01.dbf     ONLINE  ONLINE
         6 /oracle/oradata/ora10g/insa01.dbf        RECOVER OFFLINE

6 rows selected.

SQL> col error format a20
SQL> select * from v$recover_file;

     FILE# ONLINE  ONLINE_ ERROR                   CHANGE# TIME
---------- ------- ------- -------------------- ---------- ---------
         6 OFFLINE OFFLINE FILE NOT FOUND                0

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/ora10g/users01.dbf
EXAMPLE         /oracle/oradata/ora10g/example01.dbf
                /oracle/oradata/ora10g/insa01.dbf        FILE NOT FOUND

6 rows selected.

SQL> alter database create datafile
  2  '/oracle/oradata/ora10g/insa01.dbf' as
  3  '/oracle/oradata/ora10g/insa01.dbf';
혹은
미디어가 장애일경우에는 임의 디렉토리(/oracle/oradata/temp)에 데이터파일을 생성해도 된다.
SQL> alter database create datafile
  2  '/oracle/oradata/ora10g/insa01.dbf' as
  3  '/oracle/oradata/temp/insa01.dbf';

Database altered.

SQL> recover tablespace insa;
혹은
SQL> recover datafile '/oracle/oradata/ora10g/insa01.dbf'

Media recovery complete.

SQL> alter tablespace insa online;
혹은
SQL> alter database datfile '/oracle/oradata/ora10g/insa01.dbf' online;

Tablespace 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       ONLINE  ONLINE
         5 /oracle/oradata/ora10g/example01.dbf     ONLINE  ONLINE
         6 /oracle/oradata/ora10g/insa01.dbf        ONLINE  ONLINE

6 rows selected.

SQL> select * from v$recover_file;

no rows selected

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/ora10g/users01.dbf
EXAMPLE         /oracle/oradata/ora10g/example01.dbf
INSA            /oracle/oradata/ora10g/insa01.dbf

6 rows selected.

SQL> connect insa/insa
Connected.
SQL> select * from insa;

        ID
----------
        10

SQL>