◆ 문제


◆ 복구 방법에 대한 고찰
1. 백업 데이터파일 임시 경로로 복원
  ↓
2. 현재 로그파일, 컨트롤파일 임시 경로로 복원
  ↓
3. 파라미터 파일에서 컨트롤파일 경로 변경
  ↓
4. 마운트 상태에서 데이터파일 경로, 로그파일 경로 변경
  ↓
5. 지워진 데이터파일 offline 후 재생성 후 online
  ↓
6. recover database until time으로 복구 후 DB오픈



◆ 복구방법 1

1. 테스트 하기 전에 DB를 풀백업 받는다.
SYS> select name from v$controlfile;

NAME
--------------------------------------------------------------------------------
/home/oracle/oradata/testdb/control01.ctl
/home/oracle/oradata/testdb/control02.ctl
/home/oracle/oradata/testdb/control03.ctl

SYS> select member from v$logfile;

MEMBER
--------------------------------------------------------------------------------
/home/oracle/oradata/testdb/redo03.log
/home/oracle/oradata/testdb/redo02.log
/home/oracle/oradata/testdb/redo01.log

SYS> select name from v$datafile;

NAME
--------------------------------------------------------------------------------
/home/oracle/oradata/testdb/system01.dbf
/home/oracle/oradata/testdb/undotbs01.dbf
/home/oracle/oradata/testdb/sysaux01.dbf
/home/oracle/oradata/testdb/users01.dbf
/home/oracle/oradata/testdb/example01.dbf

