[Oracle报错]EXP-00091: Exporting questionable statistics.

本文介绍了解决Oracle导出过程中出现的EXP-00091错误的方法。该错误通常与字符集不匹配有关,在导出表统计数据时发生。通过设置正确的NLS_LANG环境变量可以避免此问题。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

   Oracle版本:10.2.0.5.0

  问题描述:

  今天在虚拟机中使用exp进行导出实验时出现了“EXP-00091”错误,以下为导出操作命令及具体错误信息:

[oracle@tank ~]$ exp system/oracle file=/home/oracle/hr.dmp tables=hr.employees

Export: Release 10.2.0.5.0 - Production on Sat Apr 19 19:43:06 2017

Copyright (c) 1982, 2007, Oracle. All rights reserved.


Connected to: Oracle Database 10g Enterprise Edition Release 10.2.0.5.0 - 64bit 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 WE8ISO8859P1 character set (possible charset conversion)

About to export specified tables via Conventional Path ...
Current user changed to HR
. . exporting table EMPLOYEES 107 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.
EXP-00091: Exporting questionable statistics.
Export terminated successfully with warnings.

 

  MOS-->Error EXP-00091 While Taking Export (文档 ID 204793.1)

  

问题原因:

  Beginning with Oracle 9i by default export attempts to include statistics in the export. In pre-Oracle 9i versions statistics are not included unless it is specified.

  

       解决方案:

  a. If the statistics of a table are not required to be included in export, then take the export with parameter STATISTICS=NONE. Example:

  #> exp scott/tiger file=emp1.dmp tables=emp STATISTICS=NONE
  b. In case, the statistics are need to be included, you can use STATISTICS=ESTIMATE or COMPUTE (default is Estimate).

  Note: The export will still generate the warning message about the questionable statistics in one of the following cases even if using  STATISTICS=ESTIMATE / COMPUTE:

  1. There are row errors while exporting

  2. The client character set or NCHAR character set does not match the server character set or NCHAR character set (the NLS_LANG is different than the database character set for example).

  3. A QUERY clause is specified

  4. Only certain partitions or subpartitions are exported.

  The situation in case 2 is the most frequent and can be solved by setting the NLS_LANG character set of the client to the character set of the database.

  

经分析,当前情况属于上述第2点,执行以下操作:

[oracle@tank ~]$ sqlplus / as sysdba

SQL*Plus: Release 10.2.0.5.0 - Production on Sat Apr 19 19:43:53 2017

Copyright (c) 1982, 2010, Oracle. All Rights Reserved.


Connected to:
Oracle Database 10g Enterprise Edition Release 10.2.0.5.0 - 64bit Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options

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

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

SQL> exit
Disconnected from Oracle Database 10g Enterprise Edition Release 10.2.0.5.0 - 64bit Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options
[oracle@tank ~]$ export NLS_LANG=AMERICAN_AMERICA.WE8ISO8859P1
[oracle@tank ~]$ exp system/oracle file=/home/oracle/hr1.dmp tables=hr.employees

Export: Release 10.2.0.5.0 - Production on Sat Apr 19 19:44:14 2017

Copyright (c) 1982, 2007, Oracle. All rights reserved.


Connected to: Oracle Database 10g Enterprise Edition Release 10.2.0.5.0 - 64bit Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options
Export done in WE8ISO8859P1 character set and AL16UTF16 NCHAR character set

About to export specified tables via Conventional Path ...
Current user changed to HR
. . exporting table EMPLOYEES 107 rows exported
Export terminated successfully without warnings.

 

   总结:

  使用exp/imp工具时,尤其要注意变量NLS_LANG的设置。

 -The end-

                                Tank

                                20170419

 

转载于:https://www.cnblogs.com/okey/p/6736291.html

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值