Control File

Oracle 운영에 필요한 필수 정보 보관, 파일을 여러곳에 다중화 운영 권장, Control File 백업은 중요하다

실습1. Parameter File의 경로와 실제 파일 경로가 다른 경우 대처하기


$ sqlplus / as sysdba

SQL*Plus: Release 11.2.0.2.0 Production on Thu Oct 29 08:17:22 2015

Copyright (c) 1982, 2010, Oracle.  All rights reserved.

Connected to an idle instance.

SQL> startup nomount;
ORACLE instance started.

Total System Global Area  534462464 bytes
Fixed Size                  2221336 bytes
Variable Size             339741416 bytes
Database Buffers          184549376 bytes
Redo Buffers                7950336 bytes
SQL> show parameter spfile;

NAME                                 TYPE                   VALUE
------------------------------------ ---------------------- ------------------------------
spfile                               string                 /sw/oracle/app/oracle/product/
                                                            11.2.0/dbs/spfileUTF8.ora
SQL> show parameter "control_files"

NAME                                 TYPE                   VALUE
------------------------------------ ---------------------- ------------------------------
control_files                        string                 /oradata2/system/control01.ctl
                                                            , /oradata2/system/control02.c
                                                            tl

SQL> alter system set control_files = '/oradata2/system/control01.ctl','/oradata2/system/control02.ctl','/oradata2/system/control03.ctl' scope = spfile;

System altered.

SQL> show parameter "control_files"

NAME                                 TYPE                   VALUE
------------------------------------ ---------------------- ------------------------------
control_files                        string                 /oradata2/system/control01.ctl
                                                            , /oradata2/system/control02.c
                                                            tl
SQL> shutdown immediate;
ORA-01507: database not mounted


ORACLE instance shut down.
SQL> startup nomount
ORACLE instance started.

Total System Global Area  534462464 bytes
Fixed Size                  2221336 bytes
Variable Size             339741416 bytes
Database Buffers          184549376 bytes
Redo Buffers                7950336 bytes
SQL>  show parameter "control_files"

NAME                                 TYPE                   VALUE
------------------------------------ ---------------------- ------------------------------
control_files                        string                 /oradata2/system/control01.ctl
                                                            , /oradata2/system/control02.c
                                                            tl, /oradata2/system/control03
                                                            .ctl
SQL> alter database mount;
alter database mount
*
ERROR at line 1:
ORA-00205: error in identifying control file, check alert log for more info

SQL> !ls -al /oradata2/system/control*.ctl
-rw-r-----    1 oracle   dba         7716864 Oct 29 08:00 /oradata2/system/control01.ctl
-rw-r-----    1 oracle   dba         7716864 Oct 29 08:00 /oradata2/system/control02.ctl

SQL>

-- Alert Log
Thu Oct 29 08:24:52 2015
ORA-00210: cannot open the specified control file
ORA-00202: control file: '/oradata2/system/control03.ctl'
ORA-27037: unable to obtain file status
IBM AIX RISC System/6000 Error: 2: No such file or directory
Additional information: 3
ORA-205 signalled during: alter database mount...

-- MOUNT 단계 에서 Control File 을 읽어 DB 이상 여부 검증 하게 됨 (Checkpoint SCN)
-- 장애 원인 : Parameter File 의 control_files 항목에 설정 된 Control File 중 /oradata2/system/control03.ctl 가 없음

SQL> !cp /oradata2/system/control01.ctl /oradata2/system/control03.ctl
SQL> alter database mount;

Database altered.

SQL> !ls -al /oradata2/system/control*.ctl
-rw-r-----    1 oracle   dba         7716864 Oct 29 08:37 /oradata2/system/control01.ctl
-rw-r-----    1 oracle   dba         7716864 Oct 29 08:37 /oradata2/system/control02.ctl
-rw-r-----    1 oracle   dba         7716864 Oct 29 08:37 /oradata2/system/control03.ctl

