Oracle
Allen 2010-12-27 18:25:44 46169 0 0 0 0
 
对一个DBA或需使用exp,imp的普通用户来说,在我们做exp的过程中可能经常会遇到EXP-00091 Exporting questionable statistics.这样的EXP信息,其实它就是exp的error message。
它产生的原因是因为我们exp工具所在的环境变量中的NLS_LANG与DB中的NLS_CHARACTERSET不一致。
 
但需说明的是,exp-91这个error message对所生成的dump档没有影响,生成的dump档还可以正常的imp(个人体会,不知道有没有错),虽然它对我们的dump档没有影响,我个人还是不想它出现,大家也有同感吧……
 
下面我们就让它消失吧……
 
step 01 查看DB中的NLS_CHARACTERSET的值(提供两种方法): 
select * from nls_database_parameters t where t.parameter='NLS_CHARACTERSET'
or
select * from v$nls_parameters  where parameter='NLS_CHARACTERSET';
SQL> select * from v$nls_parameters where parameter='NLS_CHARACTERSET';
 
PARAMETER          VALUE
-----------------------  ----------------------------------------------
NLS_CHARACTERSET    ZHT16BIG5
 
step 02 根據step 01查出的NLS_CHARACTERSET(ZHT16BIG5)來設定exp的環境變量:
WINNT> set NLS_LANG=AMERICAN_AMERICA.ZHT16BIG5
LINUX> export NLS_LANG=AMERICAN_AMERICA.ZHT16BIG5
 
附上exp-91的oracle error message 解決方案說明: 
oerr exp 91
00091, 00000, "Exporting questionable statistics."
// *Cause:  Export was able export statistics, but the statistics may not be
//          usuable. The statistics are questionable because one or more of
//          the following happened during export: a row error occurred, client
//          character set or NCHARSET does not match with the server, a query
//          clause was specified on export, only certain partitions or
//          subpartitions were exported, or a fatal error occurred while
//          processing a table.
// *Action: To export non-questionable statistics, change the client character
//          set or NCHARSET to match the server, export with no query clause,
//          export complete tables. If desired, import parameters can be
//          supplied so that only non-questionable statistics will be imported,
//          and all questionable statistics will be recalculated.
 
但由于系统是英文的,对于这个设置不是很明白,暂时还是不要修改了!
但还是忍不住试了一下,出现新的错误…… 
SQL> select * from v$nls_parameters  where parameter='NLS_CHARACTERSET';
 
PARAMETER
----------------------------------------------------------------
VALUE
----------------------------------------------------------------
NLS_CHARACTERSET
ZHS16GBK
 
--退出,在win下设置环境变量
C:>set NLS_LANG=AMERICAN_AMERICA.ZHS16BK
 
--开始导出数据
C:>exp endba/xxx@hs01 tables=enshpms file=e:enshpms.dmp
 
Export: Release 10.2.0.1.0 - Production on Mon Dec 27 18:46:19 2010
 
Copyright (c) 1982, 2005, Oracle.  All rights reserved.
 
 
EXP-00056: ORACLE error 12705 encountered
ORA-12705: Cannot access NLS data files or invalid environment specified
Username:
Password:
 
EXP-00056: ORACLE error 12705 encountered
ORA-12705: Cannot access NLS data files or invalid environment specified
Username:
Password:
 
EXP-00056: ORACLE error 12705 encountered
ORA-12705: Cannot access NLS data files or invalid environment specified
EXP-00005: all allowable logon attempts failed
EXP-00000: Export terminated unsuccessfully
 
出现了新的错误,可能是英文系统中没有相应的字符集,暂时不搞了……
 
PS:详细记录一下
正式服务器是英文系统win2003 server
客户端是中文XP
测试服务器是中文系统win2003 server
 
服务器端导出:
C:>exp endba/xxx@hs01 tables=enshpms file=e:enshpms.dmp
 
Export: Release 10.2.0.1.0 - Production on Mon Dec 27 19:01:11 2010
 
