{"id":71,"date":"2011-09-04T23:53:14","date_gmt":"2011-09-04T15:53:14","guid":{"rendered":"https:\/\/yangtingkun.net\/?p=71"},"modified":"2011-09-19T22:03:36","modified_gmt":"2011-09-19T14:03:36","slug":"oracle%e5%b7%a5%e5%85%b7%e2%80%94%e2%80%94csscan","status":"publish","type":"post","link":"https:\/\/yangtingkun.net\/?p=71","title":{"rendered":"Oracle\u5de5\u5177\u2014\u2014csscan"},"content":{"rendered":"<p>\u5de5\u5177csscan\u7528\u4e8e\u68c0\u67e5\u4ece\u4e00\u4e2a\u5b57\u7b26\u96c6\u8f6c\u6362\u5230\u53e6\u4e00\u4e2a\u5b57\u7b26\u96c6\uff0c\u6570\u636e\u5e93\u4e2d\u7684\u6570\u636e\u662f\u5426\u4f1a\u4ea7\u751f\u4e22\u5931\u3001\u622a\u65ad\u7b49\u73b0\u8c61\u3002<br \/>\n\u8fd9\u4e2a\u5de5\u5177\u5f88\u65e9\u5c31\u51fa\u73b0\u4e86\uff0c\u4e0d\u8fc7\u7531\u4e8e\u957f\u4e45\u4ee5\u6765\u7275\u5236\u5230\u5b57\u7b26\u96c6\u8f6c\u6362\u7684\u5de5\u4f5c\u4e0d\u662f\u5f88\u591a\uff0c\u56e0\u6b64\u5bf9\u4e8e\u8fd9\u4e2a\u5de5\u5177\u6ca1\u4ec0\u4e48\u7814\u7a76\uff0c\u8fd9\u6b21\u9700\u8981\u5c06ZHS16GBK\u8f6c\u6362\u5230AL32UTF8\uff0c\u5c1d\u8bd5\u4e86\u4e00\u4e0bcsscan\u7684\u529f\u80fd\uff0c\u53d1\u73b0\u8fd9\u4e2a\u5de5\u5177\u8fd8\u662f\u5f88\u65b9\u4fbf\u7684\u3002<\/p>\n<pre lang='SQL'>[oracle@dbserver1 bin]$ csscan userid=thams\/thams table=libfile722 tochar=AL32UTF8 log=\/home\/oracle\/scan_722\r\nCharacter Set Scanner v2.2 : Release 11.2.0.2.0 - Production on Wed Aug 31 10:54:15 2011\r\nCopyright (c) 1982, 2009, Oracle and\/or its affiliates.  All rights reserved.\r\nCSS-00127: user thams does not have DBA privilege\r\nScanner terminated unsuccessfully.<\/pre>\n<p>\u9519\u8bef\u4fe1\u606f\u5f88\u660e\u663e\uff0c\u8fde\u63a5\u7528\u6237\u4e0d\u662fDBA\u89d2\u8272\uff0c\u5982\u679c\u7528system\u7528\u6237\u8fde\u63a5\u8fdb\u884c\u8fd9\u4e2a\u547d\u4ee4\uff1a<\/p>\n<pre lang='SQL'>[oracle@dbserver1 bin]$ csscan userid=system\/oracle table=thams.libfile722 tochar=AL32UTF8 log=\/home\/oracle\/scan_722\r\nCharacter Set Scanner v2.2 : Release 11.2.0.2.0 - Production on Wed Aug 31 10:54:45 2011\r\nCopyright (c) 1982, 2009, Oracle and\/or its affiliates. All rights reserved.\r\nConnected to:\r\nOracle Database 11g Enterprise Edition Release 11.2.0.2.0 - 64bit Production\r\nWith the Partitioning, Automatic Storage Management, OLAP, Data Mining\r\nand Real Application Testing options\r\nCSS-00107: Character set migration utility schema not installed\r\nScanner terminated unsuccessfully.<\/pre>\n<p>\u5bfc\u81f4\u8fd9\u4e2a\u9519\u8bef\u662f\u7531\u4e8eCSSCAN\u5de5\u5177\u9700\u8981\u5728\u6570\u636e\u5e93\u4e2d\u5efa\u7acb\u4e00\u4e2aCSMIG\u7528\u6237\uff1a<\/p>\n<pre lang='SQL'>[oracle@dbserver1 bin]$ sqlplus \/ as sysdba\r\nSQL*Plus: Release 11.2.0.2.0 Production on Wed Aug 31 10:57:28 2011\r\nCopyright (c) 1982, 2010, Oracle.  All rights reserved.\r\nConnected to:\r\nOracle Database 11g Enterprise Edition Release 11.2.0.2.0 - 64bit Production\r\nWith the Partitioning, Automatic Storage Management, OLAP, Data Mining\r\nand Real Application Testing options\r\nSQL> @?\/rdbms\/admin\/csminst\r\nUser created.\r\nGrant succeeded.\r\nGrant succeeded.\r\nGrant succeeded.\r\nGrant succeeded.\r\nGrant succeeded.\r\nGrant succeeded.\r\nGrant succeeded.\r\nUser altered.\r\n1 row created.\r\n1 row updated.\r\nTable created.\r\n.\r\n.\r\n.\r\nView created.\r\nView created.\r\nView created.\r\nView created.\r\nGrant succeeded.\r\nGrant succeeded.\r\nDisconnected from Oracle Database 11g Enterprise Edition Release 11.2.0.2.0 - 64bit Production\r\nWith the Partitioning, Automatic Storage Management, OLAP, Data Mining\r\nand Real Application Testing options\r\n[oracle@dbserver1 bin]$ csscan userid=system\/oracle table=thams.libfile722 tochar=AL32UTF8 log=\/home\/oracle\/scan_722\r\nCharacter Set Scanner v2.2 : Release 11.2.0.2.0 - Production on Wed Aug 31 10:59:35 2011\r\nCopyright (c) 1982, 2009, Oracle and\/or its affiliates.  All rights reserved.\r\nConnected to:\r\nOracle Database 11g Enterprise Edition Release 11.2.0.2.0 - 64bit Production\r\nWith the Partitioning, Automatic Storage Management, OLAP, Data Mining\r\nand Real Application Testing options\r\nEnter array fetch buffer size: 1024000 > 4096000\r\nEnter number of scan processes to utilize(1..64): 1 > \r\nEnumerating table to scan...\r\n. process 1 scanning THAMS.LIBFILE722[AAAP2KAAAAAB7XYAAA]\r\nCreating Database Scan Summary Report...\r\nCreating Individual Exception Report...\r\nScanner terminated successfully.<\/pre>\n<p>\u8c03\u7528csminst.sql\u811a\u672c\u521b\u5efa\u8f85\u52a9\u7528\u6237\u548c\u5bf9\u8c61\u540e\uff0c\u518d\u6b21\u8fd0\u884ccsscan\u5de5\u5177\uff0c\u5bf9\u8868\u4e2d\u6570\u636e\u8fdb\u884c\u8f6c\u6362\u524d\u7684\u626b\u63cf\u3002<br \/>\n\u5de5\u5177csscan\u7684\u8c03\u7528\u6709\u547d\u4ee4\u884c\u65b9\u5f0f\uff0c\u548c\u4ea4\u4e92\u4e24\u79cd\uff0c\u5f53\u547d\u4ee4\u884c\u6ca1\u6709\u63d0\u4f9b\u8db3\u591f\u7684\u53c2\u6570\uff0c\u5de5\u5177\u4f1a\u4ee5\u4ea4\u4e92\u65b9\u5f0f\u83b7\u53d6\u5176\u4ed6\u53c2\u6570\u3002<br \/>\n\u64cd\u4f5c\u5b8c\u6210\u540e\uff0c\u53ef\u4ee5\u68c0\u67e5\u5bf9\u5e94\u7684\u65e5\u5fd7\u4fe1\u606f\uff1a<\/p>\n<pre lang='SQL'>[oracle@dbserver1 bin]$ more \/home\/oracle\/scan_722.err \r\nDatabase Scan Individual Exception Report\r\n[Database Scan Parameters]\r\nParameter                      Value                                           \r\n------------------------------ ------------------------------------------------\r\nCSSCAN Version                 v2.1                                            \r\nInstance Name                  fhacdb1                                         \r\nDatabase Version               11.2.0.2.0                                      \r\nScan type                      Selective tables                                \r\nScan CHAR data?                YES                                             \r\nDatabase character set         ZHS16GBK                                        \r\nFROMCHAR                       ZHS16GBK                                        \r\nTOCHAR                         AL32UTF8                                        \r\nScan NCHAR data?               NO                                              \r\nArray fetch buffer size        4096000                                         \r\nNumber of processes            1                                               \r\nCapture convertible data?      NO                                              \r\n------------------------------ ------------------------------------------------\r\n[Data Dictionary individual exceptions]\r\n[Application data individual exceptions]\r\nUser  : THAMS\r\nTable : LIBFILE722\r\nColumn: F4\r\nType  : VARCHAR2(42)\r\nNumber of Exceptions         : 1         \r\nMax Post Conversion Data Size: 45        \r\nROWID              Exception Type      Size Cell Data(first 30 bytes)     \r\n------------------ ------------------ ----- ------------------------------\r\nAAAP2KAAAAAB+u0AAE exceed column size    45 \u5de1\u89c6\u53f0\u6e7e\u517c\u7406\u5b66\u653f\u9655\u897f\u9053\u76d1\u5bdf\u5fa1\u53f2\r\n------------------ ------------------ ----- ------------------------------\r\n[oracle@dbserver1 bin]$ more \/home\/oracle\/scan_722.out \r\nCharacter Set Scanner v2.2 : Release 11.2.0.2.0 - Production on Wed Aug 31 10:59:35 2011\r\nCopyright (c) 1982, 2009, Oracle and\/or its affiliates.  All rights reserved.\r\nConnected to:\r\nOracle Database 11g Enterprise Edition Release 11.2.0.2.0 - 64bit Production\r\nWith the Partitioning, Automatic Storage Management, OLAP, Data Mining\r\nand Real Application Testing options\r\nEnter array fetch buffer size: 1024000 > \r\nEnter number of scan processes to utilize(1..64): 1 > \r\nEnumerating table to scan...\r\n. process 1 scanning THAMS.LIBFILE722[AAAP2KAAAAAB7XYAAA]\r\nCreating Database Scan Summary Report...\r\nCreating Individual Exception Report...\r\nScanner terminated successfully.\r\n[oracle@dbserver1 bin]$ more \/home\/oracle\/scan_722.txt \r\nDatabase Scan Summary Report\r\nTime Started  : 2011-08-31 10:59:48\r\nTime Completed: 2011-08-31 10:59:50\r\nProcess ID         Time Started       Time Completed\r\n---------- -------------------- --------------------\r\n         1  2011-08-31 10:59:49  2011-08-31 10:59:49\r\n---------- -------------------- --------------------\r\n[Database Size]\r\nTablespace                           Used            Free           Total       Expansion\r\n------------------------- --------------- --------------- --------------- ---------------\r\nSYSTEM                            581.81M         118.19M         700.00M            .00K\r\nSYSAUX                            521.38M          78.63M         600.00M            .00K\r\nUNDOTBS1                            7.44M      20,699.56M      20,707.00M            .00K\r\nTEMP                                 .00K            .00K            .00K            .00K\r\nUSERS                           1,930.38M         139.88M       2,070.25M            .00K\r\nLOB_AU2M                        8,176.13M   1,937,423.88M   1,945,600.00M         212.00K\r\nLOB_AU8M                       10,074.69M     501,925.31M     512,000.00M            .00K\r\nDATA_ARCHIVE                    5,332.06M   1,018,667.94M   1,024,000.00M            .00K\r\nLOB_AU32M                       4,772.38M     507,227.63M     512,000.00M            .00K\r\nLOB_AU64M                       4,548.38M     507,451.63M     512,000.00M            .00K\r\n------------------------- --------------- --------------- --------------- ---------------\r\nTotal                          35,944.63M   4,493,732.63M   4,529,677.25M         212.00K\r\n[Database Scan Parameters]\r\nParameter                      Value                                           \r\n------------------------------ ------------------------------------------------\r\nCSSCAN Version                 v2.1                                            \r\nInstance Name                  fhacdb1                                         \r\nDatabase Version               11.2.0.2.0                                      \r\nScan type                      Selective tables                                \r\nScan CHAR data?                YES                                             \r\nDatabase character set         ZHS16GBK                                        \r\nFROMCHAR                       ZHS16GBK                                        \r\nTOCHAR                         AL32UTF8                                        \r\nScan NCHAR data?               NO                                              \r\nArray fetch buffer size        4096000                                         \r\nNumber of processes            1                                               \r\nCapture convertible data?      NO                                              \r\n------------------------------ ------------------------------------------------\r\n[Scan Summary]\r\nSome character type application data are not convertible to the new character set\r\n[Data Dictionary Conversion Summary]\r\nData Dictionary Tables:\r\nDatatype                    Changeless      Convertible       Truncation            Lossy\r\n--------------------- ---------------- ---------------- ---------------- ----------------\r\nVARCHAR2                             0                0                0                0\r\nCHAR                                 0                0                0                0\r\nLONG                                 0                0                0                0\r\nVARRAY                               0                0                0                0\r\n--------------------- ---------------- ---------------- ---------------- ----------------\r\nTotal                                0                0                0                0\r\nTotal in percentage              0.000%           0.000%           0.000%           0.000%\r\nXML CSX Dictionary Tables:\r\nDatatype                    Changeless      Convertible       Truncation            Lossy\r\n--------------------- ---------------- ---------------- ---------------- ----------------\r\nVARCHAR2                             0                0                0                0\r\nCHAR                                 0                0                0                0\r\nLONG                                 0                0                0                0\r\nVARRAY                               0                0                0                0\r\n--------------------- ---------------- ---------------- ---------------- ----------------\r\nTotal                                0                0                0                0\r\nTotal in percentage              0.000%           0.000%           0.000%           0.000%\r\n[Application Data Conversion Summary]\r\nDatatype                    Changeless      Convertible       Truncation            Lossy\r\n--------------------- ---------------- ---------------- ---------------- ----------------\r\nVARCHAR2                       222,683           28,308                1                0\r\nCHAR                                 0                0                0                0\r\nLONG                                 0                0                0                0\r\nVARRAY                               0                0                0                0\r\n--------------------- ---------------- ---------------- ---------------- ----------------\r\nTotal                          222,683           28,308                1                0\r\nTotal in percentage             88.721%          11.278%           0.000%           0.000%\r\n[Distribution of Convertible, Truncated and Lossy Data by Table]\r\nData Dictionary Tables:\r\nUSER.TABLE                                    Convertible       Truncation            Lossy\r\n---------------------------------------- ---------------- ---------------- ----------------\r\n---------------------------------------- ---------------- ---------------- ----------------\r\nXML CSX Dictionary Tables:\r\nUSER.TABLE                                    Convertible       Truncation            Lossy\r\n---------------------------------------- ---------------- ---------------- ----------------\r\n---------------------------------------- ---------------- ---------------- ----------------\r\nApplication Data:\r\nUSER.TABLE                                    Convertible       Truncation            Lossy\r\n---------------------------------------- ---------------- ---------------- ----------------\r\nTHAMS.LIBFILE722                                   28,308                1                0\r\n---------------------------------------- ---------------- ---------------- ----------------\r\n[Distribution of Convertible, Truncated and Lossy Data by Column]\r\nData Dictionary Tables:\r\nUSER.TABLE|COLUMN                             Convertible       Truncation            Lossy\r\n---------------------------------------- ---------------- ---------------- ----------------\r\n---------------------------------------- ---------------- ---------------- ----------------\r\nXML CSX Dictionary Tables:\r\nUSER.TABLE|COLUMN                             Convertible       Truncation            Lossy\r\n---------------------------------------- ---------------- ---------------- ----------------\r\n---------------------------------------- ---------------- ---------------- ----------------\r\nApplication Data:\r\nUSER.TABLE|COLUMN                             Convertible       Truncation            Lossy\r\n---------------------------------------- ---------------- ---------------- ----------------\r\nTHAMS.LIBFILE722|F11                                4,648                0                0\r\nTHAMS.LIBFILE722|F2                                 4,643                0                0\r\nTHAMS.LIBFILE722|F3                                 4,648                0                0\r\nTHAMS.LIBFILE722|F46                                  222                0                0\r\nTHAMS.LIBFILE722|F6                                 4,312                0                0\r\nTHAMS.LIBFILE722|F7                                   565                0                0\r\nTHAMS.LIBFILE722|TITLE                              4,642                0                0\r\n---------------------------------------- ---------------- ---------------- ---------------\r\n[Indexes to be Rebuilt]\r\nUSER.INDEX on USER.TABLE(COLUMN)                                                         \r\n-----------------------------------------------------------------------------------------\r\n-----------------------------------------------------------------------------------------<\/pre>\n<p>\u5de5\u5177csscan\u4f1a\u751f\u6210\u4e09\u4e2a\u65e5\u5fd7\uff0c\u4e00\u4e2aerr\u8bb0\u5f55\u9519\u8bef\u4fe1\u606f\uff0c\u6bd4\u5982\u8fd9\u4e2a\u4f8b\u5b50\u4e2d\uff0c\u4e00\u4e2a\u5217\u7684\u957f\u5ea6\u9700\u8981\u53d8\u957f\uff0c\u5426\u5219\u65e0\u6cd5\u5bb9\u7eb3\u6570\u636e\u957f\u5ea6\u7684\u6269\u5c55\uff1b\u4e00\u4e2alog\u8bb0\u5f55\u64cd\u4f5c\u6b65\u9aa4\uff1b\u800ctxt\u5219\u662f\u6700\u7ec8\u7684\u6c47\u603b\u4fe1\u606f\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u5de5\u5177csscan\u7528\u4e8e\u68c0\u67e5\u4ece\u4e00\u4e2a\u5b57\u7b26\u96c6\u8f6c\u6362\u5230\u53e6\u4e00\u4e2a\u5b57\u7b26\u96c6\uff0c\u6570\u636e\u5e93\u4e2d\u7684\u6570\u636e\u662f\u5426\u4f1a\u4ea7\u751f\u4e22\u5931\u3001\u622a\u65ad\u7b49\u73b0\u8c61\u3002 \u8fd9\u4e2a\u5de5\u5177\u5f88\u65e9\u5c31\u51fa\u73b0\u4e86\uff0c\u4e0d\u8fc7\u7531\u4e8e\u957f\u4e45\u4ee5\u6765\u7275\u5236\u5230\u5b57\u7b26\u96c6\u8f6c\u6362\u7684\u5de5\u4f5c\u4e0d\u662f\u5f88\u591a\uff0c\u56e0\u6b64\u5bf9\u4e8e\u8fd9\u4e2a\u5de5\u5177\u6ca1\u4ec0\u4e48\u7814\u7a76\uff0c\u8fd9\u6b21\u9700\u8981\u5c06ZHS16GBK\u8f6c\u6362\u5230AL32UTF8\uff0c\u5c1d\u8bd5\u4e86\u4e00\u4e0bcsscan\u7684\u529f\u80fd\uff0c\u53d1\u73b0\u8fd9\u4e2a\u5de5\u5177\u8fd8\u662f\u5f88\u65b9\u4fbf\u7684\u3002 [oracle@dbserver1 bin]$ csscan userid=thams\/thams table=libfile722 tochar=AL32UTF8 log=\/home\/oracle\/scan_722 Character Set Scanner v2.2 : Release 11.2.0.2.0 &#8211; Production on Wed Aug 31 10:54:15 2011 Copyright (c) 1982, 2009, Oracle and\/or its affiliates. All rights reserved. CSS-00127: user thams does not &hellip; <a href=\"https:\/\/yangtingkun.net\/?p=71\">Continue reading <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_jetpack_newsletter_access":"","_jetpack_dont_email_post_to_subs":false,"_jetpack_newsletter_tier_id":0,"_jetpack_memberships_contains_paywalled_content":false,"_jetpack_memberships_contains_paid_content":false,"footnotes":""},"categories":[3],"tags":[14,13],"jetpack_featured_media_url":"","jetpack_sharing_enabled":true,"jetpack_shortlink":"https:\/\/wp.me\/p2yiY3-19","_links":{"self":[{"href":"https:\/\/yangtingkun.net\/index.php?rest_route=\/wp\/v2\/posts\/71"}],"collection":[{"href":"https:\/\/yangtingkun.net\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/yangtingkun.net\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/yangtingkun.net\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/yangtingkun.net\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=71"}],"version-history":[{"count":2,"href":"https:\/\/yangtingkun.net\/index.php?rest_route=\/wp\/v2\/posts\/71\/revisions"}],"predecessor-version":[{"id":112,"href":"https:\/\/yangtingkun.net\/index.php?rest_route=\/wp\/v2\/posts\/71\/revisions\/112"}],"wp:attachment":[{"href":"https:\/\/yangtingkun.net\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=71"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/yangtingkun.net\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=71"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/yangtingkun.net\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=71"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}