重庆分公司,新征程启航
为企业提供网站建设、域名注册、服务器等服务
小编给大家分享一下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如何按范围分区”这篇文章的所有内容,感谢各位的阅读!相信大家都有了一定的了解,希望分享的内容对大家有所帮助,如果还想学习更多知识,欢迎关注创新互联行业资讯频道!