ORACLE 11g匯入9i dump的問題及解決

jeanron100發表於2014-03-19
因為系統遷移,需要將一部分的9i的資料匯入11g的庫裡,
目標庫是11.2.0.3.0 64位的環境。

匯入dump的時候,有一個比較大的分割槽表,需要用匯入分割槽的方式,就寫了如下的命令。但是奇怪的是過了一會,丟擲來一個imp的錯誤就完事了。

-bash-4.1$ imp n1/n1@testdb tables=TEST_DB:TEST_DB_PAR_P1        file=TEST_DBP1.dmp     ignore=Y statistics=none grants=n indexes=n buffer=9102000 log=imp_log_TEST_DB_PAR_P1_test
Import: Release 11.2.0.3.0 - Production on Wed Mar 19 17:05:33 2014
Copyright (c) 1982, 2011, Oracle and/or its affiliates.  All rights reserved.
Connected to: Oracle Database 11g Enterprise Edition Release 11.2.0.3.0 - 64bit Production
With the Partitioning, Data Mining and Real Application Testing options
Export file created by EXPORT:V09.02.00 via direct path
Warning: the objects were exported by SYSTEM, not by you
import done in UTF8 character set and AL16UTF16 NCHAR character set
import server uses AL32UTF8 character set (possible charset conversion)
export client uses ZHT16MSWIN950 character set (possible charset conversion)
. importing SYSTEM's objects into N1
IMP-00055: Warning: partition or subpartition "TEST_DB":"TEST_DB_PAR_P1" not found in export file
Import terminated successfully with warnings.

我以為我的表名和分割槽寫的有問題,檢查了一下,都在的。

為了繼續,然後嘗試直接按表匯入,但是還是導不進去,不過報錯資訊倒是不太一樣了。

-bash-4.1$ imp n1/n1@testdb tables=TEST_DB       file=TEST_DBP1.dmp     ignore=Y statistics=none grants=n indexes=n buffer=9102000 log=imp_log_TEST_DB_PAR_P1_test
Import: Release 11.2.0.3.0 - Production on Wed Mar 19 17:04:11 2014
Copyright (c) 1982, 2011, Oracle and/or its affiliates.  All rights reserved.
Connected to: Oracle Database 11g Enterprise Edition Release 11.2.0.3.0 - 64bit Production
With the Partitioning, Data Mining and Real Application Testing options
Export file created by EXPORT:V09.02.00 via direct path
Warning: the objects were exported by SYSTEM, not by you
import done in UTF8 character set and AL16UTF16 NCHAR character set
import server uses AL32UTF8 character set (possible charset conversion)
export client uses ZHT16MSWIN950 character set (possible charset conversion)
. importing SYSTEM's objects into N1
IMP-00033: Warning: Table "TEST_DB" not found in export file
Import terminated successfully with warnings.

開始懷疑是不是dump有問題了,確認了下checksum也是一樣的。
最後嘗試如下的方式,加了 fromuser ,touser選項,竟然可以了。

imp n1/n1@testdb tables=TEST_DB:TEST_DB_PAR_P1      fromuser=TEST_APPO touser=PSCNVDBO1   file=TEST_DBP1.dmp     ignore=Y statistics=none grants=n indexes=n buffer=9102000 log=imp_log_TEST_DB_PAR_P1           &
Connected to: Oracle Database 11g Enterprise Edition Release 11.2.0.3.0 - 64bit Production
With the Partitioning, Data Mining and Real Application Testing options
Export file created by EXPORT:V09.02.00 via direct path
Warning: the objects were exported by SYSTEM, not by you
import done in UTF8 character set and AL16UTF16 NCHAR character set
import server uses AL32UTF8 character set (possible charset conversion)
export client uses ZHT16MSWIN950 character set (possible charset conversion)
. importing TEST_APPO's objects into N1
. . importing partition "TEST_DB":"TEST_DB_PAR_P1"   29673834 rows imported
Import terminated successfully without warnings.

檢視metalink,也沒有發現類似的帖子。也算自己為ORACLE出了一點力吧。

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

相關文章