프린트 하기

내맘대로긍정이 알려주는

Oracle 23ai 신기능
무료 세미나 발표자료

다운로드 trending_flat
2024
10.12
14:00

OS환경 : Oracle Cloud Linux (64bit)


DB 환경 : Oracle Cloud ATP Database 18.4.0.0


에러 : ORA-00600: internal error code, arguments: [ktfbns_update_ilmstat2]

오라클 클라우드 ATP DB에 아래와 같이 dbms_cloud.copy_data 시
1
2
3
4
5
6
7
8
9
SQL> begin
 dbms_cloud.copy_data(
    table_name =>'CHANNELS',
    credential_name =>'OBJ_STORE_CRED',
    file_uri_list =>'https://objectstorage.(region name).oraclecloud.com/n/(tenant name)/b/(bucket name)/o/(file name)',
    format => json_object('ignoremissingcolumns' value 'true''removequotes' value 'true')
 );
end;
/


데이터베이스 접속이 재설정되었습니다. 보류 중인 트랜잭션이나 세션 상태가 유실되었습니다
메세지와 함께 ORA-600 메세지 발생

1
2
3
4
5
6
7
ORA-00600: internal error code, arguments: [ktfbns_update_ilmstat2], [262146], [], [], [], [], [], [], [], [], [], []
00600. 00000 -  "internal error code, arguments: [%s], [%s], [%s], [%s], [%s], [%s], [%s], [%s], [%s], [%s], [%s], [%s]"
*Cause:    This is the generic internal error number for Oracle program
           exceptions. It indicates that a process has encountered a low-level,
           unexpected condition. The first argument is the internal message
           number. This argument and the database version number are critical in
           identifying the root cause and the potential impact to your system.


추가로 테스트 해본 결과

아래와 같이 dept 테이블을 만들고

1
2
3
4
5
6
SQL> create table dept(  
  deptno     number(2,0),  
  dname      varchar2(14),  
  loc        varchar2(13),  
  constraint pk_dept primary key (deptno)  
);


insert 명령을 입력할 때에도 똑같이 아래 ORA-00600 메세지나 나타남

1
2
3
4
5
SQL> insert into DEPT (DEPTNO, DNAME, LOC)
values(10'ACCOUNTING''NEW YORK');
            *
ERROR at line 1:
ORA-00600: internal error code, arguments: [ktfbns_update_ilmstat2], [1048578], [], [], [], [], [], [], [], [], [], []

admin 계정과 atcp_user 계정 모두 같은 에러가 발생함

2번째 aguments만 다르고 ORA-00600 첫번째 aguments는 모두 같은 ktfbns_update_ilmstat2 이 나옴



sqlplus 에서 단순 insert문이 ORA-00600이 발생하는걸로 봐서

처음 생각한 DBMS_CLOUD 패키지 문제가 아닌 db 자체에 internal 한 에러가 아닌가 싶음


+190122 추가

기본 t1 테이블에 대한 insert문은 되는것을 확인(오라클에서 뭔가 조치를 취한듯 했지만..)

1
2
3
4
5
6
7
8
9
10
11
12
SQL> insert into t1 values (2);
 
1 row created.
 
SQL> select * from t1;
 
    C1
----------
     1
     2
 
2 rows selected.


하지만 새로 t2 테이블을 만들고 insert 하면 똑같이 ORA-00600 발생

(똑같이 만든 t1, t2 테이블이 insert 가안되는 이유를 모르겠음)

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
SQL> create table t2 as select * from t1 where 1=0;
 
Table created.
 
SQL> insert into t2 values (1);
insert into t2 values (1)
            *
ERROR at line 1: (t2 실패)
ORA-00600: internal error code, arguments: [ktfbns_update_ilmstat2], [524290], [], [], [], [], [], [], [], [], [], []
 
SQL> insert into t1 values (3);
 
1 row created. (t1 성공)
 
SQL> insert into t2 select * from t1;
insert into t2 select * from t1
            *
ERROR at line 1: (t2 실패)
ORA-00600: internal error code, arguments: [ktfbns_update_ilmstat2], [524290], [], [], [], [], [], [], [], [], [], []


메타링크에서

[버그 29119876 : CUSTOMER GOT ORA-00600[KTFBNS _UPDATE_ILMSTAT2], [1311761] IN E1POD IAD]

를 찾았으나 패치는 없음(패치가 있어도 클라우드라 힘듬)