-- Alert Log
Thu Oct 29 08:36:22 2015
alter database mount
Thu Oct 29 08:36:26 2015
Successful mount of redo thread 1, with mount id 2159585670
Database mounted in Exclusive Mode
Lost write protection disabled
Completed: alter database mount

실습2. Control File 끼리 내용이 다른 경우 대처하기


SQL> startup
ORACLE instance started.

Total System Global Area  534462464 bytes
Fixed Size                  2221336 bytes
Variable Size             339741416 bytes
Database Buffers          184549376 bytes
Redo Buffers                7950336 bytes
Database mounted.
Database opened.
SQL> select name from v$controlfile;

NAME
--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
/oradata2/system/control01.ctl
/oradata2/system/control02.ctl
/oradata2/system/control03.ctl

SQL> !ls -al /oradata2/system/control*.ctl
-rw-r-----    1 oracle   dba         7716864 Oct 29 10:41 /oradata2/system/control01.ctl
-rw-r-----    1 oracle   dba         7716864 Oct 29 10:41 /oradata2/system/control02.ctl
-rw-r-----    1 oracle   dba         7716864 Oct 29 10:41 /oradata2/system/control03.ctl

SQL> shutdown immediate
Database closed.
Database dismounted.
ORACLE instance shut down.
SQL> startup nomount;
ORACLE instance started.

Total System Global Area  534462464 bytes
Fixed Size                  2221336 bytes
Variable Size             339741416 bytes
Database Buffers          184549376 bytes
Redo Buffers                7950336 bytes
SQL> alter system set control_files = '/oradata2/system/control01.ctl','/oradata2/system/control02.ctl' scope = spfile;

System altered.

SQL> alter database mount;

Database altered.

SQL> alter database open;

Database altered.

SQL> !ls -al /oradata2/system/control*.ctl
-rw-r-----    1 oracle   dba         7716864 Oct 29 12:54 /oradata2/system/control01.ctl
-rw-r-----    1 oracle   dba         7716864 Oct 29 12:54 /oradata2/system/control02.ctl
-rw-r-----    1 oracle   dba         7716864 Oct 29 12:54 /oradata2/system/control03.ctl

SQL> shutdown immediate
Database closed.
Database dismounted.
ORACLE instance shut down.
SQL> startup
ORACLE instance started.

Total System Global Area  534462464 bytes
Fixed Size                  2221336 bytes
Variable Size             339741416 bytes
Database Buffers          184549376 bytes
Redo Buffers                7950336 bytes
Database mounted.
Database opened.
SQL> alter system checkpoint;

System altered.

SQL>  !ls -al /oradata2/system/control*.ctl
-rw-r-----    1 oracle   dba         7716864 Oct 29 13:11 /oradata2/system/control01.ctl
-rw-r-----    1 oracle   dba         7716864 Oct 29 13:11 /oradata2/system/control02.ctl
-rw-r-----    1 oracle   dba         7716864 Oct 29 12:55 /oradata2/system/control03.ctl

SQL> select name from v$controlfile;

NAME
--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
/oradata2/system/control01.ctl
/oradata2/system/control02.ctl

SQL> shutdown immediate;
Database closed.
Database dismounted.
ORACLE instance shut down.
SQL> startup nomount;
ORACLE instance started.

Total System Global Area  534462464 bytes
Fixed Size                  2221336 bytes
Variable Size             339741416 bytes
Database Buffers          184549376 bytes
Redo Buffers                7950336 bytes
SQL> alter system set control_files = '/oradata2/system/control01.ctl','/oradata2/system/control02.ctl','/oradata2/system/control03.ctl' scope = spfile;

System altered.

SQL> shutdown immediate
ORA-01507: database not mounted


ORACLE instance shut down.
SQL>
SQL> startup nomount
ORACLE instance started.