SYS>
SYS> shutdown immediate;
Database closed.
Database dismounted.
ORACLE instance shut down.
SYS>
SYS> !
[oracle@server118 ~]$ cp -av /home/oracle/oradata/testdb/* /data/backup/close/
`/home/oracle/oradata/testdb/control01.ctl' -> `/data/backup/close/control01.ctl'
`/home/oracle/oradata/testdb/control02.ctl' -> `/data/backup/close/control02.ctl'
`/home/oracle/oradata/testdb/control03.ctl' -> `/data/backup/close/control03.ctl'
`/home/oracle/oradata/testdb/example01.dbf' -> `/data/backup/close/example01.dbf'
`/home/oracle/oradata/testdb/redo01.log' -> `/data/backup/close/redo01.log'
`/home/oracle/oradata/testdb/redo02.log' -> `/data/backup/close/redo02.log'
`/home/oracle/oradata/testdb/redo03.log' -> `/data/backup/close/redo03.log'
`/home/oracle/oradata/testdb/sysaux01.dbf' -> `/data/backup/close/sysaux01.dbf'
`/home/oracle/oradata/testdb/system01.dbf' -> `/data/backup/close/system01.dbf'
`/home/oracle/oradata/testdb/temp01.dbf' -> `/data/backup/close/temp01.dbf'
`/home/oracle/oradata/testdb/undotbs01.dbf' -> `/data/backup/close/undotbs01.dbf'
`/home/oracle/oradata/testdb/users01.dbf' -> `/data/backup/close/users01.dbf'
[oracle@server118 ~]$
[oracle@server118 ~]$ exit
exit

SYS> startup
ORACLE instance started.

Total System Global Area  285212672 bytes
Fixed Size      1267068 bytes
Variable Size     92277380 bytes
Database Buffers   188743680 bytes
Redo Buffers      2924544 bytes
Database mounted.
Database opened.
SYS>

2. 위의 시나리오대로 장애를 일으켜본다.
SYS> @dd

TABLESPACE   MB FILE_NAME
---------- ---- ---------------------------------------------
USERS       5 /home/oracle/oradata/testdb/users01.dbf
SYSAUX     250 /home/oracle/oradata/testdb/sysaux01.dbf
UNDOTBS1     30 /home/oracle/oradata/testdb/undotbs01.dbf
SYSTEM     480 /home/oracle/oradata/testdb/system01.dbf
EXAMPLE     100 /home/oracle/oradata/testdb/example01.dbf

SYS> create tablespace test
  2   datafile '/home/oracle/oradata/testdb/test01.dbf' size 10M;

Tablespace created.

SYS> create table scott.tt10 (no number) tablespace test;

Table created.

SYS> insert into scott.tt10 values (1);

1 row created.

SYS> commit;

Commit complete.

SYS> select * from scott.tt10;

 NO
----------
  1

SYS> @t

TIME
-------------------
2010-09-11:11:31:59

SYS> !
[oracle@server118 ~]$ rm -fr /home/oracle/oradata/testdb/test01.dbf
[oracle@server118 ~]$ exit
exit

SYS> alter system switch logfile;

System altered.

SYS> /

System altered.

SYS> @t

TIME
-------------------
2010-09-11:11:32:22

SYS> select * from scott.tt10;   

 NO
----------
  1

SYS> drop table scott.tt10 purge;

Table dropped.

SYS> select * from scott.tt10;
select * from scott.tt10
                    *
ERROR at line 1:
ORA-00942: table or view does not exist

3. 장애나기 전에 백업받았던 데이터파일을 복구할 디렉토리로 복사한다. 리두로그와 컨트롤파일은 현재 시점의 것을 복구 디렉토리로 복사해준다.
SYS> shutdown immediate;
Database closed.
Database dismounted.
ORACLE instance shut down.
SYS>
SYS> !               
[oracle@server118 ~]$ cd /data/
[oracle@server118 data]$ ls
arc1  arc2  backup  lost+found  temp
[oracle@server118 data]$ cd temp/
[oracle@server118 temp]$ ls
[oracle@server118 temp]$ cp -av /data/backup/close/*.dbf /data/temp/
`/data/backup/close/example01.dbf' -> `/data/temp/example01.dbf'
`/data/backup/close/sysaux01.dbf' -> `/data/temp/sysaux01.dbf'
`/data/backup/close/system01.dbf' -> `/data/temp/system01.dbf'
`/data/backup/close/temp01.dbf' -> `/data/temp/temp01.dbf'
`/data/backup/close/undotbs01.dbf' -> `/data/temp/undotbs01.dbf'
`/data/backup/close/users01.dbf' -> `/data/temp/users01.dbf'
[oracle@server118 temp]$
[oracle@server118 temp]$ cp -av /home/oracle/oradata/testdb/*.log /data/temp/
`/home/oracle/oradata/testdb/redo01.log' -> `/data/temp/redo01.log'
`/home/oracle/oradata/testdb/redo02.log' -> `/data/temp/redo02.log'
`/home/oracle/oradata/testdb/redo03.log' -> `/data/temp/redo03.log'
[oracle@server118 temp]$
[oracle@server118 temp]$ cp -av /home/oracle/oradata/testdb/*.ctl /data/temp/
`/home/oracle/oradata/testdb/control01.ctl' -> `/data/temp/control01.ctl'
`/home/oracle/oradata/testdb/control02.ctl' -> `/data/temp/control02.ctl'
`/home/oracle/oradata/testdb/control03.ctl' -> `/data/temp/control03.ctl'
[oracle@server118 temp]$
[oracle@server118 temp]$ vi /home/oracle/product/10g/dbs/inittestdb.ora
[oracle@server118 temp]$
[oracle@server118 temp]$ exit
exit

4. DB를 마운트 상태까지 올린 후 각각의 경로를 변경해준다.
SYS> startup mount;
ORACLE instance started.

Total System Global Area  285212672 bytes
Fixed Size      1267068 bytes
Variable Size     92277380 bytes
Database Buffers   188743680 bytes
Redo Buffers      2924544 bytes
Database mounted.
SYS>
SYS> select name from v$controlfile;

NAME
------------------------------------------------------------------------------------------------------------------------------------------------------
/data/temp/control01.ctl
/data/temp/control02.ctl
/data/temp/control03.ctl

SYS> select member from v$logfile;

MEMBER
------------------------------------------------------------------------------------------------------------------------------------------------------
/home/oracle/oradata/testdb/redo03.log
/home/oracle/oradata/testdb/redo02.log
/home/oracle/oradata/testdb/redo01.log

SYS> alter database rename 
  2   file '/home/oracle/oradata/testdb/redo03.log'
  3   to '/data/temp/redo03.log';

Database altered.

SYS> ed
Wrote file afiedt.buf

  1  alter database rename
  2   file '/home/oracle/oradata/testdb/redo02.log'
  3*  to '/data/temp/redo02.log'
SYS> /

Database altered.

SYS> ed
Wrote file afiedt.buf

  1  alter database rename
  2   file '/home/oracle/oradata/testdb/redo01.log'
  3*  to '/data/temp/redo01.log'
SYS> /

Database altered.

SYS> select member from v$logfile;

MEMBER
------------------------------------------------------------------------------------------------------------------------------------------------------
/data/temp/redo03.log
/data/temp/redo02.log
/data/temp/redo01.log

SYS>
SYS> select name from v$datafile;

NAME
------------------------------------------------------------------------------------------------------------------------------------------------------
/home/oracle/oradata/testdb/system01.dbf
/home/oracle/oradata/testdb/undotbs01.dbf
/home/oracle/oradata/testdb/sysaux01.dbf
/home/oracle/oradata/testdb/users01.dbf
/home/oracle/oradata/testdb/example01.dbf
/home/oracle/oradata/testdb/test01.dbf

6 rows selected.

SYS> alter database rename
  2   file '/home/oracle/oradata/testdb/system01.dbf'
  3   to '/data/temp/system01.dbf';

Database altered.

SYS> ed
Wrote file afiedt.buf

  1  alter database rename
  2   file '/home/oracle/oradata/testdb/sysaux01.dbf'
  3*  to '/data/temp/sysaux01.dbf'
SYS> /

Database altered.

SYS> ed
Wrote file afiedt.buf

  1  alter database rename
  2   file '/home/oracle/oradata/testdb/undotbs01.dbf'
  3*  to '/data/temp/undotbs01.dbf'
SYS> /

Database altered.

SYS> ed
Wrote file afiedt.buf
/
  1  alter database rename
  2   file '/home/oracle/oradata/testdb/users01.dbf'
  3*  to '/data/temp/users01.dbf'
SYS>

Database altered.

SYS> ed
Wrote file afiedt.buf

  1  alter database rename
  2   file '/home/oracle/oradata/testdb/example01.dbf'
  3*  to '/data/temp/example01.dbf'
SYS> /

Database altered.

SYS> ed
Wrote file afiedt.buf

  1  alter database rename
  2   file '/home/oracle/oradata/testdb/test01.dbf'
  3*  to '/data/temp/test01.dbf'
SYS> /
alter database rename
*
ERROR at line 1:
ORA-01511: error in renaming log/data files
ORA-01141: error renaming data file 6 - new file '/data/temp/test01.dbf' not found
ORA-01110: data file 6: '/home/oracle/oradata/testdb/test01.dbf'
ORA-27037: unable to obtain file status
Linux Error: 2: No such file or directory
Additional information: 3


SYS> select name from v$datafile;

NAME
------------------------------------------------------------------------------------------------------------------------------------------------------
/data/temp/system01.dbf
/data/temp/undotbs01.dbf
/data/temp/sysaux01.dbf
/data/temp/users01.dbf
/data/temp/example01.dbf
/home/oracle/oradata/testdb/test01.dbf

6 rows selected.
test01.dbf는 에러가 나는 것을 확인할 수 있다. 그 이유는 해당 경로에 test01.dbf 파일이 없기 때문이다.

5. test01.dbf파일을 오프라인 시킨 후 생성 후 온라인 후 복구를 시도하고 결과를 확인한다.
SYS> select name from v$datafile;

NAME
------------------------------------------------------------------------------------------------------------------------------------------------------
/data/temp/system01.dbf
/data/temp/undotbs01.dbf
/data/temp/sysaux01.dbf
/data/temp/users01.dbf
/data/temp/example01.dbf
/home/oracle/oradata/testdb/test01.dbf

6 rows selected.

SYS> alter database datafile '/home/oracle/oradata/testdb/test01.dbf' offline;

Database altered.

SYS> alter database create datafile '/home/oracle/oradata/testdb/test01.dbf'
  2   as '/data/temp/test01.dbf';

Database altered.

SYS> alter database datafile '/data/temp/test01.dbf' online;

Database altered.

SYS>
SYS> select name from v$datafile;

NAME
------------------------------------------------------------------------------------------------------------------------------------------------------
/data/temp/system01.dbf
/data/temp/undotbs01.dbf
/data/temp/sysaux01.dbf
/data/temp/users01.dbf
/data/temp/example01.dbf
/data/temp/test01.dbf

6 rows selected.

SYS>
SYS> recover database until time '2010-09-11:11:32:22';
Media recovery complete.
SYS>
SYS> alter database open resetlogs;

Database altered.

SYS> select * from scott.tt10;

 NO
----------
  1



◆ 복구방법 2 - 백업된 컨트롤파일을 이용한 복구

1. 테스트하기 전 DB를 풀백업 받는다.
SYS> select name from v$controlfile;

NAME
--------------------------------------------------------------------------------------------------------------------------------------------------------------------------
/data/temp/control01.ctl
/data/temp/control02.ctl
/data/temp/control03.ctl

SYS> select member from v$logfile;

MEMBER
---------------------------------------------
/data/temp/redo03.log
/data/temp/redo02.log
/data/temp/redo01.log

SYS> select name from v$datafile;

NAME
--------------------------------------------------------------------------------------------------------------------------------------------------------------------------
/data/temp/system01.dbf
/data/temp/undotbs01.dbf
/data/temp/sysaux01.dbf
/data/temp/users01.dbf
/data/temp/example01.dbf

5 rows selected.

SYS> shutdown immediate;
Database closed.
Database dismounted.
ORACLE instance shut down.
SYS>
SYS> !
[oracle@server118 ~]$ ls -l /data/temp/
합계 1079624
-rw-r-----  1 oracle dba   7290880  9월 11 11:48 control01.ctl
-rw-r-----  1 oracle dba   7290880  9월 11 11:48 control02.ctl
-rw-r-----  1 oracle dba   7290880  9월 11 11:48 control03.ctl
-rw-r-----  1 oracle dba 104865792  9월 11 11:48 example01.dbf
-rw-r-----  1 oracle dba  52429312  9월 11 11:48 redo01.log
-rw-r-----  1 oracle dba  52429312  9월 11 11:45 redo02.log
-rw-r-----  1 oracle dba  52429312  9월 11 11:45 redo03.log
-rw-r-----  1 oracle dba 262152192  9월 11 11:48 sysaux01.dbf
-rw-r-----  1 oracle dba 503324672  9월 11 11:48 system01.dbf
-rw-r-----  1 oracle dba  20979712  9월 11 11:26 temp01.dbf
-rw-r-----  1 oracle dba  31465472  9월 11 11:48 undotbs01.dbf
-rw-r-----  1 oracle dba   5251072  9월 11 11:48 users01.dbf
[oracle@server118 ~]$
[oracle@server118 ~]$ cp -av /data/temp/* /data/backup/close/
`/data/temp/control01.ctl' -> `/data/backup/close/control01.ctl'
`/data/temp/control02.ctl' -> `/data/backup/close/control02.ctl'
`/data/temp/control03.ctl' -> `/data/backup/close/control03.ctl'
`/data/temp/example01.dbf' -> `/data/backup/close/example01.dbf'
`/data/temp/redo01.log' -> `/data/backup/close/redo01.log'
`/data/temp/redo02.log' -> `/data/backup/close/redo02.log'
`/data/temp/redo03.log' -> `/data/backup/close/redo03.log'
`/data/temp/sysaux01.dbf' -> `/data/backup/close/sysaux01.dbf'
`/data/temp/system01.dbf' -> `/data/backup/close/system01.dbf'
`/data/temp/temp01.dbf' -> `/data/backup/close/temp01.dbf'
`/data/temp/undotbs01.dbf' -> `/data/backup/close/undotbs01.dbf'
`/data/temp/users01.dbf' -> `/data/backup/close/users01.dbf'
[oracle@server118 ~]$ exit
exit

SYS> startup
ORACLE instance started.

Total System Global Area  285212672 bytes
Fixed Size      1267068 bytes
Variable Size     92277380 bytes
Database Buffers   188743680 bytes
Redo Buffers      2924544 bytes
Database mounted.
Database opened.
SYS>

2. 위 시나리오대로 장애를 내어본다.
SYS> @dd

TABLESPACE   MB FILE_NAME
---------- ---- ---------------------------------------------
USERS       5 /data/temp/users01.dbf
SYSAUX     250 /data/temp/sysaux01.dbf
UNDOTBS1     30 /data/temp/undotbs01.dbf
SYSTEM     480 /data/temp/system01.dbf
EXAMPLE     100 /data/temp/example01.dbf

SYS> create tablespace test
  2   datafile '/data/temp/test01.dbf' size 10M;

Tablespace created.

SYS> create table scott.tt20 (no number) tablespace test;

Table created.

SYS> insert into scott.tt20 values (1);

1 row created.

SYS> commit;

Commit complete.

SYS> select * from scott.tt20;

 NO
----------
  1

SYS> @t

TIME
-------------------
2010-09-11:11:53:22

SYS> !
[oracle@server118 ~]$ rm -fr /data/temp/test01.dbf
[oracle@server118 ~]$ exit
exit

SYS> alter system switch logfile;

System altered.

SYS> /

System altered.

SYS> @t

TIME
-------------------
2010-09-11:11:53:44

SYS> select * from scott.tt20;

 NO
----------
  1

SYS> drop table scott.tt20 purge;

Table dropped.

SYS> select * from scott.tt20;
select * from scott.tt20
                    *
ERROR at line 1:
ORA-00942: table or view does not exist

3. 복구방법1과는 달리 백업된 데이터파일과 컨트롤파일을 복구 디렉토리로 복사한다. 리두로그는 현재의 것을 복사해준다.
SYS> shutdown immediate;
Database closed.
Database dismounted.
ORACLE instance shut down.
SYS>
SYS> !
[oracle@server118 ~]$ mkdir /data/temp2
[oracle@server118 ~]$
[oracle@server118 ~]$ cp -av /data/backup/close/*.dbf /data/temp2/
`/data/backup/close/example01.dbf' -> `/data/temp2/example01.dbf'
`/data/backup/close/sysaux01.dbf' -> `/data/temp2/sysaux01.dbf'
`/data/backup/close/system01.dbf' -> `/data/temp2/system01.dbf'
`/data/backup/close/temp01.dbf' -> `/data/temp2/temp01.dbf'
`/data/backup/close/undotbs01.dbf' -> `/data/temp2/undotbs01.dbf'
`/data/backup/close/users01.dbf' -> `/data/temp2/users01.dbf'
[oracle@server118 ~]$
[oracle@server118 ~]$ cp -av /data/backup/close/*.ctl /data/temp2/
`/data/backup/close/control01.ctl' -> `/data/temp2/control01.ctl'
`/data/backup/close/control02.ctl' -> `/data/temp2/control02.ctl'
`/data/backup/close/control03.ctl' -> `/data/temp2/control03.ctl'
[oracle@server118 ~]$
[oracle@server118 ~]$ cp -av /data/temp/*.log /data/temp2/
`/data/temp/redo01.log' -> `/data/temp2/redo01.log'
`/data/temp/redo02.log' -> `/data/temp2/redo02.log'
`/data/temp/redo03.log' -> `/data/temp2/redo03.log'
[oracle@server118 ~]$
[oracle@server118 ~]$ vi /home/oracle/product/10g/dbs/inittestdb.ora
[oracle@server118 ~]$ exit
exit

4. DB를 마운트 상태까지 올린 후 각각 경로를 복구디렉토리로 변경해준다.
SYS> startup mount;
ORACLE instance started.

Total System Global Area  285212672 bytes
Fixed Size      1267068 bytes
Variable Size     92277380 bytes
Database Buffers   188743680 bytes
Redo Buffers      2924544 bytes
Database mounted.
SYS>
SYS> select name from v$controlfile;

NAME
------------------------------------------------------------------------------------------------------------------------------------------------------
/data/temp2/control01.ctl
/data/temp2/control02.ctl
/data/temp2/control03.ctl

SYS> select member from v$logfile;

MEMBER
---------------------------------------------
/data/temp/redo03.log
/data/temp/redo02.log
/data/temp/redo01.log

SYS> alter database rename      
  2   file '/data/temp/redo03.log'
  3   to '/data/temp2/redo03.log';

Database altered.

SYS> ed
Wrote file afiedt.buf

  1  alter database rename
  2   file '/data/temp/redo02.log'
  3*  to '/data/temp2/redo02.log'
SYS> /

Database altered.

SYS> ed
Wrote file afiedt.buf

  1  alter database rename
  2   file '/data/temp/redo01.log'
  3*  to '/data/temp2/redo01.log'
SYS> /

Database altered.

SYS> select member from v$logfile;

MEMBER
---------------------------------------------
/data/temp2/redo03.log
/data/temp2/redo02.log
/data/temp2/redo01.log

SYS> select name from v$datafile;

NAME
------------------------------------------------------------------------------------------------------------------------------------------------------
/data/temp/system01.dbf
/data/temp/undotbs01.dbf
/data/temp/sysaux01.dbf
/data/temp/users01.dbf
/data/temp/example01.dbf

SYS>
SYS> alter database rename
  2   file '/data/temp/system01.dbf'
  3   to '/data/temp2/system01.dbf';

Database altered.

SYS> ed
Wrote file afiedt.buf

  1  alter database rename
  2   file '/data/temp/sysaux01.dbf'
  3*  to '/data/temp2/sysaux01.dbf'
SYS> /

Database altered.

SYS> ed
Wrote file afiedt.buf

  1  alter database rename
  2   file '/data/temp/undotbs01.dbf'
  3*  to '/data/temp2/undotbs01.dbf'
SYS> /

Database altered.

SYS> ed
Wrote file afiedt.buf

  1  alter database rename
  2   file '/data/temp/users01.dbf'
  3*  to '/data/temp2/users01.dbf'
SYS> /

Database altered.

SYS> ed
Wrote file afiedt.buf

  1  alter database rename
  2   file '/data/temp/example01.dbf'
  3*  to '/data/temp2/example01.dbf'
SYS> /

Database altered.

SYS> select name from v$datafile;

NAME
------------------------------------------------------------------------------------------------------------------------------------------------------
/data/temp2/system01.dbf
/data/temp2/undotbs01.dbf
/data/temp2/sysaux01.dbf
/data/temp2/users01.dbf
/data/temp2/example01.dbf

SYS>
SYS> alter database create datafile '/data/temp/test01.dbf' as '/data/temp/test01.dbf';
alter database create datafile '/data/temp/test01.dbf' as '/data/temp/test01.dbf'
*
ERROR at line 1:
ORA-01516: nonexistent log file, datafile, or tempfile "/data/temp/test01.dbf"

SYS> select name from v$datafile;

NAME
------------------------------------------------------------------------------------------------------------------------------------------------------
/data/temp2/system01.dbf
/data/temp2/undotbs01.dbf
/data/temp2/sysaux01.dbf
/data/temp2/users01.dbf
/data/temp2/example01.dbf
test01.dbf를 생성하려 했더니 에러가 났다. 그 이유는 백업된 컨트롤파일의 시점때는 test01.dbf가 없기 때문에 해당 경로에 파일이 존재하지 않는다.

5. 복구를 시도해본다.
SYS> recover database until time '2010-09-11:11:53:44' using backup controlfile;
ORA-00279: change 509738 generated at 09/11/2010 11:48:34 needed for thread 1
ORA-00289: suggestion : /data/arc2/1_10_729431106.arc
ORA-00280: change 509738 for thread 1 is in sequence #10

Specify log: {<RET>=suggested | filename | AUTO | CANCEL}
auto
ORA-00283: recovery session canceled due to errors
ORA-01244: unnamed datafile(s) added to control file by media recovery
ORA-01110: data file 6: '/data/temp/test01.dbf'

ORA-01112: media recovery not started

SYS>
SYS> select name from v$datafile;

NAME
------------------------------------------------------------------------------------------------------------------------------------------------------
/data/temp2/system01.dbf
/data/temp2/undotbs01.dbf
/data/temp2/sysaux01.dbf
/data/temp2/users01.dbf
/data/temp2/example01.dbf
/home/oracle/product/10g/dbs/UNNAMED00006

6 rows selected.
test01.dbf 파일이 없어서 복구를 실패하였다. 하지만 데이터파일을 조회해보면 이상한 놈이 추가된 것을 확인할 수 있다. 저것은 백업된 컨트롤파일의 시점때는 test01.dbf가 없었지만 백업된 시점으로부터 시간기반 불완전복구를 수행하면서 컨트롤파일에는 test01.dbf가 없는데 딕셔너리에는 test01.dbf가 있으므로, 오라클이 이름을 달리해서 보여준 것이다.

6. 위 이상한 놈을 이름을 변경해서 생성해주고 다시 복구를 시도해본다. 그리고 결과를 확인한다.
SYS> alter database create datafile '/home/oracle/product/10g/dbs/UNNAMED00006'
  2   as '/data/temp2/test01.dbf';

Database altered.

SYS> select name from v$datafile;

NAME
------------------------------------------------------------------------------------------------------------------------------------------------------
/data/temp2/system01.dbf
/data/temp2/undotbs01.dbf
/data/temp2/sysaux01.dbf
/data/temp2/users01.dbf
/data/temp2/example01.dbf
/data/temp2/test01.dbf

6 rows selected.

SYS>
SYS> recover database until time '2010-09-11:11:53:44' using backup controlfile;
ORA-00279: change 509932 generated at 09/11/2010 11:52:48 needed for thread 1
ORA-00289: suggestion : /data/arc2/1_10_729431106.arc
ORA-00280: change 509932 for thread 1 is in sequence #10

Specify log: {<RET>=suggested | filename | AUTO | CANCEL}
auto
ORA-00279: change 509986 generated at 09/11/2010 11:53:42 needed for thread 1
ORA-00289: suggestion : /data/arc2/1_11_729431106.arc
ORA-00280: change 509986 for thread 1 is in sequence #11
ORA-00278: log file '/data/arc2/1_10_729431106.arc' no longer needed for this recovery

ORA-00279: change 509988 generated at 09/11/2010 11:53:42 needed for thread 1
ORA-00289: suggestion : /data/arc2/1_12_729431106.arc
ORA-00280: change 509988 for thread 1 is in sequence #12
ORA-00278: log file '/data/arc2/1_11_729431106.arc' no longer needed for this recovery

ORA-00308: cannot open archived log '/data/arc2/1_12_729431106.arc'
ORA-27037: unable to obtain file status
Linux Error: 2: No such file or directory
Additional information: 3

SYS> alter database open resetlogs;

Database altered.

SYS> select * from scott.tt20;

 NO
----------
  1
Posted by 겨울섬
,