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

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


對於一個常常用oracle的人來說,會常常用到EXP和imp工具,咱們在作EXP的過程當中可能常常會遇到EXP-00091 Exporting questionable statistics的錯誤。linux

其實這個是EXP的error message,它產生的緣由是由於咱們EXP工具所在的環境變量中的NLS_LANG和Database中的NLS_CHARACTERSET不一致致使的。但須要說明的是,EXP-00091這個error message對所產生的dump沒有影響,生成的dump還能夠正常的imp(可是最好仍是再次EXP)數據庫

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

EXP-00091: Exporting questionable statistics.oracle

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.app

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.ide

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

出現EXP-00091以後,咱們採用的解決方案以下:spa

一、查看database中的NLS_CHARACTERSET的值orm

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 

二、根據第一步查出來的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

相關文章
相關標籤/搜索