Total System Global Area  534462464 bytes
Fixed Size                  2221336 bytes
Variable Size             339741416 bytes
Database Buffers          184549376 bytes
Redo Buffers                7950336 bytes
SQL> show parameter "control_files"

NAME                                 TYPE                   VALUE
------------------------------------ ---------------------- ------------------------------
control_files                        string                 /oradata2/system/control01.ctl
                                                            , /oradata2/system/control02.c
                                                            tl, /oradata2/system/control03
                                                            .ctl
SQL> alter database mount;
alter database mount
*
ERROR at line 1:
ORA-00214: control file '/oradata2/system/control01.ctl' version 446933 inconsistent with file '/oradata2/system/control03.ctl' version 446917

-- Alert Log
Thu Oct 29 13:13:37 2015
alter database mount
ORA-214 signalled during: alter database mount...

SQL> !cp /oradata2/system/control01.ctl /oradata2/system/control03.ctl

SQL> alter database mount;

Database altered.

SQL> alter database open;

Database altered.

SQL> select name from v$controlfile;

NAME
--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
/oradata2/system/control01.ctl
/oradata2/system/control02.ctl
/oradata2/system/control03.ctl

-- Alert Log
Thu Oct 29 13:14:54 2015
alter database mount
Thu Oct 29 13:14:58 2015
Successful mount of redo thread 1, with mount id 2159624654
Database mounted in Exclusive Mode
Lost write protection disabled
Completed: alter database mount

실습3. Old Control File 또는 Control File이 삭제되었을 경우 대처하기 - Redo Log File 손상 없음


-- Old Control File 장애 유발
$ sqlplus / as sysdba

SQL*Plus: Release 11.2.0.2.0 Production on Thu Oct 29 18:33:15 2015

Copyright (c) 1982, 2010, Oracle.  All rights reserved.

Connected to an idle instance.

SQL>
SQL>
SQL>
SQL> startup
ORACLE instance started.

Total System Global Area  534462464 bytes
Fixed Size                  2221336 bytes
Variable Size             339741416 bytes
Database Buffers          184549376 bytes
Redo Buffers                7950336 bytes
Database mounted.
Database opened.
SQL> set linesize 200
SQL> select name from v$controlfile;

NAME
--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
/oradata2/system/control01.ctl
/oradata2/system/control02.ctl
/oradata2/system/control03.ctl

SQL> shutdown immediate
Database closed.
Database dismounted.
ORACLE instance shut down.
SQL> startup nomount;
ORACLE instance started.

Total System Global Area  534462464 bytes
Fixed Size                  2221336 bytes
Variable Size             339741416 bytes
Database Buffers          184549376 bytes
Redo Buffers                7950336 bytes
SQL> alter system set control_files = '/oradata2/system/control01.ctl','/oradata2/system/control02.ctl' scope = spfile;

System altered.

SQL> shutdown;
ORA-01507: database not mounted


ORACLE instance shut down.
SQL> startup;
ORACLE instance started.

Total System Global Area  534462464 bytes
Fixed Size                  2221336 bytes
Variable Size             339741416 bytes
Database Buffers          184549376 bytes
Redo Buffers                7950336 bytes
Database mounted.
Database opened.
SQL> alter system checkpoint;

System altered.

SQL> alter system checkpoint;

System altered.

SQL> shutdown immediate;
Database closed.
Database dismounted.
ORACLE instance shut down.
SQL> !cp /oradata2/system/control01.ctl /oradata2/system/control01.ctl.NORMAL

SQL> !cp /oradata2/system/control03.ctl /oradata2/system/control01.ctl

SQL> !cp /oradata2/system/control03.ctl /oradata2/system/control02.ctl

SQL> startup nomount;
ORACLE instance started.

Total System Global Area  534462464 bytes
Fixed Size                  2221336 bytes
Variable Size             339741416 bytes
Database Buffers          184549376 bytes
Redo Buffers                7950336 bytes
SQL> alter database mount;

