EXP-00091解決辦法

kakaxi9521發表於2017-01-17
今天要做一個高版本到低版本的遷移,Oracle11.2.0.4 到Oracle10.2.0.4

在遷移之前在測試環境做了個測試,有如下報錯:
. . exporting table           SYS_IMPORT_SCHEMA_01       2847 rows exported
EXP-00091: Exporting questionable statistics.
EXP-00091: Exporting questionable statistics.
EXP-00091: Exporting questionable statistics.
查了下,又是字符集的問題。
[oracle@DC214QB2X-2950 ~]$ 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.
[oracle@DC214QB2X-2950 ~]$ 
這個error產生的原因是因為我們exp所在的環境變數中的NLS_LANG與DB中的NLS_CHARACTERSET不一致。
1. 我們來檢視DB中NLS_CHARACTERSET的值(提供兩種方法):
select * from nls_database_parameters t where t.parameter='NLS_CHARACTERSET'
select * from v$nls_parameters where parameter='NLS_CHARACTERSET'
輸出結果:


2.檢視當前主機的NLS_LANG環境變數的值
[oracle@DC214QB2X-2950 ~]$ echo $NLS_LANG
american_america.zhs16gbk
NLS_LANG的輸出為american_america.zhs16gbk。 ------與DB中的NLS_CHARACTERSET不同。

3. 根據第一步中查出的NLS_CHARACTERSET 來設定exp的環境變數。
[oracle@DC214QB2X-2950 ~]$ export NLS_LANG=AMERICAN_AMERICA.AL32UTF8
[oracle@DC214QB2X-2950 ~]$ echo $NLS_LANG
AMERICAN_AMERICA.AL32UTF8

4. 設定完成後再盡心exp匯出操作沒有報錯。






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

相關文章