简体   繁体   中英

partition range other than one day is not supported sql server

I got below error.

partition range other than one day is not supported sql server

When I checked the partition scheme and function then today's date (2020-02-29 leap year) is not there in the definition of partition scheme\\function. What is the best way to resolve this?

Adding this will help at this stage?

ALTER PARTITION SCHEME [ps_tbl] NEXT USED 'FG_202002';
ALTER PARTITION FUNCTION [pf_tbl]() SPLIT RANGE (N'2020-02-29T00:00:00.000');

Sounds like you've got a DDL trigger with a leap-year bug. That is not a SQL Server system error message, and there's no built-in way to constrain the granularity of a partition function.

To check run:

select name, OBJECT_DEFINITION(object_id) trigger_body
from sys.triggers 
where parent_class = 0

DDL Triggers are often implemented without extensive testing, leap years commonly expose latent bugs.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM