none
The Custom Field restore fails on 2016 after upgrade from 2013 RRS feed

  • Question

  • Hi,

    After upgrading from 2013 we tried to rebuild the reporting database after seeing foreign key constraint errors when publishing schedules. This normally works. We removed all custom field references from OLAP cube and ran the cube successfully, backed up the custom fields and tried to restore. The error is as follows :-

    General
    • DatabaseForeignKeyViolationError:
      • DatabaseForeignKeyViolationError (50002). Details: id='50002'
        name='DatabaseForeignKeyViolationError'
        uid='146bd36f-f023-e911-b81a-005056b57059'
        .
    • Error:
      • RestoreCustomFieldsFailure (25027). Details: id='25027'
        name='RestoreCustomFieldsFailure'
        uid='156bd36f-f023-e911-b81a-005056b57059'
        projectuid='092eaef7-3d43-497e-a8b6-23f43b40e3c2'
        messagetype='Microsoft.Office.Project.Server.BusinessLayer.QueueMsg.RestoreCustomFieldsTablesMessage'
        messageID='2'
        stage=''
        blocking='DontBlock'
        .
    • Queue:
      • GeneralQueueJobFailed (26000) - RestoreCustomFields.RestoreCustomFieldsTablesMessage. Details: id='26000'
        name='GeneralQueueJobFailed'
        uid='166bd36f-f023-e911-b81a-005056b57059'
        JobUID='a027376b-f023-e911-b81a-005056b57059'
        ComputerName='867339e1-3e3d-400c-bad0-28f97fe6ecdb'
        GroupType='RestoreCustomFields'
        MessageType='RestoreCustomFieldsTablesMessage'
        MessageId='2'
        Stage=''
        CorrelationUID='64cfba9e-3489-10b1-6ecd-b46cd4b02b13'
        For more details, check the ULS logs on machine 867339e1-3e3d-400c-bad0-28f97fe6ecdb for entries with JobUID a027376b-f023-e911-b81a-005056b57059.
    • The ULS logs show

    System.Data.SqlClient.SqlException (0x80131904): The DELETE statement conflicted with the REFERENCE constraint "FK_MSP_WORKFLOW_STAGE_CUSTOM_FIELDS_2_MSP_CUSTOM_FIELDS". The conflict occurred in database "XXXX_WSS_Content_PWA", table "pjpub.MSP_WORKFLOW_STAGE_CUSTOM_FIELDS".  The statement has been terminated. 

    the problem seems to be when [MSP_RESTORE_CUSTOM_FIELDS store procedured tries to delete  using statement DELETE FROM pjpub.MSP_TVF_CUSTOM_FIELDS(@siteId) and the foreign key violation takes place.

    Does anyone know how to clear this?

    Many thanks

    Paul


    • Edited by PJS1961 Tuesday, January 29, 2019 7:39 PM
    Tuesday, January 29, 2019 7:37 PM

All replies

  • I would look carefully at the project schedule that is related to projectuid='092eaef7-3d43-497e-a8b6-23f43b40e3c2'  and see you find anything odd with the custom fields and the data that it shows.  Edit custom fields and replacw with the same values, save and publish.  Then try rebuilding.

    Also,  might try rebuilding OLAP cube without a restore and see if it completes.

    Finally, its hard to determine the problem and would open a trouble ticket with Microsoft.  They have tools to verify the sanity of databases.  If they fix, update forum on how it was fixed.


    Michael Wharton, Project MVP, MBA, PMP and a Great Guy <br/> Website http://www.WhartonComputer.com <br/> Blog http://MyProjectExpert.com contains my field notes and SQL queries

    Monday, February 11, 2019 5:19 PM
    Moderator