通過impdp做資料庫遷移遇到的問題總結
初始的時候通過兩個庫之間直接轉儲資料,命令如下:
在要匯入的庫的OS下執行:
[oracle@qqdb auto_dmp]$ impdp tests/tests tables=ABC directory=dump_dir logfile=logfile.log network_link=crm_test table_exists_action=APPEND
[@more@]Import: Release 10.2.0.1.0 - 64bit Production on Saturday, 30 October, 2010 2:28:40Copyright (c) 2003, 2005, Oracle. All rights reserved.
Connected to: Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - 64bit Production
With the Partitioning, OLAP and Data Mining options
Starting "TESTS"."SYS_IMPORT_TABLE_01": tests/******** tables=ABC directory=dump_dir logfile=logfile.log network_link=crm_test table_exists_action=APPEND
Estimate in progress using BLOCKS method...
Processing object type TABLE_EXPORT/TABLE/TABLE_DATA
Total estimation using BLOCKS method: 3 MB
Processing object type TABLE_EXPORT/TABLE/TABLE
ORA-39083: Object type TABLE failed to create with error:
ORA-00959: tablespace 'CRMREPORT' does not exist
Failing sql is:
CREATE TABLE "SCOTT"."ABC" ("A" CLOB, "B" BLOB, "C" VARCHAR2(10)) PCTFREE 10 PCTUSED 40 INITRANS 1 MAXTRANS 255 NOCOMPRESS LOGGING STORAGE(INITIAL 1048576 NEXT 1048576 MINEXTENTS 1 MAXEXTENTS 2147483645 PCTINCREASE 0 FREELISTS 1 FREELIST GROUPS 1 BUFFER_POOL DEFAULT) TABLESPACE "CRMREPORT" LOB ("A") STORE AS ( TABLESPACE "CRMREPORT" ENABLE STORAGE IN ROW CHUNK 8192 PCTVERSION 10 NOCA
Job "TESTS"."SYS_IMPORT_TABLE_01" completed with 1 error(s) at 02:28:56
[oracle@qqdb auto_dmp]$
因為我已經在目標庫內建立了對應的ABC表,而且我匯入的時候TABLE_EXISTS_ACTION設定的為APPEND,按理說應該直接將資料append進去的,可是結果卻是還要重新建立表,但是此時有LOB欄位的存在,所以加入如下引數:
REMAP_TABLESPACE=CRMREPORT:USERS
此時重新執行:
[oracle@qqdb auto_dmp]$ impdp tests/tests tables=ABC directory=dump_dir logfile=logfile.log network_link=crm_test table_exists_action=APPEND REMAP_TABLESPACE=CRMREPORT:USERS
Import: Release 10.2.0.1.0 - 64bit Production on Saturday, 30 October, 2010 2:30:57
Copyright (c) 2003, 2005, Oracle. All rights reserved.
Connected to: Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - 64bit Production
With the Partitioning, OLAP and Data Mining options
Starting "TESTS"."SYS_IMPORT_TABLE_01": tests/******** tables=ABC directory=dump_dir logfile=logfile.log network_link=crm_test table_exists_action=APPEND REMAP_TABLESPACE=CRMREPORT:USERS
Estimate in progress using BLOCKS method...
Processing object type TABLE_EXPORT/TABLE/TABLE_DATA
Total estimation using BLOCKS method: 3 MB
Processing object type TABLE_EXPORT/TABLE/TABLE
ORA-39152: Table "SCOTT"."ABC" exists. Data will be appended to existing table but all dependent metadata will be skipped due to table_exists_action of append
. . imported "SCOTT"."ABC" 1 rowsJob "TESTS"."SYS_IMPORT_TABLE_01" completed with 1 error(s) at 02:32:12
此時可以看到已經轉入了資料。
因為線上impdp的時候通過database link匯入的時候,只能對應的 匯入和database link對應的使用者裡面,如果想要匯入其他的使用者可以指定如下引數:
REMAP_SCHEMA=SCOTT:TESTS
執行結果如下:
[oracle@qqdb auto_dmp]$ impdp tests/tests tables=ABC directory=dump_dir logfile=logfile.log network_link=crm_test table_exists_action=APPEND REMAP_TABLESPACE=CRMREPORT:USERS REMAP_SCHEMA=SCOTT:TESTS
Import: Release 10.2.0.1.0 - 64bit Production on Saturday, 30 October, 2010 2:33:26
Copyright (c) 2003, 2005, Oracle. All rights reserved.
Connected to: Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - 64bit Production
With the Partitioning, OLAP and Data Mining options
Starting "TESTS"."SYS_IMPORT_TABLE_01": tests/******** tables=ABC directory=dump_dir logfile=logfile.log network_link=crm_test table_exists_action=APPEND REMAP_TABLESPACE=CRMREPORT:USERS REMAP_SCHEMA=SCOTT:TESTS
Estimate in progress using BLOCKS method...
Processing object type TABLE_EXPORT/TABLE/TABLE_DATA
Total estimation using BLOCKS method: 3 MB
Processing object type TABLE_EXPORT/TABLE/TABLE
ORA-39152: Table "TESTS"."ABC" exists. Data will be appended to existing table but all dependent metadata will be skipped due to table_exists_action of append
. . imported "TESTS"."ABC" 1 rowsJob "TESTS"."SYS_IMPORT_TABLE_01" completed with 1 error(s) at 02:34:41
來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/10130206/viewspace-1040706/,如需轉載,請註明出處,否則將追究法律責任。
相關文章
- 資料遷移部分問題總結
- expdp/impdp跨版本升級遷移問題總結
- 使用資料泵遷移遇到的問題
- 使用expdp、impdp遷移資料庫資料庫
- GoldenGate資料遷移的問題總結(一)Go
- GoldenGate資料遷移的問題總結(二)Go
- 資料遷移中的幾個問題總結
- 資料遷移(1)——通過資料泵表結構批量遷移
- 使用資料泵(expdp、impdp)遷移資料庫流程資料庫
- 遷移資料庫資料考慮問題資料庫
- 海量資料遷移之一個誤操作的問題總結
- 關於Oracle資料庫中行遷移/行連結的問題Oracle資料庫
- 大型資料庫跨平臺遷移總結資料庫
- Oracle資料庫遷移之三:dblink+impdpOracle資料庫
- 關於 Laravel 遷移遇到的問題Laravel
- 關於資料庫使用impdp+network_link遷移時,job的遷移資料庫
- Oracle使用impdp的network_link遷移資料庫Oracle資料庫
- 生產環境資料遷移問題彙總
- Datapump資料遷移的實踐總結
- 曠日持久的資料遷移總結
- Laravel5的資料庫表建立問題 資料庫遷移操作報錯問題解決Laravel資料庫
- 一次用RMAN做資料庫恢復遇到的問題資料庫
- OBIEE10g跨平臺遷移過程及問題總結
- 海量資料遷移之通過shell估算資料量
- 【遷移】使用rman遷移資料庫資料庫
- 使用impdp,expdp資料泵進入海量資料遷移
- 聊聊國產資料庫遷移中的表連線效能問題資料庫
- 移動端 h5開發遇到的問題總結H5
- 資料庫遷移資料庫
- Oracle遷移資料庫過程記錄Oracle資料庫
- Oracle使用資料泵 (expdp/impdp)實施遷移Oracle
- expdp/impdp使用sysdba許可權遷移資料
- 資料整合式遷移的一些總結
- impdp遇到char字元含中文的問題字元
- 資料遷移中需要考慮的問題
- 透過rman全庫備份遷移資料庫資料庫
- 1.1資料庫物件結構遷移方法資料庫物件
- 資料遷移整合中的幾個問題總結(r10筆記第99天)筆記