기술 정보
home
채널 소개
home

타 DBMS 테이블, 컬럼 코멘트 추출 방법

문서 유형
장애 해결
분야
마이그레이션
키워드
column migration
table migration
적용 제품 버전
6FS06
6FS07
7FS02
1 more property

현상

타 DBMS(Oracle)에서 Tibero로 이관시, comment 올바르게 표시되지 않는 경우가 있습니다.

원인

데이터 이관 시 한글 문제로 코멘트가 정상적으로 기재되지 않을 수 있습니다.

해결

아래 쿼리를 사용하여 타 DBMS(Oracle)에서 코멘트를 추출, Tibero로 재 이관합니다.

table comment

select 'COMMENT on TABLE '||owner||'.'||table_name||' IS '''||comments||''';' from dba_tab_comments where owner='**SYSCAT**' <= 이관대상 유저명으로 변경 and comments is not null;
SQL
복사

column comment

select 'COMMENT on COLUMN '||owner||'.'||table_name||'.'||column_name||' IS '''||comments||''';' from dba_col_comments where owner='SYSCAT' and comments is not null;
SQL
복사