SCSM 2012 SP1 Data Warehouse Jobs failed with error message of <xxxx>vw is not updatable because a partitioning column was not found.

Wyatt Wong 116 Reputation points
2020-12-02T06:55:13.05+00:00

I found 4 data warehouse jobs have a Failed status. After further checking, the error messages mentioned "UNION ALL view '<xxxx>vw' is not updatable because a partitioning column was not found." How can I resolve the issue ?

Load.Common
Transform.Common
Load.CMDWDataMart
Load.OMDWDataMart

Service Manager
Service Manager
A family of System Center products for managing incidents and problems.
210 questions
{count} votes

Accepted answer
  1. D B 111 Reputation points
    2020-12-03T23:38:36.76+00:00

    steps provided by MS Support...I did these with all the job schedules disabled...

    on the datawarehouse SQL server...

    select max(datekey) from DWRepository..DateDim --should be 20501230
    select max(datekey) from DwDataMart..DateDim --should be 20501230
    select max(datekey) from CMDwDataMart..DateDim --should be 20501230
    select max(datekey) from OMDwDataMart..DateDim --should be 20501230

    If your errors are caused by this issue, the above queries will return 20201230

    If date keys are from Dec 2020, please use the below steps:

    1. Backup all DW DBs
    2. Add additional date keys until 2050
      Exec DWRepository.dbo.PopulateDateDim '20210101','20501231'
      Exec DwDataMart.dbo.PopulateDateDim '20210101','20501231'
      Exec CMDwDataMart.dbo.PopulateDateDim '20210101','20501231'
      Exec OMDwDataMart.dbo.PopulateDateDim '20210101','20501231'
    3. rebuild the constraints on all 2021 fact tables by using the following script Run the following on DWRepository, DWDatamart, CMDwDatamart, OMDwDatamart

    declare @objName sysname, @newChk as nvarchar(max)
    declare c cursor local FORWARD_ONLY READ_ONLY for
    select name from sys.sysobjects where xtype='C' and name like '%_2020_Dec_Chk' escape '\' order by 1
    open c; while 1=1 begin; fetch c into @objName if @@Fetch _STATUS<>0 break;
    set @objName = replace(@objName,'_2020_Dec_','_2021_Jan_')
    set @objName = replace(@objName,'_Chk','')
    set @newChk=replace('ALTER TABLE [dbo].[XYZFact_2021_Jan] WITH CHECK ADD CONSTRAINT [XYZFact_2021_Jan_Chk] CHECK (([DateKey]>=(20210101)));ALTER TABLE [dbo].[XYZFact_2021_Jan] CHECK CONSTRAINT [XYZFact_2021_Jan_Chk];','XYZFact_2021_Jan',@objName)
    exec sp_executesql @newChk
    end; close c; deallocate c;

    1. Restart Microsoft Monitoring Agent

    After this I was able to manually start each of the failed jobs, waited for completion, then enabled my job schedules.

    6 people found this answer helpful.

38 additional answers

Sort by: Most helpful
  1. Wyatt Wong 116 Reputation points
    2021-01-20T02:37:10.677+00:00

    @Andrew Gordon I was unable to locate your post. You may contact me directly at

    wyattwong @ outlook . com


  2. Anton Tolmachev 11 Reputation points
    2021-03-03T12:57:17.12+00:00

    Hey again, folks. Almost two months passed after the nasty error with Dates of Dec 2020 and Jan 2021 was fixed, so far so good, all was quiet.
    Recently a new little gem popped up, not 100% percent sure if it's correlated with the Dates initial cause, on the other hand again.. damn Dec 2020 is involved. Got this one at DW server EventLog:
    Unhandled exception in data warehouse maintenance:
    Work item: 198356596
    Maintenance action: PerformWarehouseGrooming Exception details:
    Exception message: ErrorNumber="50000" Message="ErrorNumber="50000" Message="ErrorNumber="547" Message="The ALTER TABLE statement conflicted with the CHECK constraint "ComputerHasPrimaryUserFact_2020_Dec_Chk". The conflict occurred in database "DWRepository", table "dbo.ComputerHasPrimaryUserFact_2020_Dec", column 'DateKey'." Severity="16" State="0" ProcedureName="(null)" LineNumber="1" Task="Executing CHKScriptTemplate"" Severity="18" State="0" ProcedureName="DropCheckConstraintForTable" LineNumber="145" Task="Opening MIN Check constraint for the next Partition"" Severity="18" State="0" ProcedureName="DropPartition" LineNumber="108" Task="Executing groomingStoredProcedure: EXEC etl.DropPartition @WarehouseEntityId=@WarehouseEntityId, @WarehouseEntityType=@WarehouseEntityType, @EntityGuid=@EntityGuid, @PartitionId=@PartitionId, @GroomActiveRelationship=1"

    as per @Wyatt Wong advice i've checked table dbo.ComputerHasPrimaryUserFact_2020_Dec (since the error contains "The ALTER TABLE statement conflicted with the CHECK constraint" as well) to see if any DateKey value for whatever reason is out of the constraint condition (which is ([DateKey]>=(20201201) AND [DateKey]<=(20201231)) - but it's NOT, all the values are inside the range.
    All the DW Jobs in overall (including DWMaintenance itself) DO complete Successfully.
    Not sure at all for now why this is happening and the first Error event was dropped accurately on 1st March..duh.
    Found similar older thread correlated unhandled-exception-in-data-warehouse-maintenance seems someone had that too and couldn't figure out what it is, though all was working in overall as well.
    If someone experiences this as well or got any clue - would be highly appreciated.


  3. Bill Crum 56 Reputation points
    2021-06-10T07:25:04.183+00:00

    So I was very late to the game on this, We dont use SCSM for much anymore, but I just happened to do some windows updates and noticed my DW was broken. Research lead me here, and pursuing the solutions here did not help me much, but I must also say this DW has been jacked up for 2 years, so it has alot MORE wrong with it to, however I couldnt free myself of these unique errors, so I kept working.

    Well, I think I made it worse by customizing the script some, but all in all I couldnt find any bad constraints myself, so I went in search elsewhere and ran across this script below, which was from Microsoft, and it is far better than the ones here from what I can tell.

    Note: There is a Boolean at the top, if you set it at 0 it only runs in practice mode... BUT it will give you a message that there are no errors, THIS IS MISLEADING. I checked all my DBs and it showed good, so I flipped the boolean to 1 to actually let it run, and it reports on how many breaks you have, and I had a LOT. It will tell you to rerun it to check again, and when it runs a pass without any fixes, it does not put all those Altars on the page, just tells you it was good.

    Errors:
    104059-image.png

    Clean Database:
    104060-image.png


  4. Bill Crum 56 Reputation points
    2021-06-10T07:39:20.283+00:00

    104133-image.png

    Here is a screenshot of a clean run of the script with it in ACTIVE mode.... Notice we ONLY see the successful no errors messages? When you run it in test mode, it says no errors also, but for me it had TONs of lines of commands that would fix problems also.

    I am having issues getting the upload to work on this 10kb txt file :(, but if I cant upload it, I'll post it somewhere and link it.

    I hope this helps others like me who arent very adept at SQL and understanding everything involved, I do not know yet if my jobs run, Im just kicking them off, but I do know this script fixed over 1k errors on my DW after I couldnt find ANY bad constraints with my terrible skills.

    0 comments No comments