通過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)遷移資料庫流程資料庫
- 資料遷移(1)——通過資料泵表結構批量遷移
- 遷移資料庫資料考慮問題資料庫
- 關於 Laravel 遷移遇到的問題Laravel
- 使用impdp,expdp資料泵進入海量資料遷移
- OBIEE10g跨平臺遷移過程及問題總結
- 資料庫遷移資料庫
- 1.1資料庫物件結構遷移方法資料庫物件
- 聊聊國產資料庫遷移中的表連線效能問題資料庫
- 達夢資料庫資料檔案遷移過程資料庫
- 【Datapump】Oracle資料泵遷移資料命令參考(expdp/impdp說明)Oracle
- redis資料庫遷移Redis資料庫
- 資料庫遷移 :理解資料庫
- laravel資料庫遷移Laravel資料庫
- X7一體機資料庫遷移問題處理資料庫
- 13TB的StarRocks大資料庫遷移過程大資料資料庫
- python資料庫-安裝問題總結(48)Python資料庫
- Oracle impdp遷移資料後主鍵丟失故障處理Oracle
- Oracle資料庫中資料行遷移與行連結Oracle資料庫
- oracle資料庫的impdp,expdpOracle資料庫
- vue專案中遇到的問題總結Vue
- Android中使用WebView遇到的問題總結:AndroidWebView
- React開發中遇到的問題總結React
- 2017年秋季遇到的相容問題總結
- 總結一下最近遇到的問題
- linux mysql資料庫遷移LinuxMySql資料庫
- django資料庫遷移-15Django資料庫
- 用rman遷移資料庫資料庫
- 資料庫遷移手記資料庫
- 遷移MySQL 5.7資料庫MySql資料庫
- 資料庫遷移神器——Flyway資料庫
- dm資料庫遷移命令資料庫
- SQL Server資料庫遷移SQLServer資料庫
- 【TRACE】如果通過10046跟蹤資料庫效能問題資料庫
- Laravel migration (資料庫遷移) 的使用Laravel資料庫
- 摩杜雲資料庫MySQL,破解異構資料庫遷移難題資料庫MySql
- 解決Oracle資料庫遷移後的伺服器負載效能問題JSOracle資料庫伺服器負載JS
- fastdfs資料遷移以及fastdfs問題排查記錄AST
- 雲資料庫管理與資料遷移資料庫