Oracle 字符集转换(6):5.3。 US7ASCII环境CSSCAN执行结果

检查US7ASCII环境CSSCAN执行结果。可以查看Schema创建、目录创建、csscan执行结果文件scan.txt、scan.out、scan.err内容、执行结果表备份内容。

这是上一篇文章的延续。

Oracle字符集转换(五):5.Oracle推荐实践

5.3. US7ASCII环境CSSCAN执行结果

5.3.1。创建架构

在 US7ASCII 实例上执行以下脚本来创建用于 csscan 执行的架构。

-- 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 用户(模式)和 csscan 执行所需的表等对象。此时,csmig 用户的默认表空间被指定为 system。
  • 第 5 行:将 csmig 用户的默认表空间更改为用户。可以换成users以外的其他有足够存储空间的表空间。

5.3.2.创建目录

创建一个目录来保存csscan执行结果,并移动到该目录下。

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

指定了两个参数。

  • full:指定Y扫描整个数据库
    • 作为参考,您可以使用用户参数指定扫描目标用户,也可以使用表或列参数详细指定扫描目标。
  • tochar:指定AL32UTF8,要转换的目标字符集(CHAR、VARCHAR2、CLOB、LONG类型扫描)
    • 作为参考,要扫描 NCHAR、NVARCHAR2 和 NCLOB 类型,需要指定 tonchar 参数。

5.3.4.查看csscan执行result-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)
-----------------------------------------------------------------------------------------

其中,“应用数据转换汇总”的内容不是Oracle系统数据,而是用户创建的、按类型扫描的数据。

[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类型更改为AL32UTF8时,2,580,031个值可以不改变地转换(Changeless),4,507个值被截断(Truncation),14,855个值丢失/损坏(Lossy)。
  • 当将 CLOB 类型更改为 AL32UTF8 时,可以不改变地转换 29,628 个值(Changeless),可以转换 8,291 个值(Convertible),以及 1 个值丢失/损坏(Lossy)
  • 其他 CHAR、LONG 和 VARRAY 类型的数据不进行转换。

上面对Changeless、Convertible、Truncation、Lossy的解释在上一篇已经写过了,下面再次标出。

Oracle 字符集转换 (5) – 5.2。如何使用 CSSCAN

地位描述
不变的数据在新字符集中保持不变
– 转换字符集时无数据变化
敞篷车数据可以成功转换为新的字符集
– 转换字符集时可以更改数据
截断如果发生转换,数据将被截断
– 转换字符集时数据被截断
有损如果发生转换,字符数据将丢失
– 转换字符集时数据丢失(损坏)

“按表分布可转换、截断和有损数据”和“按列分布可转换、截断和有损数据”是每个表和列的扫描结果。

以下是该文件的一些摘录。

[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时,没有值正常转换,4,507个值被截断,14,854个值丢失/损坏。各列如下
    • COMMT:更改为 AL32UTF8 时,正常没有转换任何值,有一个值被截断(truncation),有一个值丢失/损坏(Lossy)
    • LINE_NUM:更改为 AL32UTF8 时,正常不会转换任何值,有 3,238 个值被截断(truncation),7,426 个值丢失/损坏(Lossy)。
    • REF_DES:更改为 AL32UTF8 时,正常情况下不会转换任何值,并且有一个值丢失/损坏(Lossy)
    • SUB_STA_NM:更改为 AL32UTF8 时,正常不会转换任何值,1,268 个值被截断,7,426 个值丢失/损坏。
  • 当LEG.Z_TEST表更改为AL32UTF8时,没有值正常转换,没有值被截断,并且两个值丢失/损坏。 VAL 列与此相对应。

5.3.5.查看csscan执行结果-scan.out(扫描目标表信息)

在 scan.out 文件中,您可以检查要扫描的表列表。

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用户的SUB_MON_STAT表。

5.3.6.查看csscan执行结果-scan.err(错误详情)

在scan.err文件中可以看到各个表和列的字符集转换错误的详细信息。

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仓库中找到。

5.3.7. CSSCAN执行结果表备份

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用户名TABLE_NAMECOLUMN_NAME数列NULCNT碳纳米管CNV类型错误西泽尔CNVERR最大尺寸克里斯西斯
120140507Z_测试2000202120
220140507SUB_MON_STATLINE_NUM 行7426000742632387426380
320140507SUB_MON_STATSUB_STA_NM7426000742612687426540
420140507SUB_MON_STAT通讯742674250011190000
520140507SUB_MON_STATREF_DES742674250010130000

到目前为止,我们已经查看了 US7ASCII 环境中 CSSCAN 执行的结果。接下来我们看看在KO16MSWIN949测试环境下运行CSSCAN的结果。

发表回复

您的电子邮箱地址不会被公开。 必填项已用*标注

zh_CN简体中文