본문 바로가기

Oracle DataBase/백업복구 실습

(18)
undo tablespace 장애 복구 - 운영중인 undo tablespace 장애 복구 undo_management=auto create table scott.tt01(no number) tablespace example; Table created. SQL> insert into scott.tt01 values(1); 1 row created. SQL> ed Wrote file afiedt.buf 1* insert into scott.tt01 values(2) SQL> / 1 row created. SQL> alter system switch logfile; System altered. SQL> / System altered. SQL> / alter system switch logfile * ERROR at line 1: ORA-03113..
log miner를 이용하기 ★ 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..
drop tablespace 로 잘못 삭제된 Tablespace 복구 - drop tablespace 로 잘못 삭제된 Tablespace 복구 TABLESPACE MB FILE_NAME ---------- ---- -------------------------------------------------- UNDO 10 /home/oracle/oradata/testdb/undo01.dbf TEST 10 /home/oracle/oradata/testdb/test01.dbf EXAMPLE 100 /home/oracle/oradata/testdb/example01.dbf USERS 5 /home/oracle/oradata/testdb/users01.dbf SYSAUX 250 /home/oracle/oradata/testdb/sysaux01.dbf SYSTEM 450 /home/o..
drop table 복구하기 ( 백업 없는 경우 ) ★ 전체 백업수행 ★ 테이블 만들기 SQL> create table scott.tt500(no number) tablespace test; Table created. SQL> insert into scott.tt500 values(1); 1 row created. SQL> ed Wrote file afiedt.buf 1* insert into scott.tt500 values(2) SQL> / 1 row created. SQL> ed Wrote file afiedt.buf 1* insert into scott.tt500 values(3) SQL> / 1 row created. SQL> commit; Commit complete. SQL> @tt TO_CHAR(SYSDATE,'YYYY-MM-DD:HH24:..
drop table 명령으로 삭제된 Table 복구하기 ★ drop table 명령으로 삭제된 Table 복구하기 Table 생성하기 SQL> create table test01(no number) tablespace test SQL> insert into test01 values(1); SQL> insert into test01 values(2); SQL> insert into test01 values(3); SQL> commit; TO_CHAR(SYSDATE,'YYYY-MM-DD:HH24:MI:SS -------------------------------------- 2012-01-08:00:08:26 SQL> insert into test01 values(4);. SQL> commit; SQL> @tt TO_CHAR(SYSDATE,'YYYY-MM-DD:..
Tablespace 실습 : 백업파일이 없는 경우 복구하기 ★ 장애상황 만들기 SQL> create tablespace haksa @dd TABLESPACE MB FILE_NAME ---------- ---------- -------------------------------------------------- UNDO 10 /home/oracle/oradata/testdb/undo01.dbf HAKSA 10 /home/oracle/oradata/testdb/haksa01.dbf TEST 10 /home/oracle/oradata/testdb/test01.dbf EXAMPLE 100 /home/oracle/oradata/testdb/example01.dbf USERS 5 /home/oracle/oradata/testdb/users01.dbf SYSAUX 250 /..
Offline 안되는 Tablespace 장애 복구하기 ★ 장애상황 만들기~ SQL> select status from v$instance; STATUS ------------------------ OPEN SQL> desc test1 Name Null? Type NO NUMBER SQL> drop table test1 purge; create table test1 (no number) tablespace system; Table created. SQL> insert into test1 values(1); 1 row created. SQL> commit; Commit complete. SQL> @dd TABLESPACE MB FILE_NAME ---------- ---------- -------------------------------------------..
Offline 되는 일반 Tablespace 장애 복구하기 ★ 장애상황 운영중인 DB중 teest01.dbf가 삭제된것을 발견 다행이 백업파일은 존재하며, 현재 DB는 OPEN 상태 DB종료없이 빨리 복구를 해야함. SQL> startup mount ORACLE instance started. Total System Global Area 167772160 bytes Fixed Size 1272600 bytes Variable Size 62915816 bytes Database Buffers 100663296 bytes Redo Buffers 2920448 bytes Database mounted. SQL> alter database archivelog; SQL> archive log list; 장애를 재연하기위해 hot backup 실시 SQL> alter ta..