728x90
반응형
SMALL

Backup/Archive Log Mode 24

data file, redo log file 손상되지 않고 control file 손상되었을 경우

SQL> select * from v$log; select a.file#, a.name file_name, b.name file_name, b.name tbs_name, a.status, a.checkpoint_change# from v$datafile a, v$tablespace b where a.ts# = b.ts#; # 테이블 생성 및 확인 SQL> create table hr.emp_30 as select * from hr.employees where department_id = 30; SQL> select count(*) from hr.emp_30; # 장애 발생 # => control01.ctl 지우기, log switch 발생 SQL> ! rm /u01/app/oracle/oradata/or..

control file 손상 되었을 경우.(control file 의 백업 file 있을 때)

select * from v$datafile; select * from v$log; => 백업 이후의 아카이브 확인 select * from v$logfile; select a.file#, a.name, a.checkpoint_change#, b.status, b.change#, b.time from v$datafile a, v$backup b where a.file# = b.file#; select name from v$controlfile; S! ls /home/oracle1/arch1 SQL> create table hr.emp_20 as select * from hr.employees where department_id = 20; Table created. SQL> select count(*) f..

undo.dbf 장애 발생했을 경우

1. data file, tablespace 상태 및 체크포인트 번호 확인 select a.file#, a.name file_name, b.name file_name, b.name tbs_name, a.status, a.checkpoint_change# from v$datafile a, v$tablespace b where a.ts# = b.ts#; 2. 백업 정보 확인 select a.file#, a.name file_name, a.checkpoint_change#, b.status, b.change#, to_char(b.time, 'yyyy-mm-dd hh24:mi:ss') from v$datafile a, v$backup b where a.file# = b.file#; 3. redo log 정보 확..

archive file 이 다른 위치에 있을 경우

SQL> select * from v$log; #) log switch 발생 SQL> alter system switch logfile; #) archive file 확인 SQL> ! ls /home/oracle1/arch1 /home/oracle1/arch2 #) DB 내리기 SQL> shutdown immediate #) OS 나와 archive_file 디렉터리 이동 SQL> ! [oracle1@oracle ~]$ cd archive_file/ [oracle1@oracle archive_file]$ pwd /home/oracle1/archive_file #) 파일 이동시키기 [oracle1@oracle archive_file]$ mv /home/oracle1/arch2/*.* . [oracle1@o..

모든 데이터 파일 손상되었을 경우

# 장애 유발 # SQL> ! rm /u01/app/oracle/oradata/ora11g/*.dbf #) 오류발생 SQL> alter system checkpoint; => channel 끊어졌음 #) DB 올리기 SQL> startup #) 재접속 SQL> conn / as sysdba Connected to an idle instance. #) DB 올리기 SQL> startup ORACLE instance started. Total System Global Area 711430144 bytes Fixed Size 1367004 bytes Variable Size 440402980 bytes Database Buffers 264241152 bytes Redo Buffers 5419008 bytes ..

system data file 손상되었을 경우

# 백업 확인(물리적위치) SQL> ! ls /home/oracle1/backup/arch/hot_20240112/ # 백업 정보 select a.file#, a.name file_name, a.checkpoint_change#, b.status, b.change#, to_char(b.time, 'yyyy-mm-dd hh24:mi:ss') from v$datafile a, v$backup b where a.file# = b.file#; # 장애 발생 SQL> ! rm /u01/app/oracle/oradata/ora11g/system01.dbf SQL> ! ls /u01/app/oracle/oradata/ora11g/system01.dbf ls: cannot access /u01/app/oracle/or..

tablespace 에 속한 여러 데이터 파일들 중에 특정한 파일이 손상되었을 경우

SQL> select tablespace_name, file_name from dba_data_files; # 테이블 스페이스 데이터파일 추가 SQL> alter tablespace data01 add datafile '/u01/app/oracle/oradata/ora11g/data02.dbf' size 10m; # data02.dbf 확인 SQL> select tablespace_name, file_name from dba_data_files; # 테이블 생성 SQL> create table hr.emp_2024 tablespace data01 as select * from hr.employees; # 위치 확인 select f.tablespace_name, f.file_name from dba_ext..

기존 위치가 아닌 새로운 위치로 복구

# 테이블 생성 SQL> create table hr.emp_temp tablespace data01 as select * from hr.employees; # 테이블 생성 확인 SQL> select count(*) from hr.emp_temp; # redo log 정보 확인 - table 생성 SQL> select * from v$log; # 백업 정보 확인 select a.file#, a.name file_name, a.checkpoint_change#, b.status, b.change#, to_char(b.time, 'yyyy-mm-dd hh24:mi:ss') from v$datafile a, v$backup b where a.file# = b.file#; # data01 tablespace 를..

728x90
반응형
LIST