해결 방법 : 찾는중 -> 아래 방법으로 실행

+190128 추가
오라클에서 또다른 방법을 보내줌
1. 기존의 생성한 Auth Token을 삭제하시고 생성한 OBJ_STORE_CRED 드롭
2. User Datail로 가셔서 그룹에 Administrators 추가
3. Auth Token 재생성 후 OBJ_STORE_CRED를 새로 생성
4. File url list 에 https://swiftobjectstorage.(region name).oraclecloud.com/v1/(tenant name)/(bucket name)/(file name) 형식대로 입력
5. 스크립트 실행


이 방법대로 했더니 정상적으로 데이터가 로드됨

기존 주소로 dbms_cloud.copy_data 실행(에러 발생)

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
SQL> begin
 dbms_cloud.copy_data(
    table_name =>'CHANNELS',
    credential_name =>'OBJ_STORE_CRED',
    file_uri_list =>'https://objectstorage.(region name).oraclecloud.com/n/(tenant name)/b/(bucket name)/o/(file name)',
    format => json_object('ignoremissingcolumns' value 'true''removequotes' value 'true')
 );
end;
/
 
begin
*
ERROR at line 1:
ORA-29913: error in executing ODCIEXTTABLEOPEN callout
ORA-06512: at "C##CLOUD$SERVICE.DBMS_CLOUD", line 860
ORA-20000: Unsupported cloud store uri - https://objectstorage.(region name).oraclecloud.com/n/(tenant name)/b/(bucket name)/o/(file name)
ORA-06512: at "C##CLOUD$SERVICE.DBMS_CLOUD_INTERNAL", line 2910
ORA-06512: at "C##CLOUD$SERVICE.DBMS_CLOUD_REQUEST", line 229
ORA-06512: at "C##CLOUD$SERVICE.DBMS_CLOUD_REQUEST", line 786
ORA-06512: at "C##CLOUD$SERVICE.DBMS_CLOUD_INTERNAL", line 2876
ORA-06512: at line 1
ORA-06512: at "C##CLOUD$SERVICE.DBMS_CLOUD", line 835
ORA-06512: at "C##CLOUD$SERVICE.DBMS_CLOUD", line 895
ORA-06512: at line 2


오라클에서 알려준 주소로 dbms_cloud.copy_data 실행(에러 미발생)

1
2
3
4
5
6
7
8
9
10
11
12
SQL>
 begin
 dbms_cloud.copy_data(
    table_name =>'CHANNELS',
    credential_name =>'OBJ_STORE_CRED',
    file_uri_list =>'https://swiftobjectstorage.(region name).oraclecloud.com/v1/(tenant name)/(bucket name)/(file name)'
    format => json_object('ignoremissingcolumns' value 'true''removequotes' value 'true')
 );
end;
/
 
PL/SQL procedure successfully completed.


데이터 조회

1
2
3
4
5
6
7
8
9
10
11
SQL> select * from CHANNELS;
 
CHANNEL_ID CHANNEL_DESC     CHANNEL_CLASS         CHANNEL_CLASS_ID CHANNEL_TOTAL CHANNEL_TOTAL_ID
---------- -------------------- -------------------- ---------------- ------------- ----------------
     3 Direct Sales     Direct                   12 Channel total           1
     9 Tele Sales        Direct                   12 Channel total           1
     5 Catalog        Indirect               13 Channel total           1
     4 Internet        Indirect               13 Channel total           1
     2 Partners        Others                   14 Channel total           1
 
5 rows selected.


오브젝트 URL 복사 시 아래방법을 이용했었는데

Object Storage > Bucket Details > 만든버킷 > Objects > 해당 오브젝트 Detail > URL 복사

해당 주소에서 (region name)(tenant name)(bucket name)(file name) 만 빼서 아래 방법으로 사용해야함

https://swiftobjectstorage.(region name).oraclecloud.com/v1/(tenant name)/(bucket name)/(file name)



원인 : 오라클 자체 버그

메타링크 ora-00600 툴에서도 나오지 않는 에러라 sr을 올려 분석요청을 해야할 듯 함

19년01월14일 현재 ORA-00600 [ktfbns_update_ilmstat2] 관련 글은 하나 나옴 

적용해 봤지만 똑같이 에러발생함

http://pfierens.blogspot.com/2015/10/ora-00600-ktfbnsupdateilmstat2-during.html


190128 오라클에서 받은 답변으로 해결



참조 :