EXP-00091解決方法(轉)

luckyfriends發表於2013-01-07
這個問題是很多在windows進行exp匯出時常見的一個問題,設定NLS_LANG環境變數即可解決,當然具體要參看資料庫的字符集設定是什麼。
set NLS_LANG=AMERICAN_AMERICA.ZHS16GBK 
set NLS_LANG=SIMPLIFIED CHINESE_CHINA.ZHS16GBK
(轉)


在EXP匯出時,出現EXP-00091報錯:

. . exporting table                         FRIEND
..............
                                                       142480 rows exported
EXP-00091: Exporting questionable statistics.

檢視EXP-00091的oracle error message 解決方案說明:

[oracle@MWSG1: ~]$oerr exp 00091
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.

    在我們做exp的過程中可能經常會遇到EXP-00091: Exporting questionable statistics.這樣的EXP資訊,其實它就是exp的error message,它產生的原因是因為我們exp工具所在的環境變數中的NLS_LANG與DB中的NLS_CHARACTERSET不一致。

⑴ 我們來檢視DB中的NLS_CHARACTERSET的值(提供兩種方法):

  1. sys@CCDB> select * from nls_database_parameters t where t.parameter='NLS_CHARACTERSET';   
  2.   
  3. PARAMETER                 VALUE   
  4. ------------------------- ---------------   
  5. NLS_CHARACTERSET          AL32UTF8   
  6.   
  7. 或者   
  8.   
  9. sys@CCDB> select * from v$nls_parameters  where parameter='NLS_CHARACTERSET';   
  10.   
  11. PARAMETER                 VALUE   
  12. ------------------------- ---------------   
  13. NLS_CHARACTERSET          AL32UTF8  
sys@CCDB> select * from nls_database_parameters t where t.parameter='NLS_CHARACTERSET'; PARAMETER                VALUE ------------------------- --------------- NLS_CHARACTERSET          AL32UTF8 或者 sys@CCDB> select * from v$nls_parameters  where parameter='NLS_CHARACTERSET'; PARAMETER                VALUE ------------------------- --------------- NLS_CHARACTERSET          AL32UTF8

⑵ 檢視環境變數中的NLS_LANG:

[oracle@MWSG1: ~]$echo $NLS_LANG
AMERICAN_AMERICA.ZHS16CGB231280      --果然與DB中NLS_CHARACTERSET=AL32UTF8不同。

⑶ 根據⑴查出的NLS_CHARACTERSET(AL32UTF8)來設定exp的環境變數:

WINNT> set NLS_LANG=AMERICAN_AMERICA.AL32UTF8
[oracle@MWSG1: ~]$export NLS_LANG=AMERICAN_AMERICA.AL32UTF8
[oracle@MWSG1: ~]$echo $NLS_LANG
AMERICAN_AMERICA.AL32UTF8       --設定與DB中NLS_CHARACTERSET=AL32UTF8相同。

⑷ 再來EXP匯出資料 檢視log中是否還有EXP-00091報錯?   

. . exporting table                         FRIEND
...........................................................................
..............................................
                                                      1216253 rows exported
. . exporting table                     FRIEND_GRP
                                                          128 rows exported
Export terminated successfully without warnings.      --成功匯出且沒警告。

EXP-00091問題解決了!

來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/14710393/viewspace-752242/,如需轉載,請註明出處,否則將追究法律責任。

相關文章