ITPub博客

首页 > 数据库 > Oracle > Oracle分区表增加分区报错“ORA-14760:不允许对间隔分区对象执行 ADD PARTITION”

Oracle分区表增加分区报错“ORA-14760:不允许对间隔分区对象执行 ADD PARTITION”

原创 Oracle 作者:feelpurple 时间:2016-05-18 15:48:45 0 删除 编辑
为分区表增加分区的时候报错


查看报错代码
[oracle@backup-recovery misdb]$ oerr ora 14120
14120, 00000, "incompletely specified partition bound for a DATE column"
// *Cause:  An attempt was made to use a date expression whose format 
//          does not fully (i.e. day, month, and year (including century))
//          specify a date as a partition bound for a DATE column.
//          The format may have been specified explicitly (using
//          TO_DATE() function) or implicitly (NLS_DATE_FORMAT).
// *Action: Ensure that date format used in a partition bound for a
//          DATE column supports complete specification of a date
//          (i.e. day, month, and year (including century)).  
//          If NLS_DATE_FORMAT does not support complete 
//          (i.e. including the century) specification of the year,
//          use TO_DATE() (e.g. TO_DATE('01-01-1999', 'MM-DD-YYYY') 
//          to fully express the desired date.

报错原因:增加的分区时间格式和分区中指定的时间格式不匹配

查看分区表中的各分区时间格式


解决方法:使用分区表中的分区时间格式
alter table ELMP_TRANS_SALEDETAIL
add partition p_20161201 values less than
(TO_DATE(' 2016-12-01 23:59:59', 'SYYYY-MM-DD HH24:MI:SS', 'NLS_CALENDAR=GREGORIAN'));

来自 “ ITPUB博客 ” ,链接:https://blog.itpub.net/26506993/viewspace-2102452/ ,如需转载,请注明出处,否则将追究法律责任。

请登录后发表评论 登录
全部评论

注册时间:2014-08-01

  • 博文量
    404
  • 访问量
    1673998