將partition expdp後impdp

tolilong發表於2015-10-19

 將partition table中的單個partition expdp之後,impdp到其他的database table中,需要使用到關鍵字:table_exists_action=append

C:\Users\Admin.LONG1-LI>expdp scott/bruce123 directory=temp_dir dumpfile=part1_p4.dmp tables=(part1:p4)

Export: Release 10.2.0.1.0 - Production on Monday, 19 October, 2015 10:02:51

Copyright (c) 2003, 2005, Oracle.  All rights reserved.

Connected to: Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - Production
With the Partitioning, OLAP and Data Mining options
Starting "SCOTT"."SYS_EXPORT_TABLE_01":  scott/******** directory=temp_dir dumpfile=part1_p4.dmp tables=(part1:p4)
Estimate in progress using BLOCKS method...
Processing object type TABLE_EXPORT/TABLE/TABLE_DATA
Total estimation using BLOCKS method: 256 KB
Processing object type TABLE_EXPORT/TABLE/TABLE
. . exported "SCOTT"."PART1":"P4"                        141.8 KB   10001 rows
Master table "SCOTT"."SYS_EXPORT_TABLE_01" successfully loaded/unloaded
******************************************************************************
Dump file set for SCOTT.SYS_EXPORT_TABLE_01 is:
  E:\APP\BRUCE\PART1_P4.DMP
Job "SCOTT"."SYS_EXPORT_TABLE_01" successfully completed at 10:02:59



C:\Users\is_long_li>sqlplus scott/bruce123
SQL*Plus: Release 10.2.0.1.0 - Production on 星期一 10月 19 10:05:33 2015

Copyright (c) 1982, 2005, Oracle.  All rights reserved.


連線到:
Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - Production
With the Partitioning, OLAP and Data Mining options

SQL> alter table part1 add partition p4 values less than(150000);

表已更改。

SQL> exit
從 Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - Production
With the Partitioning, OLAP and Data Mining options 斷開

C:\Users\is_long_li>impdp scott/bruce123 directory=temp_dir dumpfile=part1_p4.dmp table_exists_action=append

Import: Release 10.2.0.1.0 - Production on 星期一, 19 10月, 2015 10:05:59

Copyright (c) 2003, 2005, Oracle.  All rights reserved.

連線到: Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - Production
With the Partitioning, OLAP and Data Mining options
已成功載入/解除安裝了主表 "SCOTT"."SYS_IMPORT_FULL_01"
啟動 "SCOTT"."SYS_IMPORT_FULL_01":  scott/******** directory=temp_dir dumpfile=part1_p4.dmp table_exists_action=append
處理物件型別 TABLE_EXPORT/TABLE/TABLE
ORA-39152: 表 "SCOTT"."PART1" 已存在。由於附加了 table_exists_action, 資料將附加到現有表, 但是將跳過所有相關後設資料。
處理物件型別 TABLE_EXPORT/TABLE/TABLE_DATA
. . 匯入了 "SCOTT"."PART1":"P4"                        141.8 KB   10001 行
作業 "SCOTT"."SYS_IMPORT_FULL_01" 已經完成, 但是有 1 個錯誤 (於 10:06:03 完成)

 

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

相關文章