EXP-00091錯誤的說明和解決方法

今天我寫了一個在Linux下執行定時任務備份Oracle數據庫的腳本,但是在root用戶下執行腳本的時候報錯了,錯誤內容爲EXP-00091,下面附上解決方案(當然,下面的內容是我轉載的哦!)


對於一個經常用oracle的人來講,會經常用到EXP和imp工具,我們在做EXP的過程中可能經常會遇到EXP-00091 Exporting questionable statistics的錯誤。

其實這個是EXP的error message,它產生的原因是因爲我們EXP工具所在的環境變量中的NLS_LANG和Database中的NLS_CHARACTERSET不一致導致的。但需要說明的是,EXP-00091這個error message對所產生的dump沒有影響,生成的dump還可以正常的imp(但是最好還是再次EXP)

在oracle的doc中這樣描述這個錯誤信息:

EXP-00091: 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.

上面的錯誤描述(cause)和錯誤的解決方法(action)已經說的比較明確了,下面我們做一下簡單的說明

出現EXP-00091之後,我們採用的解決方案如下:

1、查看database中的NLS_CHARACTERSET的值

a、select * from nls_database_parameters t where t.parameter='NLS_CHARACTERSET';

b、select * from v$nls_parameters where parameter='NLS_CHARACTERSET';

PARAMETER          VALUE 

-----------------  ----------

NLS_CHARACTERSET   ZHS16GBK 

2、根據第一步查出來的NLS_CHARACTERSET(即ZHS16GBK)來設定

windows環境:cmd > set NLS_LANG=AMERICAN_AMERICA.ZHS16GBK

linux環境:Shell > export NLS_LANG=AMERICAN_AMERICA.ZHS16GBK

鏈接:

exp/imp字符集問題的說明:http://blog.sina.com.cn/s/blog_67be3b4501015q7z.html


發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章