Database altered.

SQL> alter database open;
alter database open
*
ERROR at line 1:
ORA-01122: database file 1 failed verification check
ORA-01110: data file 1: '/oradata2/system/system01.dbf'
ORA-01207: file is more recent than control file - old control file

SQL>
-- Alert Log
Thu Oct 29 18:54:50 2015
alter database open
Errors in file /sw/oracle/app/oracle/diag/rdbms/utf8/UTF8/trace/UTF8_ora_55574682.trc:
ORA-01122: database file 1 failed verification check
ORA-01110: data file 1: '/oradata2/system/system01.dbf'
ORA-01207: file is more recent than control file - old control file
ORA-1122 signalled during: alter database open...

-- Control File을 NORESETLOGS 옵션으로 재생성 복구
SQL> select status from v$instance;

STATUS
------------------------
MOUNTED

SQL> alter database backup controlfile to trace as '/home/oracle/re11.sql';

Database altered.

-- 인스턴스가 MOUNT 상태가 된 후 Control File 스크립트 생성 가능
-- 어쨌거나 Control File 백업 본은 반드시 필요 (ORA-01207 이더라도....)

-- Alert Log
Thu Oct 29 18:58:02 2015
alter database backup controlfile to trace as '/home/oracle/re11.sql'
Completed: alter database backup controlfile to trace as '/home/oracle/re11.sql'

SQL> shutdown immediate
ORA-01109: database not open


Database dismounted.
ORACLE instance shut down.
SQL>

-- /home/oracle/re11.sql 에서 NORESETLOGS / RESETLOGS 모드 선택 필요
-- NORESETLOGS : Redo Log File 정상
--   RESETLOGS : Redo Log File 손상

$ vi /home/oracle/re11.sql
...
$ cat re11.sql
STARTUP NOMOUNT
CREATE CONTROLFILE REUSE DATABASE "UTF8" NORESETLOGS  ARCHIVELOG
    MAXLOGFILES 16
    MAXLOGMEMBERS 3
    MAXDATAFILES 100
    MAXINSTANCES 8
    MAXLOGHISTORY 292
LOGFILE
  GROUP 1 '/oradata2/system/redo01.log'  SIZE 50M BLOCKSIZE 512,
  GROUP 2 '/oradata2/system/redo02.log'  SIZE 50M BLOCKSIZE 512,
  GROUP 3 '/oradata2/system/redo03.log'  SIZE 50M BLOCKSIZE 512
-- STANDBY LOGFILE
DATAFILE
  '/oradata2/system/system01.dbf',
  '/oradata2/system/sysaux01.dbf',
  '/oradata2/system/undotbs01.dbf',
  '/oradata2/system/users01.dbf',
  '/oradata2/system/test01.dbf'
CHARACTER SET UTF8
;
$

-- 유의사항
-- 1. RESETLOGS / NORESETLOGS 확인
-- 2. 스크립트 내 공백은 없어야 함
-- 3. Data File 은 경로에 존재 해야 함
-- 4. Control File 은 Parameter File 에 지정된 경로에 생성
-- 5. RESETLOGS / NORESETLOGS 의 Redo Log File 처리가 다름 (없으면 재생성 / 모두 필요)

