ITPub博客

首页 > 数据库 > Oracle > 将partition expdp后impdp

将partition expdp后impdp

原创 Oracle 作者:tolilong 时间:2015-10-19 10:09:05 0 删除 编辑

 将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博客 ” ,链接:https://blog.itpub.net/24237320/viewspace-1814881/ ,如需转载,请注明出处,否则将追究法律责任。

请登录后发表评论 登录
全部评论

注册时间:2010-07-13

  • 博文量
    406
  • 访问量
    1208693