环境变量字符集和数据库字符集不一样导致的错误,EXP-00091: Exporting questionable statistics 问题处理方法

来源:互联网 发布:淘宝350模板如何加链接 编辑:程序博客网 时间:2024/05/21 07:50

在使用EXP工具进行导出备份或迁移数据的时候有时会报很多的“EXP-00091: Exporting questionable statistics”错误,具体的现象和处理方法请观看……
1.问题现象

$ exp username/password owner=username file=/home/oracle/username.dmp

Export: Release 11.2.0.1.0 - Production on Mon Apr 23 10:40:34 2012

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 - 64bit Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options
Export done in ZHS16GBK character set and AL16UTF16 NCHAR character set
server uses AL32UTF8 character set (possible charset conversion)

About to export specified users ...
. exporting pre-schema procedural objects and actions
. exporting foreign function library names for user UIDWALL
. exporting PUBLIC type synonyms
. exporting private type synonyms
. exporting object type definitions for user UIDWALL
About to export UIDWALL's objects ...
. exporting database links
. exporting sequence numbers
. exporting cluster definitions
. about to export UIDWALL's tables via Conventional Path ...
. . exporting table                  T_RULE          4 rows exported
EXP-00091: Exporting questionable statistics.
EXP-00091: Exporting questionable statistics.
. . exporting table            T_APPLY          4 rows exported
EXP-00091: Exporting questionable statistics.
. . exporting table                         T_QUYU       2344 rows exported
EXP-00091: Exporting questionable statistics.
EXP-00091: Exporting questionable statistics.
EXP-00091: Exporting questionable statistics.
EXP-00091: Exporting questionable statistics.
. exporting synonyms
. exporting views
. exporting stored procedures
. exporting operators
. exporting referential integrity constraints
. exporting triggers
. exporting indextypes
. exporting bitmap, functional and extensible indexes
. exporting posttables actions
. exporting materialized views
. exporting snapshot logs
. exporting job queues
. exporting refresh groups and children
. exporting dimensions
. exporting post-schema procedural objects and actions
. exporting statistics
Export terminated successfully with warnings.

问题:因为用putty连接登陆的linux下的oracle用户的环境变量语言集和oralce数据库中的环境变量语言集不相同。

2.处理方法

 指定Linux系统的NLS_LANG环境变量为数据库的数据集
1)查询数据库的字符集

$ sqlplus / as sysdba

SQL> select userenv('language') from dual;

USERENV('LANGUAGE')
--------------------------------------------------------------------------------
AMERICAN_AMERICA.AL32UTF8

SQL> quit
Disconnected from Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - 64bit Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options
[oracle@uiddev1 ~]$ export NLS_LANG=AMERICAN_AMERICA.AL32UTF8

2)设置Linux操作系统的NLS_LANG环境变量

export NLS_LANG=AMERICAN_AMERICA.AL32UTF8

Window系统的环境变量的修改方法是:
C:\>set NLS_LANG=AMERICAN_AMERICA.AL32UTF8

3.OK,处理完成,在进行EXP导出操作就不会报这个错误了

Export terminated successfully without warnings.