$ ls -al /oradata2/system/*.ctl
-rw-r-----    1 oracle   dba         7716864 Oct 29 18:58 /oradata2/system/control01.ctl
-rw-r-----    1 oracle   dba         7716864 Oct 29 18:58 /oradata2/system/control02.ctl
-rw-r-----    1 oracle   dba         7716864 Oct 29 18:34 /oradata2/system/control03.ctl
$ sqlplus / as sysdba

SQL*Plus: Release 11.2.0.2.0 Production on Thu Oct 29 19:10:15 2015

Copyright (c) 1982, 2010, Oracle.  All rights reserved.

Connected to an idle instance.

SQL> @/home/oracle/re11.sql
ORACLE instance started.

Total System Global Area  534462464 bytes
Fixed Size                  2221336 bytes
Variable Size             339741416 bytes
Database Buffers          184549376 bytes
Redo Buffers                7950336 bytes

Control file created.

SQL> select status from v$instance;

STATUS
------------------------
MOUNTED

SQL> !ls -al /oradata2/system/*.ctl
-rw-r-----    1 oracle   dba         7880704 Oct 29 19:10 /oradata2/system/control01.ctl
-rw-r-----    1 oracle   dba         7880704 Oct 29 19:10 /oradata2/system/control02.ctl
-rw-r-----    1 oracle   dba         7716864 Oct 29 18:34 /oradata2/system/control03.ctl

SQL> alter database open;

Database altered.

-- Alert Log
Thu Oct 29 19:10:26 2015
CREATE CONTROLFILE REUSE DATABASE "UTF8" NORESETLOGS  ARCHIVELOG
    MAXLOGFILES 16
    MAXLOGMEMBERS 3
...
CHARACTER SET UTF8
WARNING: Default Temporary Tablespace not specified in CREATE DATABASE command
Default Temporary Tablespace will be necessary for a locally managed database in future release
Successful mount of redo thread 1, with mount id 2159615266
...
Thu Oct 29 19:11:04 2015
alter database open
Using SCN growth rate of 16384 per second
...
Thu Oct 29 19:11:05 2015
SMON: enabling cache recovery
[16515078] Successfully onlined Undo Tablespace 2.
Undo initialization finished serial:0 start:2193645363 end:2193645430 diff:67 (0 seconds)
Dictionary check beginning
Tablespace 'TEMP' #3 found in data dictionary,
but not in the controlfile. Adding to controlfile.
Dictionary check complete
Verifying file header compatibility for 11g tablespace encryption..
Verifying 11g file header compatibility for tablespace encryption completed
SMON: enabling tx recovery
*********************************************************************
WARNING: The following temporary tablespaces contain no files.
         This condition can occur when a backup controlfile has
         been restored.  It may be necessary to add files to these
         tablespaces.  That can be done using the SQL statement:

         ALTER TABLESPACE <tablespace_name> ADD TEMPFILE

         Alternatively, if these temporary tablespaces are no longer
         needed, then they can be dropped.
           Empty temporary tablespace: TEMP
*********************************************************************


SQL> ALTER TABLESPACE TEMP ADD TEMPFILE '/oradata2/system/temp01.dbf' REUSE;

Tablespace altered.

-- Alert Log
Thu Oct 29 19:16:38 2015
ALTER TABLESPACE TEMP ADD TEMPFILE '/oradata2/system/temp01.dbf' REUSE


-- re11.sql
-- RECOVER DATABASE
-- ALTER SYSTEM ARCHIVE LOG ALL;
-- ALTER DATABASE OPEN;
-- ALTER TABLESPACE TEMP ADD TEMPFILE '/oradata2/system/temp01.dbf' REUSE;

실습4. Old Control File 또는 Control File이 삭제되었을 경우 대처하기 - Redo Log File 손상 있음


SQL> startup
ORACLE instance started.

Total System Global Area  534462464 bytes
Fixed Size                  2221336 bytes
Variable Size             339741416 bytes
Database Buffers          184549376 bytes
Redo Buffers                7950336 bytes
Database mounted.
Database opened.
SQL> @log

GROUP# MEMBER                                          MB   seq# STATUS   ARC
------ --------------------------------------------- ---- ------ -------- -----
     1 /oradata2/system/redo01.log                     50   2377 INACTIVE YES
     2 /oradata2/system/redo02.log                     50   2378 INACTIVE YES
     3 /oradata2/system/redo03.log                     50   2379 CURRENT  NO

SQL> !rm /oradata2/system/redo01.log

SQL> select name from v$controlfile;

NAME
--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
/oradata2/system/control01.ctl
/oradata2/system/control02.ctl

SQL> !rm /oradata2/system/control01.ctl

SQL> !rm /oradata2/system/control02.ctl

SQL> shutdown immediate
Database closed.
ORA-00210: cannot open the specified control file
ORA-00202: control file: '/oradata2/system/control01.ctl'
ORA-27041: unable to open file
IBM AIX RISC System/6000 Error: 2: No such file or directory
Additional information: 3
Additional information: 4
Additional information: 4194304


SQL>

-- Alert Log
Thu Oct 29 19:34:20 2015
Shutting down instance (immediate)
Shutting down instance: further logons disabled
Stopping background process QMNC
Stopping background process MMNL
Stopping background process MMON
License high water mark = 1
ALTER DATABASE CLOSE NORMAL
Thu Oct 29 19:34:23 2015
SMON: disabling tx recovery
SMON: disabling cache recovery
Thu Oct 29 19:34:23 2015
Shutting down archive processes
Archiving is disabled
Thu Oct 29 19:34:23 2015
ARCH shutting down
Thu Oct 29 19:34:23 2015
ARCH shutting down
Thu Oct 29 19:34:23 2015
ARCH shutting down
ARC0: Archival stopped
ARC1: Archival stopped
ARC2: Archival stopped
Thu Oct 29 19:34:23 2015
ARCH shutting down
ARC3: Archival stopped
Thread 1 closed at log sequence 2379
Successful close of redo thread 1
Completed: ALTER DATABASE CLOSE NORMAL
ALTER DATABASE DISMOUNT
Shutting down archive processes
Archiving is disabled
ORA-210 signalled during: ALTER DATABASE DISMOUNT...

SQL> shutdown abort;
ORACLE instance shut down.
SQL> startup
ORACLE instance started.

Total System Global Area  534462464 bytes
Fixed Size                  2221336 bytes
Variable Size             339741416 bytes
Database Buffers          184549376 bytes
Redo Buffers                7950336 bytes
ORA-00205: error in identifying control file, check alert log for more info


SQL>

-- Alert Log
Thu Oct 29 19:35:22 2015
ALTER DATABASE   MOUNT
ORA-00210: cannot open the specified control file
ORA-00202: control file: '/oradata2/system/control02.ctl'
ORA-27037: unable to obtain file status
IBM AIX RISC System/6000 Error: 2: No such file or directory
Additional information: 3
ORA-00210: cannot open the specified control file
ORA-00202: control file: '/oradata2/system/control01.ctl'
ORA-27037: unable to obtain file status
IBM AIX RISC System/6000 Error: 2: No such file or directory
Additional information: 3
ORA-205 signalled during: ALTER DATABASE   MOUNT...
Thu Oct 29 19:35:22 2015
Checker run found 2 new persistent data failures

SQL> shutdown immediate
ORA-01507: database not mounted


ORACLE instance shut down.
SQL> !cp /oradata2/system/control01.ctl.NORMAL /oradata2/system/control01.ctl

SQL> !cp /oradata2/system/control01.ctl.NORMAL /oradata2/system/control02.ctl

SQL> startup;
ORACLE instance started.

Total System Global Area  534462464 bytes
Fixed Size                  2221336 bytes
Variable Size             339741416 bytes
Database Buffers          184549376 bytes
Redo Buffers                7950336 bytes
Database mounted.
ORA-01122: database file 1 failed verification check
ORA-01110: data file 1: '/oradata2/system/system01.dbf'
ORA-01207: file is more recent than control file - old control file


SQL> alter database backup controlfile to trace as '/home/oracle/re12.sql';

Database altered.

SQL> shutdown immediate
ORA-01109: database not open


Database dismounted.
ORACLE instance shut down.
SQL>

$ vi re12.sql
...
$ cat /home/oracle/re12.sql
STARTUP NOMOUNT
CREATE CONTROLFILE REUSE DATABASE "UTF8" RESETLOGS  ARCHIVELOG
    MAXLOGFILES 16
    MAXLOGMEMBERS 3
    MAXDATAFILES 100
    MAXINSTANCES 8
    MAXLOGHISTORY 292
LOGFILE
  GROUP 1 '/oradata2/system/redo01.log'  SIZE 50M BLOCKSIZE 512,
  GROUP 2 '/oradata2/system/redo02.log'  SIZE 50M BLOCKSIZE 512,
  GROUP 3 '/oradata2/system/redo03.log'  SIZE 50M BLOCKSIZE 512
-- STANDBY LOGFILE
DATAFILE
  '/oradata2/system/system01.dbf',
  '/oradata2/system/sysaux01.dbf',
  '/oradata2/system/undotbs01.dbf',
  '/oradata2/system/users01.dbf',
  '/oradata2/system/test01.dbf'
CHARACTER SET UTF8
;

RECOVER DATABASE USING BACKUP CONTROLFILE

ALTER DATABASE OPEN RESETLOGS;

ALTER TABLESPACE TEMP ADD TEMPFILE '/oradata2/system/temp01.dbf' REUSE;

$ sqlplus / as sysdba

SQL*Plus: Release 11.2.0.2.0 Production on Thu Oct 29 19:39:58 2015

Copyright (c) 1982, 2010, Oracle.  All rights reserved.

Connected to an idle instance.

SQL> @/home/oracle/re12.sql
ORACLE instance started.

Total System Global Area  534462464 bytes
Fixed Size                  2221336 bytes
Variable Size             339741416 bytes
Database Buffers          184549376 bytes
Redo Buffers                7950336 bytes

Control file created.

ORA-00279: change 44647638 generated at 10/29/2015 19:34:23 needed for thread 1
ORA-00289: suggestion : /ORA_ARCH/utf8/1_2379_767444221.dbf
ORA-00280: change 44647638 for thread 1 is in sequence #2379


ORA-00308: cannot open archived log '/ORA_ARCH/utf8/1_2379_767444221.dbf'
ORA-27037: unable to obtain file status
IBM AIX RISC System/6000 Error: 2: No such file or directory
Additional information: 3


ALTER DATABASE OPEN RESETLOGS
*
ERROR at line 1:
ORA-01113: file 1 needs media recovery
ORA-01110: data file 1: '/oradata2/system/system01.dbf'


ALTER TABLESPACE TEMP ADD TEMPFILE '/oradata2/system/temp01.dbf' REUSE
*
ERROR at line 1:
ORA-01109: database not open

SQL> RECOVER DATABASE USING BACKUP CONTROLFILE;
ORA-00279: change 44647638 generated at 10/29/2015 19:34:23 needed for thread 1
ORA-00289: suggestion : /ORA_ARCH/utf8/1_2379_767444221.dbf
ORA-00280: change 44647638 for thread 1 is in sequence #2379


Specify log: {<RET>=suggested | filename | AUTO | CANCEL}
/oradata2/system/redo02.log
ORA-00310: archived log contains sequence 2378; sequence 2379 required
ORA-00334: archived log: '/oradata2/system/redo02.log'

SQL> RECOVER DATABASE USING BACKUP CONTROLFILE;
ORA-00279: change 44647638 generated at 10/29/2015 19:34:23 needed for thread 1
ORA-00289: suggestion : /ORA_ARCH/utf8/1_2379_767444221.dbf
ORA-00280: change 44647638 for thread 1 is in sequence #2379


Specify log: {<RET>=suggested | filename | AUTO | CANCEL}
/oradata2/system/redo03.log
Log applied.
Media recovery complete.
SQL> ALTER DATABASE OPEN RESETLOGS;

Database altered.

SQL> ALTER TABLESPACE TEMP ADD TEMPFILE '/oradata2/system/temp01.dbf' REUSE;

Tablespace altered.

SQL>