Partitioned views error - not updatable

  • I have created a partitioned view which will be union all across different databases but the table name is same. Data is inserted based on create date, there is check constraint on create date with date range. Looks like i have got everything, not sure why am i getting below message when trying to delete data. Dropping/recreating constraint did not help.   Does the view  must have 'schema binding' option?

    Msg 4436, Level 16, State 13, Line 1
    UNION ALL view 'DBName.dbo.vw_PartL_Temp' is not updatable because a partitioning column was not found.

  • curious_sqldba - Sunday, July 16, 2017 8:07 AM

    I have created a partitioned view which will be union all across different databases but the table name is same. Data is inserted based on create date, there is check constraint on create date with date range. Looks like i have got everything, not sure why am i getting below message when trying to delete data. Dropping/recreating constraint did not help.   Does the view  must have 'schema binding' option?

    Msg 4436, Level 16, State 13, Line 1
    UNION ALL view 'DBName.dbo.vw_PartL_Temp' is not updatable because a partitioning column was not found.

    Doesn't need schema binding. I think the most often thing for that error is a problem with the check constraint for the partitioning column so you may want to double check that. There are quite a few requirements for partitioned views. It may look like you got everything but the error indicates otherwise.
    Which requirements have been checked and what is the definition of the check constraint?

    Sue

  • Sue_H - Wednesday, July 19, 2017 10:52 AM

    curious_sqldba - Sunday, July 16, 2017 8:07 AM

    I have created a partitioned view which will be union all across different databases but the table name is same. Data is inserted based on create date, there is check constraint on create date with date range. Looks like i have got everything, not sure why am i getting below message when trying to delete data. Dropping/recreating constraint did not help.   Does the view  must have 'schema binding' option?

    Msg 4436, Level 16, State 13, Line 1
    UNION ALL view 'DBName.dbo.vw_PartL_Temp' is not updatable because a partitioning column was not found.

    Doesn't need schema binding. I think the most often thing for that error is a problem with the check constraint for the partitioning column so you may want to double check that. There are quite a few requirements for partitioned views. It may look like you got everything but the error indicates otherwise.
    Which requirements have been checked and what is the definition of the check constraint?

    Sue

    The problem was the partition key in this createdate was not part of cluster, after I added that it worked 😀.

Viewing 3 posts - 1 through 2 (of 2 total)

You must be logged in to reply to this topic. Login to reply