8 月
24
最近用exp导出数据的时候报了很多EXP-00091: Exporting questionable statistics的错误。
【问题现象】
exp system/123456 OWNER=rs2 file=20160823_rs2_17_8.dmp log=20160823_rs2_17_8.log ... 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. . . exporting table ACCEPT_DETAILS 70239 rows exported EXP-00091: Exporting questionable statistics. "20160823_rs2_17_8.log" 5686L, 314896C 1,0-1 顶ç«EXP-00091: Exporting questionable statistics. EXP-00091: Exporting questionable statistics. EXP-00091: Exporting questionable statistics. EXP-00091: Exporting questionable statistics. . . exporting table ACCEPT_DETAILS0527 64422 rows exported ...
【问题处理】
由于exp工具会依赖与操作系统的字符串编码,所以需要将NLS_LANG环境变量设置与数据库一致。
SQL> select * from nls_database_parameters; PARAMETER VALUE ------------------------------ ------------------------------ NLS_LANGUAGE AMERICAN NLS_TERRITORY AMERICA NLS_CURRENCY $ NLS_ISO_CURRENCY AMERICA NLS_NUMERIC_CHARACTERS ., NLS_CHARACTERSET ZHS16GBK NLS_CALENDAR GREGORIAN NLS_DATE_FORMAT DD-MON-RR NLS_DATE_LANGUAGE AMERICAN NLS_SORT BINARY NLS_TIME_FORMAT HH.MI.SSXFF AM NLS_TIMESTAMP_FORMAT DD-MON-RR HH.MI.SSXFF AM NLS_TIME_TZ_FORMAT HH.MI.SSXFF AM TZR NLS_TIMESTAMP_TZ_FORMAT DD-MON-RR HH.MI.SSXFF AM TZR NLS_DUAL_CURRENCY $ NLS_COMP BINARY NLS_LENGTH_SEMANTICS BYTE NLS_NCHAR_CONV_EXCP FALSE NLS_NCHAR_CHARACTERSET AL16UTF16 NLS_RDBMS_VERSION 10.2.0.4.0 20 rows selected.
设置Linux的NLS_LANG环境变量:
[oracle@mfs ~]$ export NLS_LANG=AMERICAN_AMERICA.ZHS16GBK
设置windows的NLS_LANG环境变量:
C:\Users\Administrator>set NLS_LANG=AMERICAN_AMERICA.ZHS16GBK
设置了环境变量之后,重新导出一切正常。
不过还是建议使用数据泵来导数,因为数据泵不会收到操作系统的字符集编码的影响,就不会有这样的报错了。
no comment untill now