星空网 > 软件开发 > 数据库

【ORA

问题描述:

  工作中使用kettle将原始库中的数据抽取到标准库中,在抽取过程中报错:【ORA-14400: 插入的分区关键字未映射到任何分区】

解决过程:

  经过百度,发现出现ORA-14400是表分区出现问题。  

  1.确定该表是否已经添加了表分区。    

select partition_name,high_value from user_tab_partitions t where table_name='table_name';

  2.查询表分区绑定的字段名称。   

select * from user_part_key_columns t where name='table_name';

  3.查看当前表分区的具体情况

select * from user_tab_partitions t where table_name='table_name';

  4.查询表分区绑定的字段的最大值。注:此处的table_name应为当前表对应的原始库中的源表。

select max(key_column) from table_name t;

  5.将查询到的表分区绑定字段的最大值插入到当前表中进行测试,发现报错。

insert into table_name(table_column1,table_column2,......,key_column) values(value1,value2,......,key_value);

 

  6.经过以上环节确定源表中出现错误数据,并且由于错误数据的时间跨度大于当前分区的范围,导致ORA-14400错误的出现,但是由于该数据必须保留,因此对表分区进行扩展。

  7.扩展当前表分区以保证范围大于绑定字段的最大值。

alter table table_name add partition part_key_column_029 values less than (to_date('2029-01-01 00:00:00','YYYY-MM-DD HH24:MI:SS','NLS_CALENDAR=GREGORIAN'))       tablespace tablespace_name       pctfree 10       initrans 1       maxtrans255,......,alter table table_name add partition part_key_column_049 values less than (to_date('2049-01-01 00:00:00','YYYY-MM-DD HH24:MI:SS','NLS_CALENDAR=GREGORIAN'))
       tablespace tablespace_name       pctfree 10       initrans 1       maxtrans255,

  8.结束。再次使用kettle进行抽取时顺利抽取。

         
               




原标题:【ORA

关键词:

*特别声明:以上内容来自于网络收集,著作权属原作者所有,如有侵权,请联系我们: admin#shaoqun.com (#换成@)。

Catch of the Day:https://www.goluckyvip.com/tag/16899.html
非洲电商阻力:https://www.goluckyvip.com/tag/169.html
3C类产品:https://www.goluckyvip.com/tag/1690.html
catch店铺申请:https://www.goluckyvip.com/tag/16900.html
catch开店:https://www.goluckyvip.com/tag/16901.html
catch开店费用:https://www.goluckyvip.com/tag/16902.html
字节跳动辟谣!TikTok收紧美国开店政策为不实信息:https://www.goluckyvip.com/news/188212.html
2024北京庞各庄镇梨花节开幕时间是几号?:https://www.vstour.cn/a/365179.html
相关文章
我的浏览记录
最新相关资讯
海外公司注册 | 跨境电商服务平台 | 深圳旅行社 | 东南亚物流