使用exp匯出報錯EXP-00091

來源:互聯網
上載者:User

使用exp匯出報錯EXP-00091

使用如下命令執行匯出操作:

exp user/pwd@db file=/home/a.dmp log=/home/a.log

輸出如下資訊,其中包含一些EXP-00091的錯誤提示:

. . exporting table T 0 rows exported
EXP-00091: Exporting questionable statistics.
EXP-00091: Exporting questionable statistics.
EXP-00091: Exporting questionable statistics.

但匯出來的dump檔案可用於匯入。

看下官方對EXP-00091的介紹:

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.

大致意思是匯出過程中,由於用戶端字元集或NCHARSET參數和伺服器端不一致,導致一些統計資訊不可用。解決方案是可以匯出不存在問題的統計資訊,或者改變用戶端字元集或NCHARSET參數。

實驗:
方案1:
查詢服務器端字元集:

SQL> select userenv('language') from dual; USERENV('LANGUAGE')

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

AMERICAN_AMERICA.AL32UTF8

設定用戶端字元集:

[Oracle@Node]~>export NLS_LANG=AMERICAN_AMERICA.AL32UTF8

執行匯出命令:

[oracle@Node]~>exp user/pwd@db file=/home/a.dmp log=/home/a.log

. . exporting table T 0 rows exported

不再報錯。

方案2:

exp user/pwd@db file=/home/a.dmp log=/home/a.log statistics=none

統計資訊欄位statistics設定為none。
執行匯出命令:

[oracle@Node]~>exp user/pwd@db file=/home/a.dmp log=/home/a.log

. . exporting table T 0 rows exported

不再報錯。但這種方式相當於未匯出那些因字元集不一致錯誤的統計資訊,匯入自然也不會有這部分統計資訊,如果需要,那麼只能再重新收集統計資訊。

因此針對這種exp報EXP-00091的錯誤,可以有上述兩種方式workaround,但推薦的肯定還是方案1,匯出的資訊最全面。

相關文章

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.