温馨提示×

温馨提示×

您好,登录后才能下订单哦!

密码登录×
登录注册×
其他方式登录
点击 登录注册 即表示同意《亿速云用户服务条款》

IMPDP如何按范围分区

发布时间:2021-11-12 09:19:51 来源:亿速云 阅读:207 作者:小新 栏目:关系型数据库

小编给大家分享一下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如何按范围分区”这篇文章的所有内容,感谢各位的阅读!相信大家都有了一定的了解,希望分享的内容对大家有所帮助,如果还想学习更多知识,欢迎关注亿速云行业资讯频道!

向AI问一下细节

免责声明:本站发布的内容(图片、视频和文字)以原创、转载和分享为主,文章观点不代表本网站立场,如果涉及侵权请联系站长邮箱:is@yisu.com进行举报,并提供相关证据,一经查实,将立刻删除涉嫌侵权内容。

AI