一.出现EXP-00091错误

[oracle@test4 ~]$ exp system/oracle file=/oracle/dump/daochu1 log=daochu1.log full=y

Export: Release 10.2.0.4.0 - Production on Tue Oct 29 14:15:08 2013

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

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

About to export the entire database ...
. exporting tablespace definitions
.............................
EXP-00091: Exporting questionable statistics.
EXP-00091: Exporting questionable statistics.
Export terminated successfully with warnings.

当环境变量和数据库的不一致,在导出统计信息时候,会报EXP-00091错误。



二.查看NLS相关参数

[oracle@test4 ~]$ echo $NLS_LANG

SQL> col value fora30
SQL> selectparameter,value fromnls_database_parameters
2 whereparameter like'%CHARACTERSET%';

PARAMETER VALUE
------------------------------ ------------------------------
NLS_CHARACTERSET UTF8
NLS_NCHAR_CHARACTERSET UTF8



三.解决方法
1.设置NLS_LANG为NLS_CHARACTERSET

[oracle@test4 ~]$ export NLS_LANG=american_america.UTF8
[oracle@test4 ~]$ exp system/oracle file=/oracle/dump/daochu1 log=daochu1.log full=y

Export: Release 10.2.0.4.0 - Production on Tue Oct 29 14:15:08 2013

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

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

About to export the entire database ...
. exporting tablespace definitions
.............................
Export terminated successfully without warnings.


2.使用statistics=none

[oracle@test4 ~]$exp system/oracle file=/oracle/dump/daochu1 log=daochu1.log full=y statistics=none

Export: Release 10.2.0.4.0 - Production on Tue Oct 29 14:15:08 2013

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

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

About to export the entire database ...
. exporting tablespace definitions
.............................
Export terminated successfully without warnings.


在执行的过程中,有一个警告,如下:


[oracle@test4 ~]$exp system/oracle file=/oracle/dump/daochu2 log=daochu2.log full=y

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

About to export the entire database ...
. exporting tablespace definitions
EXP-00079: Data in table "PURCHASEORDER" is protected. Conventional path may only be exporting partial table.
.............................

解决方法:

1.导出的时候指定direct=y;

[oracle@test4 ~]$exp system/oracle file=/oracle/dump/daochu2 log=daochu2.log full=y direct=y


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

About to export the entire database ...
. exporting tablespace definitions
. exporting profiles

..............................................

Export terminated successfully without warnings.


导出成功。


2.grant exempt access policy to xxx用户


SQL> grant exempt access policy to system;
Grant succeeded.

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

About to export the entire database ...
. exporting tablespace definitions
. exporting profiles

..............................................

Export terminated successfully without warnings.


导出成功。


3.以sysdba用户执行

[oracle@test4 ~]$ exp \'system/oracle as sysdba\' file=/oracle/dump/daochu3 log=daochu3.log full=y (此处是在linux系统下测试)

Export: Release 10.2.0.4.0 - Production on Tue Oct 29 14:15:08 2013

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

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

About to export the entire database ...
. exporting tablespace definitions
.............................
Export terminated successfully without warnings.

导出成功。