728x90
반응형
SMALL

분류 전체보기 342

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 를..

백업 받지 않은 tablespace에 데이터 파일 손상 받았을 경우

SQL> CREATE TABLESPACE data01 DATAFILE '/u01/app/oracle/oradata/ora11g/data01.dbf' SIZE 5m; SQL> 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> 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$ba..

ARCHIVE LOG MODE 변경하는 방법

1. archive log file 생성되는 디렉터리 생성 [oracle1@oracle ~]$ pwd /home/oracle1 [oracle1@oracle ~]$ mkdir arch1 [oracle1@oracle ~]$ mkdir arch2 [oracle1@oracle ~]$ ls arch1 database Downloads p13390677_112040_LINUX_1of7.zip Public Videos arch2 Desktop Music p13390677_112040_LINUX_2of7.zip Templates backup Documents ora_data Pictures userdata 2. oracle 접속 (=> sql developer로 확인) [oracle1@oracle ~]$ sqlplus..

DB가 종료 후 데이터 파일이 삭제 시키고 DB 올릴 경우

#) data file 상태 확인 select name, status from v$datafile; # DB 정상적인 종료 SQL> shutdown immediate # 장애 유발 # SQL> ! rm /u01/app/oracle/oradata/ora11g/users01.dbf SQL> ! rm /u01/app/oracle/oradata/ora11g/example01.dbf SQL> ! ls /u01/app/oracle/oradata/ora11g/ SQL> ! ls /u01/app/oracle/oradata/ora11g/ # DB 올리기 SQL> startup ORA-01157: cannot identify/lock data file 4 - see DBWR trace file ORA-01110: data..

728x90
반응형
LIST