★ log miner를 이용하여 redo log file에서 특정 테이블 삭제 시간 찾기
SQL> create table scott.tt10 (no number) tablespace example;
Table created.
SQL> insert into scott.tt10 values(1);
1 row created.
SQL> ed
Wrote file afiedt.buf
1* insert into scott.tt10 values(2)
SQL> /
1 row created.
SQL> commit;
Commit complete.
SQL> @tt
TO_CHAR(SYSDATE,'YYYY-MM-DD:HH24:MI:SS
--------------------------------------
2012-01-08:04:02:55
SQL> drop table scott.tt10 purge; <- 장애 발생시키기
★ log miner 설정하기
파라미터 파일에 딕셔너리 파일이 생성될 경로 설정을 추가합니다.
utl_file_dir="/data/logmnr" <- 경로 원하는곳 설정
SQL> !vi $ORACLE_HOME/dbs/inittestdb.ora
utl_file_dir="/data/logmnr"
< 딕셔너리 파일 생성 >
SQL> exec dbms_logmnr_d.build('dict','/data/logmnr');
PL/SQL procedure successfully completed.
< 분석하기 원하는 파일 등록 >
SQL> exec dbms_logmnr.add_logfile('/home/oracle/oradata/testdb/redo03_a.log',1);
PL/SQL procedure successfully completed.
< 등록한 파일 분석하기 >
SQL> exec dbms_logmnr.start_logmnr(dictfilename=>'/data/logmnr/dict');
PL/SQL procedure successfully completed.
SQL> col timestamp for a20
SQL> col seg_owner for a10
SQL> col username for a10
SQL> col sql_redo for a50
SQL> col operation for a10
SQL> select to_char(timestamp,'YYYY-MM-DD:HH24:MI:SS'),seg_owner,username,operation,sql_redo
2 from v$logmnr_contents
3 where sql_redo like '%drop%'
and seg_owner = 'SCOTT';
이중에서 무슨테이블을 지웠는지 체크해서 확인하면 된다.
'Oracle DataBase > 백업복구 실습' 카테고리의 다른 글
undo tablespace 장애 복구 (0) | 2012.06.08 |
---|---|
drop tablespace 로 잘못 삭제된 Tablespace 복구 (0) | 2012.06.08 |
drop table 복구하기 ( 백업 없는 경우 ) (0) | 2012.06.08 |
drop table 명령으로 삭제된 Table 복구하기 (0) | 2012.06.08 |
Tablespace 실습 : 백업파일이 없는 경우 복구하기 (0) | 2012.06.08 |