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

论坛 期权论坛 期权     
匿名技术用户   2021-1-5 20:05   6834   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博客 ” ,链接:http://blog.itpub.net/26506993/viewspace-2102452/,如需转载,请注明出处,否则将追究法律责任。

转载于:http://blog.itpub.net/26506993/viewspace-2102452/

分享到 :
0 人收藏
您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

积分:7942463
帖子:1588486
精华:0
期权论坛 期权论坛
发布
内容

下载期权论坛手机APP