系统:oel 5.4
数据库:oracle 10.2.0.1
问题描述:在执行导出命令时报错EXP-00091,如下所示:
[oracle@leo ~]$ exp scott/tiger@orclsou file=/home/oracle/scott.dmp tables=emp_ogg,dept_ogg rows=y
Export: Release 10.2.0.1.0 - Production on Mon May 30 14:45:23 2022
Copyright (c) 1982, 2005, Oracle. All rights reserved.
Connected to: Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - Production
With the Partitioning, OLAP and Data Mining 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 ...
. . exporting table EMP_OGG 14 rows exported
. . exporting table DEPT_OGG 4 rows exported
EXP-00091: Exporting questionable statistics.
EXP-00091: Exporting questionable statistics.
Export terminated successfully with warnings.
通常造成此异常为字符集原因,查数据库字符集
SQL> select userenv('language') from dual;
USERENV('LANGUAGE')
----------------------------------------------------
AMERICAN_AMERICA.WE8ISO8859P1
查系统环境变量NLS_LANG
[oracle@leo ~]$ echo $NLS_LANG
[oracle@leo ~]$
如上,系统未设置语言环境变量.
解决方案:
[oracle@leo ~]$ export NLS_LANG=AMERICAN_AMERICA.WE8ISO8859P1
[oracle@leo ~]$ echo $NLS_LANG
AMERICAN_AMERICA.WE8ISO8859P1
再次执行exp,如下:
[oracle@leo ~]$ exp scott/tiger@orclsou file=/home/oracle/scott.dmp tables=emp_ogg,dept_ogg rows=y log=/home/oracle/exp.log
Export: Release 10.2.0.1.0 - Production on Mon May 30 14:52:49 2022
Copyright (c) 1982, 2005, Oracle. All rights reserved.
Connected to: Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - Production
With the Partitioning, OLAP and Data Mining options
Export done in WE8ISO8859P1 character set and AL16UTF16 NCHAR character set
About to export specified tables via Conventional Path ...
. . exporting table EMP_OGG 14 rows exported
. . exporting table DEPT_OGG 4 rows exported
Export terminated successfully without warnings.
结论:成功导出,无任何告警.