IMPDP如何按范围分区

网友投稿 375 2023-12-30

IMPDP如何按范围分区

小编给大家分享一下IMPDP如何按范围分区,相信大部分人都还不怎么了解,因此分享这篇文章给大家参考一下,希望大家阅读完这篇文章后大有收获,下面让我们一起去了解一下吧!

IMPDP如何按范围分区

ESB_MSG_LOG表按范围分区,删除历史分区时,多删了201707分区

通过备份再异机恢复并导出201707分区

expdp system/manager TABLES=esbadmin.ESB_MSG_LOG:ESBLOG201707 directory=DATA_PUMP_DIR dumpfile=ESBLOG201707.dmp

本机再导入

ESB_MSG_LOG现在还有201708、201709两个分区,导入201707会不会影响到ESB_MSG_LOG

impdp system/123 TABLES=esbadmin.ESB_MSG_LOG:ESBLOG201707 directory=DATA_PUMP_DIR dumpfile=ESBLOG201707.dmp

导入报错

[oracle@dwdb log]$ impdp system/123 TABLES=esbadmin.ESB_MSG_LOG:ESBLOG201707 directory=DATA_PUMP_DIR dumpfile=ESBLOG201707.dmp

Import: Release 11.2.0.4.0 - Production on Tue Sep 5 21:35:26 2017

Copyright (c) 1982, 2011, Oracle and/or its affiliates.  All rights reserved.

Connected to: Oracle Database 11g Enterprise Edition Release 11.2.0.4.0 - 64bit Production

With the Partitioning, OLAP, Data Mining and Real Application Testing options

Master table "SYSTEM"."SYS_IMPORT_TABLE_01" successfully loaded/unloaded

Starting "SYSTEM"."SYS_IMPORT_TABLE_01":  system/******** TABLES=esbadmin.ESB_MSG_LOG:ESBLOG201707 directory=DATA_PUMP_DIR dumpfile=ESBLOG201707.dmp

Processing object type TABLE_EXPORT/TABLE/TABLE

ORA-39151: Table "ESBADMIN"."ESB_MSG_LOG" exists. All dependent metadata and data will be skipped due to table_exists_action of skip

Processing object type TABLE_EXPORT/TABLE/TABLE_DATA

Processing object type TABLE_EXPORT/TABLE/COMMENT

Processing object type TABLE_EXPORT/TABLE/INDEX/INDEX

Processing object type TABLE_EXPORT/TABLE/INDEX/FUNCTIONAL_INDEX/INDEX

Processing object type TABLE_EXPORT/TABLE/CONSTRAINT/CONSTRAINT

Processing object type TABLE_EXPORT/TABLE/INDEX/STATISTICS/INDEX_STATISTICS

Processing object type TABLE_EXPORT/TABLE/INDEX/STATISTICS/FUNCTIONAL_INDEX/INDEX_STATISTICS

Processing object type TABLE_EXPORT/TABLE/STATISTICS/TABLE_STATISTICS

Job "SYSTEM"."SYS_IMPORT_TABLE_01" completed with 1 error(s) at Tue Sep 5 21:35:28 2017 elapsed 0 00:00:01

表没有使用Interval,现在表中已经没有201707没有分区信息,所以必须去手工建立201707的分区,否则按分区条件PARTITION ESBLOG201708 VALUES LESS THAN (2017-09-01 00:00:00.000),下面的语句直接把201707分区内容全部导入到201708分区了

impdp system/dw54321 TABLES=esbadmin.ESB_MSG_LOG:ESBLOG201707 directory=DATA_PUMP_DIR dumpfile=ESBLOG201707.dmp table_exists_action=append

ALTER TABLE ESB_MSG_LOG ADD PARTITION ESBLOG201707 VALUES LESS THAN (2017-08-01 00:00:00.000)

ORA-14074:partition bound must collate higher

按范围分区,所以最旧最小的分区删除了,基本就回不来了,风险好高啊

以上是“IMPDP如何按范围分区”这篇文章的所有内容,感谢各位的阅读!相信大家都有了一定的了解,希望分享的内容对大家有所帮助,如果还想学习更多知识,欢迎关注行业资讯频道!

版权声明:本文内容由网络用户投稿,版权归原作者所有,本站不拥有其著作权,亦不承担相应法律责任。如果您发现本站中有涉嫌抄袭或描述失实的内容,请联系我们jiasou666@gmail.com 处理,核实后本网站将在24小时内删除侵权内容。

上一篇:Oracle系统默认的审核是怎样的
下一篇:怎么理解ORACLE MOVE 表空间
相关文章

 发表评论

暂时没有评论,来抢沙发吧~