EXP-00091: Exporting questionable statistics

在9i中使用exp導出一些數據時遇到了exp錯誤信息EXP-00091: Exporting questionable statistics,產生的原因很簡單,主要是NLS_LANG環境變量與數據庫中的NLS_CHARACTERSET的值不一致,有可能是NLS_LANG沒有設置或是設置的不對。
Connected to: Oracle9i Enterprise Edition Release 9.2.0.4.0 - Production
With the Partitioning, OLAP and Oracle Data Mining options
JServer Release 9.2.0.4.0 - Production
Export done in US7ASCII character set and AL16UTF16 NCHAR character set
server uses ZHS16GBK character set
(possible charset conversion)
. exporting pre-schema procedural objects and actions
. exporting foreign function library names for user USER
. exporting PUBLIC type synonyms
. exporting private type synonyms
. exporting object type definitions for user USER
. exporting database links
. exporting sequence numbers
. exporting cluster definitions
. about to export USER's tables via Conventional Path ...
. . exporting table                 IPLIST          6 rows exported
EXP-00091: Exporting questionable statistics.

輸出顯示可能存在字符集的轉換,這點需要注意。
查看數據庫設置:
SQL> select * from v$nls_parameters where parameter='NLS_CHARACTERSET';
PARAMETER                       VALUE
------------------------------- ----------------
NLS_CHARACTERSET                ZHS16GBK
在profile中正確設置該環境變量即可,如果不想影響當前的環境變量設置,最簡單的方法就是在命令行下:

export NLS_LANG=AMERICAN_AMERICA.ZHS16GBK
退出後設置即失效。

再次執行exp命令就正常了
Connected to: Oracle9i Enterprise Edition Release 9.2.0.4.0 - Production
With the Partitioning, OLAP and Oracle Data Mining options
JServer Release 9.2.0.4.0 - Production
Export done in ZHS16GBK character set and AL16UTF16 NCHAR character set
. exporting pre-schema procedural objects and actions
. exporting foreign function library names for user USER
. exporting PUBLIC type synonyms
. exporting private type synonyms
. exporting object type definitions for user USER
. exporting database links
. exporting sequence numbers
. exporting cluster definitions
. about to export USER's tables via Conventional Path ...
. . exporting table                 IPLIST          6 rows exported

2010.9.14補充:
今天使用exp的query選項導出數據時又報了這個錯誤,查了下資料,這個是正常的行爲,引起這個錯誤的原因和解決方法如下:
Cause: Export was able to export statistics, but the statistics may not be useable. The statistics are questionable because one or more of the following happened during export: a row error occurred, client character set or NCHARSET does not match with the server, a query clause was specified on export, only certain partitions or subpartitions were exported, or a fatal error occurred while processing a table. 
Action: To export non-questionable statistics, change the client character set or NCHARSET to match the server, export with no query clause, or export complete tables. If desired, import parameters can be supplied so that only non-questionable statistics will be imported, and all questionable statistics will be recalculated.
可以看到還有其它的情況會引發這個錯誤,看來不光要知其然還是知其所以然啊!

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章