프린트 하기

OS환경 : Oracle Linux7.2(64bit)


DB 환경 : Oracle Database 12.2.0.2


에러 : ORA-27047: unable to read the header block of file Linux-x86_64 Error: 25: Inappropriate ioctl for device

clone db를 구성하던 중 에러 발생
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
SYS@clone> recover database using backup controlfile until cancel;
ORA-00279change 3452039 generated at 09/20/2018 19:13:58 needed for thread 1
ORA-00289: suggestion : /app/oracle/fast_recovery_area/CLONE/archivelog/2018_09_20/o1_mf_1_848_ft6ww32d_.arc
ORA-27047: unable to read the header block of file
Linux-x86_64 Error: 25: Inappropriate ioctl for device
Additional information: 1
ORA-27072: File I/O error
Linux-x86_64 Error: 25: Inappropriate ioctl for device
Additional information: 4
Additional information: 1
Additional information: 32
ORA-27047: unable to read the header block of file
Linux-x86_64 Error: 25: Inappropriate ioctl for device
Additional information: 1
ORA-27047: unable to read the header block of file
Linux-x86_64 Error: 25: Inappropriate ioctl for device
Additional information: 1
ORA-00280change 3452039 for thread 1 is in sequence #848



해결 방법 : FRA에서 oracle에서 안쓰는 파일들을 제거해야함


FRA로 이동

1
[oracle@oraora ~]$ cd /app/oracle/fast_recovery_area/CLONE

조회
1
2
[oracle@oraora CLONE]$ ls
archivelog  autobackup

모르는 파일을 상위경로로 이동
1
[oracle@oraora CLONE]$ mv autobackup/ ../

다른 파일 더확인
1
2
3
4
5
6
7
8
[oracle@oraora CLONE]$ cd archivelog/
[oracle@oraora archivelog]$ ls
2018_09_19  2018_09_20
[oracle@oraora archivelog]$ cd 2018_09_20/
[oracle@oraora 2018_09_20]$ ls
afiedt.buf                 o1_mf_1_842_ft4sw9ty_.arc  o1_mf_1_845_ft6rtjnq_.arc  o1_mf_1_848_ft6ww32d_.arc
o1_mf_1_840_ft4sw9cp_.arc  o1_mf_1_843_ft4swb91_.arc  o1_mf_1_846_ft6rz0x5_.arc
o1_mf_1_841_ft4sw9nf_.arc  o1_mf_1_844_ft4swfj8_.arc  o1_mf_1_847_ft6vyx5g_.arc

버퍼 파일 확인 후 삭제
1
[oracle@oraora 2018_09_20]$ rm afiedt.buf

명령어 재시도

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
SYS@clone> recover database using backup controlfile until cancel;
ORA-00279change 3452152 generated at 09/20/2018 19:16:35 needed for thread 1
ORA-00289: suggestion : /app/oracle/fast_recovery_area/CLONE/archivelog/2018_09_20/o1_mf_1_849_%u_.arc
ORA-00280change 3452152 for thread 1 is in sequence #849
 
 
Specify log: {<RET>=suggested | filename | AUTO | CANCEL}
auto
ORA-00308: cannot open archived log '/app/oracle/fast_recovery_area/CLONE/archivelog/2018_09_20/o1_mf_1_849_%u_.arc'
ORA-27037: unable to obtain file status
Linux-x86_64 Error: 2: No such file or directory
Additional information: 7
 
 
ORA-00308: cannot open archived log '/app/oracle/fast_recovery_area/CLONE/archivelog/2018_09_20/o1_mf_1_849_%u_.arc'
ORA-27037: unable to obtain file status
Linux-x86_64 Error: 2: No such file or directory
Additional information: 7
 
 
SYS@clone> recover database using backup controlfile until cancel;
ORA-00279change 3452152 generated at 09/20/2018 19:16:35 needed for thread 1
ORA-00289: suggestion : /app/oracle/fast_recovery_area/CLONE/archivelog/2018_09_20/o1_mf_1_849_%u_.arc
ORA-00280change 3452152 for thread 1 is in sequence #849
 
 
Specify log: {<RET>=suggested | filename | AUTO | CANCEL}
cancel
Media recovery cancelled.
SYS@clone> alter database open resetlogs;
 
Database altered.

에러 안남 복구완료



원인 : 비 oracle 파일이 FRA에 있어서 문제가 생김

afiedt.buf 파일은 sqlplus 에서 명령을 실행한 뒤 남는 버퍼 파일임
sqlplus에서 쿼리 작성 후 ed 등으로 쿼리를 수정한 값이 저장되는 파일임



참조 : https://dbatricksworld.com/ora-27047-unable-to-read-the-header-block-of-file-linux-x86_64-error-25-inappropriate-ioctl-for-device-ora-27048-skgfifi-file-header-information-is-invalid-ora-27072-file-io-error/