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.
可以看到还有其它的情况会引发这个错误,看来不光要知其然还是知其所以然啊!

你可能感兴趣的:(oracle,职场,休闲,EXP-00091)