Copyright (c) 1982, 2005, Oracle.  All rights reserved.
 
 
Connected to: Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - 64bit
Production
With the Partitioning, OLAP and Data Mining options
Export done in WE8MSWIN1252 character set and AL16UTF16 NCHAR character set
server uses ZHS16GBK character set (possible charset conversion)
 
About to export specified tables via Conventional Path ...
. . exporting table                        ENSHPMS      20077 rows exported
EXP-00091: Exporting questionable statistics.
EXP-00091: Exporting questionable statistics.
EXP-00091: Exporting questionable statistics.
Export terminated successfully with warnings.
 
 
设置环境变量后导出,没有报错:
C:>SET NLS_LANG=SIMPLIFIED CHINESE_CHINA.ZHS16GBK
 
C:>exp endba/xxx@hs01 tables=enshpms file=e:enshpms_20101227.dmp
 
Export: Release 10.2.0.1.0 - Production on ╨╟╞┌╥╗ 12╘┬ 27 19:07:27 2010
 
Copyright (c) 1982, 2005, Oracle.  All rights reserved.
 
 
Connected to: Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - 64bit
Production
With the Partitioning, OLAP and Data Mining options
Export done in ZHS16GBK character set and AL16UTF16 NCHAR character set
 
About to export specified tables via Conventional Path ...
. . exporting table                        ENSHPMS      20077 rows exported
Export terminated successfully without warnings.
 
C:>
 
客户端导入文件到测试系统(中文Win2003 server)
C:>imp endba/xxx@hs01-60 file=d:enshpms_20101227.dmp
 
Import: Release 8.1.6.0.0 - Production on 星期一 12月 27 19:04:01 2010
 
(c) Copyright 1999 Oracle Corporation.  All rights reserved.
 
 
连接到: Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - Production
With the Partitioning, OLAP and Data Mining options
 
IMP-00010: 不是有效的导出文件,标题检验失败
IMP-00000: 未成功终止导入
 
奇怪啊!
但在客户端导出后,总是没有响应,不能正常结束。
C:>exp endba/xxx@hs01 tables=enshpms file=d:enshpms.dmp
 
Export: Release 8.1.6.0.0 - Production on 星期一 12月 27 19:09:47 2010
 
(c) Copyright 1999 Oracle Corporation.  All rights reserved.
 
 
连接到: Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - 64bit Produc
tion
With the Partitioning, OLAP and Data Mining options
已导出ZHS16GBK字符集和UTF8 NCHAR 字符集
 
即将导出指定的表通过常规路径 ...
. . 正在导出表                        ENSHPMS      20077 行被导出
 
此时查看导出文件为450kb
强制结束后,导出文件变为2486KB
 
而服务器端导出的文件大小都是:2526kb
 
在客户端将客户端导出的文件导入到测试系统(中文Win2003 server)
C:>imp endba/xxx@hs01-60 file=d:enshpms.dmp
 
Import: Release 8.1.6.0.0 - Production on 星期一 12月 27 19:21:53 2010
 
(c) Copyright 1999 Oracle Corporation.  All rights reserved.
 
 
连接到: Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - Production
With the Partitioning, OLAP and Data Mining options
 
经由常规路径导出由EXPORT:V08.01.06创建的文件
已经完成ZHS16GBK字符集和UTF8 NCHAR 字符集中的导入
. 正在将ENDBA的对象导入到 ENDBA
. . 正在导入表                       "ENSHPMS"      20077行被导入
IMP-00009: 导出文件异常结束
成功终止导入,但出现警告。
 
查看导入的表记录数正确!
还有待进一步分析。

Tag: Oracle Oracle备份与恢复 TTTBLOG
我也要发一个   ·   返回首页   ·   返回[Oracle]   ·   前一个   ·   下一个
欢迎评论
未登录,
请先 [ 注册 ] or [ 登录 ]
(一分钟即可完成注册!)
返回首页     ·   返回[Oracle]   ·   返回顶部