EXP-00091 Exporting questionable statistics

导出数据库基表时遇到EXP-00091错误,虽然据说不影响导出结果,但看起来还是很让人不爽:

[[[email protected] HCscripts]$ exp "'/ as sysdba'" tables = col$,icol$,file$,ind$,indpart$,obj$,partcol$,partlob$,partobj$,seg$,seq$,tab$,tabpart$,ts$,user$,attrcol$,view$ file=basetable.dmp log=basetable.log 

Export: Release 11.2.0.2.0 - Production on Wed Nov 16 15:53:40 2011

Copyright (c) 1982, 2009, Oracle and/or its affiliates.  All rights reserved.


Connected to: Oracle Database 11g Enterprise Edition Release 11.2.0.2.0 - Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options
Export done in US7ASCII character set and AL16UTF16 NCHAR character set
server uses AL32UTF8 character set (possible charset conversion)

About to export specified tables via Conventional Path ...
. . exporting table                           COL$      61078 rows exported
EXP-00091: Exporting questionable statistics.
EXP-00091: Exporting questionable statistics.
EXP-00091: Exporting questionable statistics.
EXP-00091: Exporting questionable statistics.
. . exporting table                          ICOL$       3101 rows exported
EXP-00091: Exporting questionable statistics.
EXP-00091: Exporting questionable statistics.
. . exporting table                          FILE$          8 rows exported
EXP-00091: Exporting questionable statistics.
EXP-00091: Exporting questionable statistics.
EXP-00091: Exporting questionable statistics.
. . exporting table                           IND$       1560 rows exported
EXP-00091: Exporting questionable statistics.
EXP-00091: Exporting questionable statistics.
. . exporting table                       INDPART$        572 rows exported
EXP-00091: Exporting questionable statistics.
EXP-00091: Exporting questionable statistics.
EXP-00091: Exporting questionable statistics.
. . exporting table                           OBJ$      15233 rows exported
EXP-00091: Exporting questionable statistics.
EXP-00091: Exporting questionable statistics.
EXP-00091: Exporting questionable statistics.
EXP-00091: Exporting questionable statistics.
EXP-00091: Exporting questionable statistics.
EXP-00091: Exporting questionable statistics.
. . exporting table                       PARTCOL$        200 rows exported
EXP-00091: Exporting questionable statistics.
EXP-00091: Exporting questionable statistics.
. . exporting table                       PARTLOB$          1 rows exported
EXP-00091: Exporting questionable statistics.
. . exporting table                       PARTOBJ$        149 rows exported
EXP-00091: Exporting questionable statistics.
EXP-00091: Exporting questionable statistics.
. . exporting table                           SEG$       3720 rows exported
EXP-00091: Exporting questionable statistics.
. . exporting table                           SEQ$        147 rows exported
EXP-00091: Exporting questionable statistics.
EXP-00091: Exporting questionable statistics.
. . exporting table                           TAB$       1261 rows exported
EXP-00091: Exporting questionable statistics.
EXP-00091: Exporting questionable statistics.
. . exporting table                       TABPART$        475 rows exported
EXP-00091: Exporting questionable statistics.
EXP-00091: Exporting questionable statistics.
EXP-00091: Exporting questionable statistics.
. . exporting table                            TS$         14 rows exported
EXP-00091: Exporting questionable statistics.
EXP-00091: Exporting questionable statistics.
. . exporting table                          USER$         46 rows exported
EXP-00091: Exporting questionable statistics.
EXP-00091: Exporting questionable statistics.
EXP-00091: Exporting questionable statistics.
. . exporting table                       ATTRCOL$        665 rows exported
EXP-00091: Exporting questionable statistics.
EXP-00091: Exporting questionable statistics.
. . exporting table                          VIEW$       3833 rows exported
EXP-00091: Exporting questionable statistics.
EXP-00091: Exporting questionable statistics.
Export terminated successfully with warnings.

这个问题是由于exp工具所在的环境变量中的NLS_LANG与DB中的NLS_CHARACTERSET不一致导致的。
首先查看DB中的NLS_CHARCTERSET:

[SQL> col parameter for a20
SQL> col value for a30
SQL> select * from v$nls_parameters where parameter='NLS_CHARACTERSET';

PARAMETER	     VALUE
-------------------- ------------------------------
NLS_CHARACTERSET     AL32UTF8

设置exp的环境变量NLS_LANG为对应值

[[[email protected] HCscripts]$ export NLS_LANG=AMERICAN_AMERICA.AL32UTF8
[[email protected] HCscripts]$ env | grep NLS
NLS_LANG=AMERICAN_AMERICA.AL32UTF8

再次执行导出

[[[email protected] HCscripts]$ exp "'/ as sysdba'" tables = col$,icol$,file$,ind$,indpart$,obj$,partcol$,partlob$,partobj$,seg$,seq$,tab$,tabpart$,ts$,user$,attrcol$,view$ file=basetable_new.dmp log=basetable_new.log 

Export: Release 11.2.0.2.0 - Production on Wed Nov 16 16:09:56 2011

Copyright (c) 1982, 2009, Oracle and/or its affiliates.  All rights reserved.


Connected to: Oracle Database 11g Enterprise Edition Release 11.2.0.2.0 - Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options
Export done in AL32UTF8 character set and AL16UTF16 NCHAR character set

About to export specified tables via Conventional Path ...
. . exporting table                           COL$      61078 rows exported
. . exporting table                          ICOL$       3101 rows exported
. . exporting table                          FILE$          8 rows exported
. . exporting table                           IND$       1560 rows exported
. . exporting table                       INDPART$        572 rows exported
. . exporting table                           OBJ$      15233 rows exported
. . exporting table                       PARTCOL$        200 rows exported
. . exporting table                       PARTLOB$          1 rows exported
. . exporting table                       PARTOBJ$        149 rows exported
. . exporting table                           SEG$       3720 rows exported
. . exporting table                           SEQ$        147 rows exported
. . exporting table                           TAB$       1261 rows exported
. . exporting table                       TABPART$        475 rows exported
. . exporting table                            TS$         14 rows exported
. . exporting table                          USER$         46 rows exported
. . exporting table                       ATTRCOL$        665 rows exported
. . exporting table                          VIEW$       3833 rows exported
Export terminated successfully without warnings.

总结:
字符集对于我来说是个比较头疼的问题,有空还得仔细研究下

参考资料:

http://www.eygle.com/digest/2009/04/exp00091_exporting_questionabl.html

http://xiexiejiao.cn/oracle/exp-00091-error.html

普人特福的博客cnzz&51la for wordpress,cnzz for wordpress,51la for wordpress