小编给大家分享一下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 Ente免费主机域名rprise 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如何按范围分区”这篇文章的所有内容,感谢各位的阅读!相信大家都有了一定的了解,希望分享的内容对大家有所帮助,如果还想学习更多知识,欢迎关注云技术行业资讯频道!
这篇文章主要介绍Oracle中的同义词是什么意思,文中介绍的非常详细,具有一定的参考价值,感兴趣的小伙伴们一定要看完!oracle的同义词(synonyms)就是一种映射关系,可以理解为C++指针或者java中的引用,也就是类似别名。 1.创建同义词: c…