一.出現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.
導出成功。