当前位置: 代码迷 >> 综合 >> 偶遇EXP-00091: Exporting questionable statistics
  详细解决方案

偶遇EXP-00091: Exporting questionable statistics

热度:15   发布时间:2023-12-19 17:09:03.0

  今天在 测试时偶然遇到了这问题,这简单重新下报错 :

[oracle@oracle11g ~]$ exp scott/triger tables=dept,emp file=scott_dept.dmp log=scott.log

Export: Release 11.2.0.1.0 - Production on Tue Nov 12 07:35:39 2013

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


EXP-00056: ORACLE error 28002 encountered
ORA-28002: the password will expire within 7 days
Connected to: Oracle Database 11g Enterprise Edition Release 11.2.0.1.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 ZHS16GBK character set (possible charset conversion)

About to export specified tables via Conventional Path ...
. . exporting table                           DEPT          4 rows exported
EXP-00091: Exporting questionable statistics.
EXP-00091: Exporting questionable statistics.
. . exporting table                            EMP         14 rows exported
EXP-00091: Exporting questionable statistics.
EXP-00091: Exporting questionable statistics
.
Export terminated successfully with warnings.

 

遇到了报错我们可能立即就知道该报错到底是由什么原因造成的 ,这时我们要充分利用现有的环境,条件,不能坐以待毙。毕竟客户要看到的是的一个well done 的job!

没错就是 oerr  当然需要用oracle用户来执行。

[oracle@oracle11g ~]$ oerr exp 91
00091, 00000, "Exporting questionable statistics."
// *Cause:  Export was able export statistics, but the statistics may not be
//          usuable. 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,
//          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@oracle11g ~]$


[oracle@oracle11g ~]$ echo $NLS_LANG

结果竟然为空,哈,这明显用的是系统默认配置嘛

 

既然问题已经确定了,那如何来解决呢?

。first:确定数据库的字符集

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

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

 

。second:设置环境变量和数据库字符集一样,this‘s ok。


[oracle@oracle11g ~]$ export NLS_LANG=AMERICAN_AMERICA.ZHS16GBK
[oracle@oracle11g ~]$ exp scott/triger tables=dept,emp file=scott_dept.dmp log=scott.log

Export: Release 11.2.0.1.0 - Production on Tue Nov 12 07:45:35 2013

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


EXP-00056: ORACLE error 28002 encountered
ORA-28002: the password will expire within 7 days
Connected to: Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options
Export done in ZHS16GBK character set and AL16UTF16 NCHAR character set

About to export specified tables via Conventional Path ...
. . exporting table                           DEPT          4 rows exported
. . exporting table                            EMP         14 rows exported
Export terminated successfully without warnings.

 

如上 之前的报错消失了, 问题到这里完整解决。

总结:

这个问题从根本上来说还在db安装时安装不规范导致的后遗症。

  相关解决方案