Oracle Character Set 변환(6): 5.3. US7ASCII 환경 CSSCAN 실행 결과
US7ASCII 환경 CSSCAN 실행 결과 를 살펴본다. schema 생성, directory 생성, csscan 실행 결과 파일 scan.txt, scan.out, scan.err 내용, 실행 결과 Table 백업에 대한 내용을 확인할 수 있다.
이전 글에서 이어지는 내용이다.
Oracle Character Set 변환(5): 5. Oracle 권장 방법
5.3. US7ASCII 환경 CSSCAN 실행 결과
5.3.1. schema 생성
US7ASCII instance에 아래 스크립트를 실행하여 csscan 실행을 위한 schema를 생성한다.
-- US7ASCII sqlplus sys/________@oraus7 as sysdba @%ORACLE_HOME%\rdbms\admin\csminst.sql sqlplus sys/________@oraus7 as sysdba ALTER USER CSMIG DEFAULT TABLESPACE USERS; EXIT
- 3행: csminst.sql을 실행하여 csmig user(schema)와 csscan 실행에 필요한 테이블등의 객체를 생성한다. 이때 csmig user의 기본 tablespace는 system으로 지정된다.
- 5행: csmig user의 기본 tablespace를 users로 변경한다. users가 아닌 저장공간이 충분한 다른 tablespace로 변경해도 된다.
5.3.2. directory 생성
csscan 실행결과를 저장할 directory를 생성하고, 해당 directory로 이동한다.
mkdir D:\Temp\csscan\US7ASCII cd D:\Temp\csscan\US7ASCII
5.3.3. csscan 실행
Windows 명령 프롬프트에서 다음 명령어로 csscan을 실행한다.
csscan \"sys/________@oraus7 as sysdba\" full=y tochar=AL32UTF8
parameter는 두 개를 지정하였다.
- full: 데이터베이스 전체를 대상으로 scan하도록 Y 지정
- 참고로, user parameter로 scan 대상 user를 지정하거나 table, column parameter로 scan 대상을 상세하게 지정할 수 있음
- tochar: 변환할 목표 character set인 AL32UTF8 지정 (CHAR, VARCHAR2, CLOB, LONG type scan)
- 참고로, NCHAR, NVARCHAR2, NCLOB type을 scan하려면 tonchar parameter 지정 필요함
5.3.4. csscan 실행결과 확인-scan.txt(결과 요약 보고서)
US7ASCII 테스트 환경에서 scan.txt의 전체 내용은 다음과 같다.
Database Scan Summary Report Time Started : 2014-05-07 19:41:34 Time Completed: 2014-05-07 19:42:28 Process ID Time Started Time Completed ---------- -------------------- -------------------- 1 2014-05-07 19:41:48 2014-05-07 19:42:27 ---------- -------------------- -------------------- [Database Size] Tablespace Used Free Total Expansion ------------------------- --------------- --------------- --------------- --------------- SYSTEM 577.81M 122.19M 700.00M 2.25M SYSAUX 354.56M 245.44M 600.00M 13.09M UNDOTBS1 14.75M 455.25M 470.00M .00K TEMP .00K .00K .00K .00K USERS 1.81M 3.19M 5.00M 158.00K ------------------------- --------------- --------------- --------------- --------------- Total 948.94M 826.06M 1,775.00M 15.49M The size of the largest CLOB is 1625114 bytes [Database Scan Parameters] Parameter Value ------------------------------ ------------------------------------------------ CSSCAN Version v2.1 Instance Name oraus7 Database Version 11.2.0.1.0 Scan type Full database Scan CHAR data? YES Database character set US7ASCII FROMCHAR US7ASCII TOCHAR AL32UTF8 Scan NCHAR data? NO Array fetch buffer size 1024000 Number of processes 1 Capture convertible data? NO ------------------------------ ------------------------------------------------ [Scan Summary] Some character type data in the data dictionary are not convertible to the new character set Some character type application data are not convertible to the new character set [Data Dictionary Conversion Summary] Data Dictionary Tables: Datatype Changeless Convertible Truncation Lossy --------------------- ---------------- ---------------- ---------------- ---------------- VARCHAR2 2,686,869 0 0 11 CHAR 2,834 0 0 0 LONG 189,691 0 0 0 CLOB 45,948 2,244 0 32 VARRAY 39,205 0 0 0 --------------------- ---------------- ---------------- ---------------- ---------------- Total 2,964,547 2,244 0 43 Total in percentage 99.923% 0.076% 0.000% 0.001% The data dictionary can not be safely migrated using the CSALTER script XML CSX Dictionary Tables: Datatype Changeless Convertible Truncation Lossy --------------------- ---------------- ---------------- ---------------- ---------------- VARCHAR2 493 0 0 0 CHAR 0 0 0 0 LONG 0 0 0 0 CLOB 0 0 0 0 VARRAY 0 0 0 0 --------------------- ---------------- ---------------- ---------------- ---------------- Total 493 0 0 0 Total in percentage 100.000% 0.000% 0.000% 0.000% [Application Data Conversion Summary] Datatype Changeless Convertible Truncation Lossy --------------------- ---------------- ---------------- ---------------- ---------------- VARCHAR2 2,580,031 0 4,507 14,855 CHAR 0 0 0 0 LONG 0 0 0 0 CLOB 29,628 8,291 0 1 VARRAY 0 0 0 0 --------------------- ---------------- ---------------- ---------------- ---------------- Total 2,609,659 8,291 4,507 14,856 Total in percentage 99.121% 0.315% 0.171% 0.564% [Distribution of Convertible, Truncated and Lossy Data by Table] Data Dictionary Tables: USER.TABLE Convertible Truncation Lossy -------------------------------------------------- ---------------- ---------------- ---------------- MDSYS.SDO_COORD_OP_PARAM_VALS 200 0 0 MDSYS.SDO_STYLES_TABLE 78 0 0 MDSYS.SDO_XML_SCHEMAS 3 0 0 ORDDATA.ORDDCM_CT_PRED_OPRD 51 0 0 ORDDATA.ORDDCM_DOCS 9 0 0 ORDDATA.ORDDCM_MAPPING_DOCS 1 0 0 SYS.COM$ 0 0 11 SYS.METASTYLESHEET 178 0 0 SYS.RULE$ 1 0 0 SYS.SCHEDULER$_EVENT_LOG 38 0 0 SYS.WRH$_SQLTEXT 712 0 32 SYS.WRH$_SQL_PLAN 716 0 0 SYS.WRI$_ADV_DIRECTIVE_META 5 0 0 SYS.WRI$_ADV_OBJECTS 5 0 0 SYS.WRI$_DBU_FEATURE_METADATA 188 0 0 SYS.WRI$_DBU_FEATURE_USAGE 10 0 0 SYS.WRI$_DBU_HWM_METADATA 20 0 0 SYS.WRI$_REPT_FILES 27 0 0 XDB.XDB$DXPTAB 2 0 0 -------------------------------------------------- ---------------- ---------------- ---------------- XML CSX Dictionary Tables: USER.TABLE Convertible Truncation Lossy -------------------------------------------------- ---------------- ---------------- ---------------- -------------------------------------------------- ---------------- ---------------- ---------------- Application Data: USER.TABLE Convertible Truncation Lossy -------------------------------------------------- ---------------- ---------------- ---------------- APEX_030200.WWV_FLOW_BANNER 10 0 0 APEX_030200.WWV_FLOW_BUTTON_TEMPLATES 12 0 0 APEX_030200.WWV_FLOW_CUSTOM_AUTH_SETUPS 19 0 0 APEX_030200.WWV_FLOW_FLASH_CHART_SERIES 5 0 0 APEX_030200.WWV_FLOW_LIST_TEMPLATES 298 0 0 APEX_030200.WWV_FLOW_PAGE_GENERIC_ATTR 44 0 0 APEX_030200.WWV_FLOW_PAGE_PLUGS 3,241 0 0 APEX_030200.WWV_FLOW_PAGE_PLUG_TEMPLATES 254 0 0 APEX_030200.WWV_FLOW_PROCESSING 45 0 0 APEX_030200.WWV_FLOW_ROW_TEMPLATES 66 0 0 APEX_030200.WWV_FLOW_SHORTCUTS 39 0 0 APEX_030200.WWV_FLOW_STEPS 1,797 0 0 APEX_030200.WWV_FLOW_STEP_PROCESSING 2,239 0 0 APEX_030200.WWV_FLOW_TEMPLATES 192 0 0 APEX_030200.WWV_FLOW_WORKSHEETS 30 0 0 LEG.SUB_MON_STAT 0 4,507 14,854 LEG.Z_TEST 0 0 2 -------------------------------------------------- ---------------- ---------------- ---------------- [Distribution of Convertible, Truncated and Lossy Data by Column] Data Dictionary Tables: USER.TABLE|COLUMN Convertible Truncation Lossy -------------------------------------------------- ---------------- ---------------- ---------------- MDSYS.SDO_COORD_OP_PARAM_VALS|PARAM_VALUE_FILE 200 0 0 MDSYS.SDO_STYLES_TABLE|DEFINITION 78 0 0 MDSYS.SDO_XML_SCHEMAS|XMLSCHEMA 3 0 0 ORDDATA.ORDDCM_CT_PRED_OPRD|SYS_NC00004$ 51 0 0 ORDDATA.ORDDCM_DOCS|SYS_NC00005$ 9 0 0 ORDDATA.ORDDCM_MAPPING_DOCS|SYS_NC00007$ 1 0 0 SYS.COM$|COMMENT$ 0 0 11 SYS.METASTYLESHEET|STYLESHEET 178 0 0 SYS.RULE$|CONDITION 1 0 0 SYS.SCHEDULER$_EVENT_LOG|ADDITIONAL_INFO 38 0 0 SYS.WRH$_SQLTEXT|SQL_TEXT 712 0 32 SYS.WRH$_SQL_PLAN|OTHER_XML 716 0 0 SYS.WRI$_ADV_DIRECTIVE_META|DATA 5 0 0 SYS.WRI$_ADV_OBJECTS|ATTR4 5 0 0 SYS.WRI$_DBU_FEATURE_METADATA|INST_CHK_LOGIC 21 0 0 SYS.WRI$_DBU_FEATURE_METADATA|USG_DET_LOGIC 167 0 0 SYS.WRI$_DBU_FEATURE_USAGE|FEATURE_INFO 10 0 0 SYS.WRI$_DBU_HWM_METADATA|LOGIC 20 0 0 SYS.WRI$_REPT_FILES|SYS_NC00005$ 27 0 0 XDB.XDB$DXPTAB|SYS_NC00006$ 2 0 0 -------------------------------------------------- ---------------- ---------------- ---------------- XML CSX Dictionary Tables: USER.TABLE|COLUMN Convertible Truncation Lossy -------------------------------------------------- ---------------- ---------------- ---------------- -------------------------------------------------- ---------------- ---------------- ---------------- Application Data: USER.TABLE|COLUMN Convertible Truncation Lossy -------------------------------------------------- ---------------- ---------------- ---------------- APEX_030200.WWV_FLOW_BANNER|BANNER 10 0 0 APEX_030200.WWV_FLOW_BUTTON_TEMPLATES|TEMPLATE 12 0 0 APEX_030200.WWV_FLOW_CUSTOM_AUTH_SETUPS|AUTH_FUNC 8 0 0 APEX_030200.WWV_FLOW_CUSTOM_AUTH_SETUPS|PAGE_SENT 10 0 0 APEX_030200.WWV_FLOW_CUSTOM_AUTH_SETUPS|POST_AUTH 1 0 0 APEX_030200.WWV_FLOW_FLASH_CHART_SERIES|SERIES_QU 5 0 0 APEX_030200.WWV_FLOW_LIST_TEMPLATES|ITEM_TEMPLATE 20 0 0 APEX_030200.WWV_FLOW_LIST_TEMPLATES|ITEM_TEMPLATE 20 0 0 APEX_030200.WWV_FLOW_LIST_TEMPLATES|LIST_TEMPLATE 105 0 0 APEX_030200.WWV_FLOW_LIST_TEMPLATES|LIST_TEMPLATE 105 0 0 APEX_030200.WWV_FLOW_LIST_TEMPLATES|SUB_LIST_ITEM 12 0 0 APEX_030200.WWV_FLOW_LIST_TEMPLATES|SUB_LIST_ITEM 12 0 0 APEX_030200.WWV_FLOW_LIST_TEMPLATES|SUB_TEMPLATE_ 12 0 0 APEX_030200.WWV_FLOW_LIST_TEMPLATES|SUB_TEMPLATE_ 12 0 0 APEX_030200.WWV_FLOW_PAGE_GENERIC_ATTR|ATTRIBUTE_ 44 0 0 APEX_030200.WWV_FLOW_PAGE_PLUGS|PLUG_SOURCE 3,241 0 0 APEX_030200.WWV_FLOW_PAGE_PLUG_TEMPLATES|TEMPLATE 166 0 0 APEX_030200.WWV_FLOW_PAGE_PLUG_TEMPLATES|TEMPLATE 88 0 0 APEX_030200.WWV_FLOW_PROCESSING|PROCESS_SQL_CLOB 45 0 0 APEX_030200.WWV_FLOW_ROW_TEMPLATES|ROW_TEMPLATE1 54 0 0 APEX_030200.WWV_FLOW_ROW_TEMPLATES|ROW_TEMPLATE2 10 0 0 APEX_030200.WWV_FLOW_ROW_TEMPLATES|ROW_TEMPLATE3 2 0 0 APEX_030200.WWV_FLOW_SHORTCUTS|SHORTCUT 39 0 0 APEX_030200.WWV_FLOW_STEPS|HELP_TEXT 1,514 0 0 APEX_030200.WWV_FLOW_STEPS|HTML_PAGE_HEADER 283 0 0 APEX_030200.WWV_FLOW_STEP_PROCESSING|PROCESS_SQL_ 2,239 0 0 APEX_030200.WWV_FLOW_TEMPLATES|BOX 64 0 0 APEX_030200.WWV_FLOW_TEMPLATES|FOOTER_TEMPLATE 64 0 0 APEX_030200.WWV_FLOW_TEMPLATES|HEADER_TEMPLATE 64 0 0 APEX_030200.WWV_FLOW_WORKSHEETS|SQL_QUERY 30 0 0 LEG.SUB_MON_STAT|COMMT 0 1 1 LEG.SUB_MON_STAT|LINE_NUM 0 3,238 7,426 LEG.SUB_MON_STAT|REF_DES 0 0 1 LEG.SUB_MON_STAT|SUB_STA_NM 0 1,268 7,426 LEG.Z_TEST|VAL 0 0 2 -------------------------------------------------- ---------------- ---------------- ---------------- [Indexes to be Rebuilt] USER.INDEX on USER.TABLE(COLUMN) ----------------------------------------------------------------------------------------- APEX_030200.WWV_FLOW_WORKSHEETS_UNQ_IDX on APEX_030200.WWV_FLOW_WORKSHEETS(SYS_NC00078$) APEX_030200.WWV_FLOW_WORKSHEETS_UNQ_IDX on APEX_030200.WWV_FLOW_WORKSHEETS(SYS_NC00079$) APEX_030200.WWV_FLOW_WORKSHEETS_UNQ_IDX on APEX_030200.WWV_FLOW_WORKSHEETS(SYS_NC00080$) APEX_030200.WWV_FLOW_WORKSHEETS_UNQ_IDX on APEX_030200.WWV_FLOW_WORKSHEETS(SYS_NC00081$) APEX_030200.WWV_FLOW_WS_UNQ_ALIAS_IDX on APEX_030200.WWV_FLOW_WORKSHEETS(SYS_NC00082$) APEX_030200.WWV_FLOW_WS_UNQ_ALIAS_IDX on APEX_030200.WWV_FLOW_WORKSHEETS(ALIAS) -----------------------------------------------------------------------------------------
이 중에서 “Application Data Conversion Summary” 내용이 Oracle System Data가 아닌 사용자가 생성한 Data에 type별로 scan한 내용이다.
[Application Data Conversion Summary] Datatype Changeless Convertible Truncation Lossy --------------------- ---------------- ---------------- ---------------- ---------------- VARCHAR2 2,580,031 0 4,507 14,855 CHAR 0 0 0 0 LONG 0 0 0 0 CLOB 29,628 8,291 0 1 VARRAY 0 0 0 0 --------------------- ---------------- ---------------- ---------------- ---------------- Total 2,609,659 8,291 4,507 14,856 Total in percentage 99.121% 0.315% 0.171% 0.564%
위 내용을 해석하면 다음과 같다.
- VARCHAR2 type에 대해서 AL32UTF8로 변경 시 2,580,031개의 value는 변경 없이(Changeless) 그대로 전환될 수 있고, 4,507 개의 value가 잘려(Truncation)지며, 14,855개의 value는 손실/깨짐(Lossy)이 발생함
- CLOB type에 대해서 AL32UTF8로 변경 시, 29,628개의 value는 변경 없이(Changeless) 그대로 전환될 수 있고, 8,291개의 value는 변환가능(Convertible)하며, 1개의 value는 손실/깨짐(Lossy)이 발생함
- 그외 CHAR, LONG, VARRAY type의 데이터는 변환 대상이 없음
위 내용에서 Changeless, Convertible, Truncation, Lossy에 대한 설명은 이전 글에 작성해 두었고, 아래에 한번 더 표기해 둔다.
Oracle Character Set 변환(5) – 5.2. CSSCAN 사용 방법
Status | Description |
Changeless | Data remains the same in the new character set – character set 변환시 데이터 변경없음 |
Convertible | Data can be successfully converted to the new character set – character set 변환시 데이터 변경 가능함 |
Truncation | Data will be truncated if conversion takes place – character set 변환시 데이터 잘림 |
Lossy | Character data will be lost if conversion takes place – character set 변환시 데이터 손실됨(깨짐) |
“Distribution of Convertible, Truncated and Lossy Data by Table”, “Distribution of Convertible, Truncated and Lossy Data by Column” 내용은 각 테이블과 컬럼별로 scan한 결과이다.
아래에 파일의 일부 내용을 발췌해 둔다.
[Distribution of Convertible, Truncated and Lossy Data by Table] ... Application Data: USER.TABLE Convertible Truncation Lossy -------------------------------------------------- ---------------- ---------------- ---------------- ... LEG.SUB_MON_STAT 0 4,507 14,854 LEG.Z_TEST 0 0 2 -------------------------------------------------- ---------------- ---------------- ---------------- [Distribution of Convertible, Truncated and Lossy Data by Column] ... Application Data: USER.TABLE|COLUMN Convertible Truncation Lossy -------------------------------------------------- ---------------- ---------------- ---------------- ... LEG.SUB_MON_STAT|COMMT 0 1 1 LEG.SUB_MON_STAT|LINE_NUM 0 3,238 7,426 LEG.SUB_MON_STAT|REF_DES 0 0 1 LEG.SUB_MON_STAT|SUB_STA_NM 0 1,268 7,426 LEG.Z_TEST|VAL 0 0 2 -------------------------------------------------- ---------------- ---------------- ----------------
위 내용을 해석하면 다음과 같다.
- LEG.SUB_MON_STAT 테이블은 AL32UTF8로 변경 시, 정상적으로 변환되는 value는 없고, 4,507개의 value가 잘려(Truncation)지며, 14,854개의 value는 손실/깨짐(Lossy)이 발생함. 각 컬럼별로 다음과 같음
- COMMT: AL32UTF8로 변경 시, 정상적으로 변환되는 value는 없고, 1개의 value가 잘려(Truncation)지며, 1개의 value는 손실/깨짐(Lossy)이 발생함
- LINE_NUM: AL32UTF8로 변경 시, 정상적으로 변환되는 value는 없고, 3,238개의 value가 잘려(Truncation)지며, 7,426개의 value는 손실/깨짐(Lossy)이 발생함
- REF_DES: AL32UTF8로 변경 시, 정상적으로 변환되는 value는 없고, 1개의 value는 손실/깨짐(Lossy)이 발생함
- SUB_STA_NM: AL32UTF8로 변경 시, 정상적으로 변환되는 value는 없고, 1,268개의 value가 잘려(Truncation)지며, 7,426개의 value는 손실/깨짐(Lossy)이 발생함
- LEG.Z_TEST 테이블은 AL32UTF8로 변경 시, 정상적으로 변환되는 value는 없고, 잘려(Truncation)지는 value도 없으며, 2개의 value는 손실/깨짐(Lossy)이 발생함. VAL 컬럼이 이에 해당함.
5.3.5. csscan 실행결과 확인-scan.out(scan 대상 테이블 정보)
scan.out 파일에서는 scan 대상 테이블 목록을 확인할 수 있다.
Character Set Scanner v2.2 : Release 11.2.0.1.0 - Production on Wed May 7 19:41:28 2014 Copyright (c) 1982, 2009, Oracle and/or its affiliates. All rights reserved. Connected to: Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - Production With the Partitioning, OLAP, Data Mining and Real Application Testing options Enter array fetch buffer size: 1024000 > Enter number of scan processes to utilize(1..64): 1 > Enumerating tables to scan... . process 1 scanning SYS.SOURCE$[AAAADfAABAAAAXYAAA] . process 1 scanning SYS.TYPE$[AAAAH3AABAAAAzgAAA] . process 1 scanning SYS.ATTRIBUTE$[AAAAH3AABAAAAzgAAA] . process 1 scanning SYS.PARAMETER$[AAAAH3AABAAAAzgAAA] ... . process 1 scanning MDSYS.SDO_CS_SRS[AAAPR3AACAAAEvwAAA] . process 1 scanning SYS.HISTGRM$[AAAAGkAABAAAAoAAAA] . process 1 scanning XDB.XDBACL_PATH_TAB[AAAN7uAACAAAED4AAA] ORA-30967: operation directly on the Path Table is disallowed CSS-00144: failed to scan table XDB.XDBACL_PATH_TAB ... . process 1 scanning XDB.XDB$RESOURCE[AAANy9AACAAADj4AAA] . process 1 scanning APEX_030200.WWV_FLOW_STEP_ITEMS[AAAPrtAACAAAGBgAAA] . process 1 scanning SYS.VIEW$[AAAABFAABAAAAJwAAA] ... . process 1 scanning LEG.SUB_MON_STAT[AAAQZLAAEAAAACIAAA] ... Creating Database Scan Summary Report... Creating Individual Exception Report... Scanner terminated successfully.
여기에서는 다음 내용을 확인할 수 있다.
- 31행: 테스트 환경에 생성해 놓은 LEG user의 SUB_MON_STAT 테이블을 scan함
5.3.6. csscan 실행결과 확인-scan.err(오류 상세 내역)
scan.err 파일에서는 각 테이블, 컬럼의 character set 변환 오류 내역을 상세하게 살펴볼 수 있다.
Database Scan Individual Exception Report [Database Scan Parameters] Parameter Value ------------------------------ ------------------------------------------------ CSSCAN Version v2.1 Instance Name oraus7 Database Version 11.2.0.1.0 Scan type Full database Scan CHAR data? YES Database character set US7ASCII FROMCHAR US7ASCII TOCHAR AL32UTF8 Scan NCHAR data? NO Array fetch buffer size 1024000 Number of processes 1 Capture convertible data? NO ------------------------------ ------------------------------------------------ [Data Dictionary individual exceptions] User : SYS Table : COM$ Column: COMMENT$ Type : VARCHAR2(4000) Number of Exceptions : 11 Max Post Conversion Data Size: 381 ROWID Exception Type Size Cell Data(first 30 bytes) ------------------ ------------------ ----- ------------------------------ AAAACIAABAAAQTfABN lossy conversion 사용월 AAAACIAABAAAQTfABO lossy conversion 호선명 AAAACIAABAAAQTfABP lossy conversion 지하철역코드 AAAACIAABAAAQTfABQ lossy conversion 지하철역명 AAAACIAABAAAQTfABR lossy conversion 승차인원수 AAAACIAABAAAQTfABS lossy conversion 하차인원수 AAAACIAABAAAQTfABT lossy conversion 작업일자 AAAACIAABAAAQTfABU lossy conversion 비고 AAAACIAABAAAQTfABV lossy conversion 참조설명 AAAACIAABAAAQTfABW lossy conversion 참조이미지 AAAACIAABAAAQTfABX lossy conversion 지하철역별승하차인원 ------------------ ------------------ ----- ------------------------------ [Application data individual exceptions] User : LEG Table : SUB_MON_STAT Column: SUB_STA_NM Type : VARCHAR2(20) Number of Exceptions : 7426 Max Post Conversion Data Size: 54 ROWID Exception Type Size Cell Data(first 30 bytes) ------------------ ------------------ ----- ------------------------------ AAAQZLAAEAAAAC+AA+ lossy conversion 용문 AAAQZLAAEAAAAC+AA/ lossy conversion 서울역 AAAQZLAAEAAAAC+AA0 lossy conversion 도심 AAAQZLAAEAAAAC+AA1 lossy conversion 팔당 AAAQZLAAEAAAAC+AAH lossy conversion 월곶 AAAQZLAAEAAAAC+AAI lossy conversion 소래포구 AAAQZLAAEAAAAC+AAI exceed column size 24 소래포구 AAAQZLAAEAAAAC+AAJ lossy conversion 인천논현 AAAQZLAAEAAAAC+AAJ exceed column size 24 인천논현 ... ------------------ ------------------ ----- ------------------------------ User : LEG Table : SUB_MON_STAT Column: COMMT Type : VARCHAR2(4000) Number of Exceptions : 1 Max Post Conversion Data Size: 9000 ROWID Exception Type Size Cell Data(first 30 bytes) ------------------ ------------------ ----- ------------------------------ AAAQZLAAEAAAACOAAA lossy conversion 서울역서울역서울역서울역서울역 AAAQZLAAEAAAACOAAA exceed column size 9000 서울역서울역서울역서울역서울역 ------------------ ------------------ ----- ------------------------------ User : LEG Table : SUB_MON_STAT Column: LINE_NUM Type : VARCHAR2(14) Number of Exceptions : 7426 Max Post Conversion Data Size: 38 ROWID Exception Type Size Cell Data(first 30 bytes) ------------------ ------------------ ----- ------------------------------ AAAQZLAAEAAAAC+AA+ exceed column size 18 중앙선 AAAQZLAAEAAAAC+AA+ lossy conversion 중앙선 AAAQZLAAEAAAAC+AA/ lossy conversion 1호선 AAAQZLAAEAAAAC+AA0 exceed column size 18 중앙선 AAAQZLAAEAAAAC+AA0 lossy conversion 중앙선 AAAQZLAAEAAAAC+AA1 exceed column size 18 중앙선 ... ------------------ ------------------ ----- ------------------------------ User : LEG Table : SUB_MON_STAT Column: REF_DES Type : CLOB Number of Exceptions : 1 Max Post Conversion Data Size: 3000 ROWID Exception Type Size Cell Data(first 30 bytes) ------------------ ------------------ ----- ------------------------------ AAAQZLAAEAAAACOAAA lossy conversion 서울역서울역서울역서울역서울역 ------------------ ------------------ ----- ------------------------------
US7ASCII 환경에서의 CSSCAN 실행결과 파일은 아래 github repository에서 확인할 수 있다.
- scan.txt: Oracle-CharacterSet-Conversion/scan.txt at main · DAToolset/Oracle-CharacterSet-Conversion (github.com)
- scan.out: Oracle-CharacterSet-Conversion/scan.out at main · DAToolset/Oracle-CharacterSet-Conversion (github.com)
- scan.err: Oracle-CharacterSet-Conversion/scan.err at main · DAToolset/Oracle-CharacterSet-Conversion (github.com)
5.3.7. CSSCAN 실행 결과 Table 백업
CREATE TABLE Z_CSSCAN_COL_SUMMARY AS SELECT '20140507' BASE_DT, U.USERNAME, TC.TABLE_NAME, TC.COLUMN_NAME ,CC.NUMROWS, CC.NULCNT, CC.CNVCNT, CC.CNVTYPE, CC.ERRCNT, CC.SIZERR, CC.CNVERR, CC.MAXSIZ, CC.CHRSIZ FROM CSMIG.CSM$COLUMNS CC INNER JOIN DBA_USERS U ON (CC.USR# = U.USER_ID) INNER JOIN DBA_OBJECTS O ON (CC.OBJ# = O.OBJECT_ID) INNER JOIN DBA_TAB_COLUMNS TC ON (CC.COL# = TC.COLUMN_ID AND O.OBJECT_NAME = TC.TABLE_NAME) WHERE 1=1 AND U.USERNAME = 'LEG' AND O.OBJECT_TYPE = 'TABLE' AND CC.ERRCNT <> 0;
위 DDL 실행결과로 생성되는 데이터의 예시는 다음과 같다.
Row# | BASE_DT | USERNAME | TABLE_NAME | COLUMN_NAME | NUMROWS | NULCNT | CNVCNT | CNVTYPE | ERRCNT | SIZERR | CNVERR | MAXSIZ | CHRSIZ |
1 | 20140507 | LEG | Z_TEST | VAL | 2 | 0 | 0 | 0 | 2 | 0 | 2 | 12 | 0 |
2 | 20140507 | LEG | SUB_MON_STAT | LINE_NUM | 7426 | 0 | 0 | 0 | 7426 | 3238 | 7426 | 38 | 0 |
3 | 20140507 | LEG | SUB_MON_STAT | SUB_STA_NM | 7426 | 0 | 0 | 0 | 7426 | 1268 | 7426 | 54 | 0 |
4 | 20140507 | LEG | SUB_MON_STAT | COMMT | 7426 | 7425 | 0 | 0 | 1 | 1 | 1 | 9000 | 0 |
5 | 20140507 | LEG | SUB_MON_STAT | REF_DES | 7426 | 7425 | 0 | 0 | 1 | 0 | 1 | 3000 | 0 |
여기까지 US7ASCII 환경 CSSCAN 실행 결과 에 대해 살펴보았다. 다음에는 KO16MSWIN949 테스트 환경에서 CSSCAN을 실행한 결과에 대해 살펴보겠다.