728x90
# 복구 어드바이져
l 복구 어드바이져란
- 오라클 장애상황을 감지하여 복구 스크립트를 생성해주는 기능
l 복구 어디바이져가 안되는 경우
1. RAC 환경
2. 너무 복잡한 장애상황일 때
l 명령어 3개 수행
1. RMAN> list failure;-
- 현재 장애상황을 알려줌
2. RMAN> advise failure;
- 현재 장애상황에 대한 스크립트를 생성하는 단계
3. RMAN> repair failure;
- 복구 스크립트를 자동으로 수행
n 그밖의 명령어
- SELECT * FROM v$ir_failure;
: 복구 내용 출력
- SELECT * FROM v$ir_manual_checklist;
: 오류 내용
- SELECT * FROM v$ir_repail;
: 조치 내역 출력
SQL> select file_name from dba_data_files; FILE_NAME ------------------------------------------------------------------------------------------------------------------------------------------ /u01/app/oracle/oradata/dbdb/user06.dbf /u01/app/oracle/oradata/dbdb/example01.dbf /u01/app/oracle/oradata/dbdb/users01.dbf /u01/app/oracle/oradata/dbdb/undotbs01.dbf /u01/app/oracle/oradata/dbdb/sysaux01.dbf /u01/app/oracle/oradata/dbdb/system01.dbf /u01/app/oracle/oradata/dbdb/ts50.dbf SQL> exit [dbdb:dbdb]$ cd /u01/app/oracle/oradata/dbdb/ [dbdb:dbdb]$ rm users01.dbf [dbdb:dbdb]$ sqlplus "/as sysdba" SQL> shutdown abort SQL> startup Total System Global Area 422670336 bytes …………………………………………………………………….. ORA-01157: cannot identify/lock data file 4 - see DBWR trace file ORA-01110: data file 4: '/u01/app/oracle/oradata/dbdb/users01.dbf' SQL> exit RMAN> list failure; List of Database Failures ========================= Failure ID Priority Status Time Detected Summary ---------- -------- --------- ------------- ------- 82 HIGH OPEN 15-JUL-14 One or more non-system datafiles are missing 5 HIGH OPEN 14-JUL-14 One or more non-system datafiles need media recovery RMAN> advise failure; List of Database Failures ========================= Failure ID Priority Status Time Detected Summary ---------- -------- --------- ------------- ------- 82 HIGH OPEN 15-JUL-14 One or more non-system datafiles are missing 5 HIGH OPEN 14-JUL-14 One or more non-system datafiles need media recovery …………………………………………………………………….. RMAN> repair failure; Strategy: The repair includes complete media recovery with no data loss Repair script: /u01/app/oracle/diag/rdbms/dbdb/dbdb/hm/reco_1441488918.hm - repair script를 만들고 위치를 알려준다 contents of repair script: # restore and recover datafile restore datafile 4; recover datafile 4; Do you really want to execute the above repair (enter YES or NO)? yes executing repair script Starting restore at 16-JUL-14 using channel ORA_DISK_1 …………………………………………………………………….. starting media recovery media recovery complete, elapsed time: 00:00:00 Finished recover at 16-JUL-14 repair failure complete Do you want to open the database (enter YES or NO)? yes database opened |
'빅데이터과정 > WORKSHOP 1 ' 카테고리의 다른 글
#25_140717_WSHOP_DIRECT PATH LOAD (0) | 2014.07.17 |
---|---|
#24_140716_WSHOP_DIRECT LOAD INSERT (0) | 2014.07.16 |
#24_140716_WSHOP_백업(RMAN) (0) | 2014.07.16 |
#24_140716_WSHOP_백업(사용자관리) (0) | 2014.07.16 |
#23_140715_WSHOP_백업/복구 (0) | 2014.07.15 |