locked
The INSERT statement conflicted with the FOREIGN KEY constraint "FK_MSP_EpmTaskBaseline_ProjectUID_TaskUID". RRS feed

  • Question

  • Hi,

    I'm using Project Server 2010 and I have a Foreign Key error.

    The error is:

    General
    Reporting message processor failed:
    ReportingProjectChangeMessageFailed (24006) - The INSERT statement conflicted with the FOREIGN KEY constraint "FK_MSP_EpmTaskBaseline_ProjectUID_TaskUID". The conflict occurred in database "PWA_ProjectServer_Reporting", table "dbo.MSP_EpmTask". The statement has been terminated.. Details: id='24006' name='ReportingProjectChangeMessageFailed' uid='4f4e114a-9421-4754-8c8a-33037f270c1b' QueueMessageBody='Project UID='2b13f7e1-9117-47c5-ab40-9a28c38b036b'. PublishType='ProjectPublish'' Error='The INSERT statement conflicted with the FOREIGN KEY constraint "FK_MSP_EpmTaskBaseline_ProjectUID_TaskUID". The conflict occurred in database "PWA_ProjectServer_Reporting", table "dbo.MSP_EpmTask". The statement has been terminated.'.
    ReportingProjectChangeMessageFailed (24006) - The INSERT statement conflicted with the FOREIGN KEY constraint "FK_MSP_EpmTaskBaseline_ProjectUID_TaskUID". The conflict occurred in database "PWA_ProjectServer_Reporting", table "dbo.MSP_EpmTask". The statement has been terminated.. Details: id='24006' name='ReportingProjectChangeMessageFailed' uid='679071fb-2329-4084-b4d0-43e0b4ab20e0' QueueMessageBody='Project UID='2b13f7e1-9117-47c5-ab40-9a28c38b036b'. PublishType='ProjectPublish'' Error='The INSERT statement conflicted with the FOREIGN KEY constraint "FK_MSP_EpmTaskBaseline_ProjectUID_TaskUID". The conflict occurred in database "PWA_ProjectServer_Reporting", table "dbo.MSP_EpmTask". The statement has been terminated.'.
    ReportingProjectChangeMessageFailed (24006) - The INSERT statement conflicted with the FOREIGN KEY constraint "FK_MSP_EpmTaskBaseline_ProjectUID_TaskUID". The conflict occurred in database "PWA_ProjectServer_Reporting", table "dbo.MSP_EpmTask". The statement has been terminated.. Details: id='24006' name='ReportingProjectChangeMessageFailed' uid='84a834e7-77a9-46a2-9f33-08f98c2131d9' QueueMessageBody='Project UID='2b13f7e1-9117-47c5-ab40-9a28c38b036b'. PublishType='ProjectPublish'' Error='The INSERT statement conflicted with the FOREIGN KEY constraint "FK_MSP_EpmTaskBaseline_ProjectUID_TaskUID". The conflict occurred in database "PWA_ProjectServer_Reporting", table "dbo.MSP_EpmTask". The statement has been terminated.'.
    ReportingProjectChangeMessageFailed (24006) - The INSERT statement conflicted with the FOREIGN KEY constraint "FK_MSP_EpmTaskBaseline_ProjectUID_TaskUID". The conflict occurred in database "PWA_ProjectServer_Reporting", table "dbo.MSP_EpmTask". The statement has been terminated.. Details: id='24006' name='ReportingProjectChangeMessageFailed' uid='89277460-bbff-4bce-8b23-6a6245cb3266' QueueMessageBody='Project UID='2b13f7e1-9117-47c5-ab40-9a28c38b036b'. PublishType='ProjectPublish'' Error='The INSERT statement conflicted with the FOREIGN KEY constraint "FK_MSP_EpmTaskBaseline_ProjectUID_TaskUID". The conflict occurred in database "PWA_ProjectServer_Reporting", table "dbo.MSP_EpmTask". The statement has been terminated.'.
    ReportingProjectChangeMessageFailed (24006) - The INSERT statement conflicted with the FOREIGN KEY constraint "FK_MSP_EpmTaskBaseline_ProjectUID_TaskUID". The conflict occurred in database "PWA_ProjectServer_Reporting", table "dbo.MSP_EpmTask". The statement has been terminated.. Details: id='24006' name='ReportingProjectChangeMessageFailed' uid='645efe49-a216-4b05-9624-9516d5b32ac9' QueueMessageBody='Project UID='2b13f7e1-9117-47c5-ab40-9a28c38b036b'. PublishType='ProjectPublish'' Error='The INSERT statement conflicted with the FOREIGN KEY constraint "FK_MSP_EpmTaskBaseline_ProjectUID_TaskUID". The conflict occurred in database "PWA_ProjectServer_Reporting", table "dbo.MSP_EpmTask". The statement has been terminated.'.
    ReportingProjectChangeMessageFailed (24006) - The INSERT statement conflicted with the FOREIGN KEY constraint "FK_MSP_EpmTaskBaseline_ProjectUID_TaskUID". The conflict occurred in database "PWA_ProjectServer_Reporting", table "dbo.MSP_EpmTask". The statement has been terminated.. Details: id='24006' name='ReportingProjectChangeMessageFailed' uid='fab8161e-ca04-4109-a002-bf76e153f1b9' QueueMessageBody='Project UID='2b13f7e1-9117-47c5-ab40-9a28c38b036b'. PublishType='ProjectPublish'' Error='The INSERT statement conflicted with the FOREIGN KEY constraint "FK_MSP_EpmTaskBaseline_ProjectUID_TaskUID". The conflict occurred in database "PWA_ProjectServer_Reporting", table "dbo.MSP_EpmTask". The statement has been terminated.'.
    Queue:
    GeneralQueueJobFailed (26000) - ReportingProjectPublish.ReportProjectPublishMessageEx. Details: id='26000' name='GeneralQueueJobFailed' uid='7e955990-61c4-4b98-89a9-6cfc8721e776' JobUID='70e0402b-d7f1-49c9-825a-765dc9dae5ce' ComputerName='CUESTOR' GroupType='ReportingProjectPublish' MessageType='ReportProjectPublishMessageEx' MessageId='1' Stage=''. For more details, check the ULS logs on machine CUESTOR for entries with JobUID 70e0402b-d7f1-49c9-825a-765dc9dae5ce.

    ----------------------------------

    On the other hand I've been looking inside the Database and running this query:

    use PWA_ProjectServer_Published

    select proj_uid, Task_uid, task_name from msp_tasks where proj_uid='2b13f7e1-9117-47c5-ab40-9a28c38b036b'

    I obtain a lot of records, but the three first records have a NULL name, as you can see below:

    2B13F7E1-9117-47C5-AB40-9A28C38B036B A0CB8B77-2A8C-436D-0000-0000000000FF NULL
    2B13F7E1-9117-47C5-AB40-9A28C38B036B A0CB8B79-2A8C-436D-0000-0000000000FF NULL
    2B13F7E1-9117-47C5-AB40-9A28C38B036B A0CB8B78-2A8C-436D-0000-0000000000FF NULL
    2B13F7E1-9117-47C5-AB40-9A28C38B036B 59059F36-374C-4A93-9E34-72FC47BF80A4 HHT Implementation Dom Rep
    2B13F7E1-9117-47C5-AB40-9A28C38B036B CC5CCA2B-CBE1-485E-92C0-9B2EC3600FA2 Initiation
    2B13F7E1-9117-47C5-AB40-9A28C38B036B 431D09C9-8285-436E-A885-1CBC4C4DD30C Planning
    2B13F7E1-9117-47C5-AB40-9A28C38B036B B9E69A66-ED36-452E-ADE3-F48FCD55DEA9 Development
    2B13F7E1-9117-47C5-AB40-9A28C38B036B 878D2993-254E-4950-BE7B-08DC2BB074DB Testing
    2B13F7E1-9117-47C5-AB40-9A28C38B036B F70A32D9-E56F-467C-A9F5-2A23B063461C Cardnet certification process

    .......

    and these three records don't exist in the project, I've checked that all the lines have correct information, and there is no blank/null line.

    Please, can you help on that issue?

    Thank you and regards,

    José Espases

    Tuesday, April 26, 2011 2:24 PM

Answers

  • Gary and all, we have seen these occurences on several occasions and as this issue is not caused by data in the reporting database rebuilding that will have no effect. As we see there are two possible ways to resolve such issues:

    1. Rebuild the baseline data in Project Pro

    2. Delete from the databases as Alexander has done

    The first solution has been tried out by us by copying baseline 0 to baseline 10, deleting baseline 0 and then copying back baseline 10 to baseline 0. This has worked, but the problem seems to sometimes return.

    The second solution basically does the same thing, but directly on the data. We are always very wary of doing data manipulations directly in the databases as one can never know 100% what the consequences are without having the detailed knowledge of the complete database design.

    The real solution is of course that MS sits up and takes notice and ensure that the same criteria is handled for storing baseline data in the Draft, Published and Reporting databases. Now it allows data in Draft and Published that cannot be stored onto the Reporting databases and that is what is causing these failures.


    Regards, Stig

    Friday, February 24, 2012 9:57 AM
  • Hi,

    This was fixed on Project 2010 June CU, although the cleanup described here is still needed.

    Hope you find this information helpful.

    Tuesday, July 17, 2012 8:57 PM
  • I faced the same error twice. First I used the following sql script:

     

    declare @proj nvarchar (50)
    
    set @proj = '45c10fab-ee2a-481c-sb12-c26132y7d5a6'
    
    delete  from ProjectServer_Draft.dbo.MSP_TASK_BASELINES
    where ProjectServer_Draft.dbo.MSP_TASK_BASELINES.PROJ_UID = @proj
    	and ProjectServer_Draft.dbo.MSP_TASK_BASELINES.TASK_UID NOT IN
    	(
    		select TASK_UID
    		from ProjectServer_Draft.dbo.MSP_TASKS 
    		where PROJ_UID =@proj
    	)
     
    
    delete  from ProjectServer_Published.dbo.MSP_TASK_BASELINES
    where ProjectServer_Published.dbo.MSP_TASK_BASELINES.PROJ_UID = @proj
    	and ProjectServer_Published.dbo.MSP_TASK_BASELINES.TASK_UID NOT IN
    	(
    		select TASK_UID
    		from ProjectServer_Published.dbo.MSP_TASKS 
    		where PROJ_UID =@proj
    	)
    

    It deleted about 4 records and the problem was fixed. And now (after a couple of months) I came across this error again. This time about 1000 DB records should be deleted for another project using the above script. It doesn't seem to be a good solution now. I even doubt it is a solution at all.

     

    So my question: Has anyone found the solution for this error except backup/restore of Enterprise custom fields or delete/save_locally/republish of problematic project? Or maybe somebody could just list the possible causes of this problem?

    Thanks


    Wednesday, January 18, 2012 1:24 PM

All replies

  • Jose:

    Try rebuilding the reporting database by taking an administrative backup of your enterprise custom fields and then use the restore feature to restore them. This will force a rebuild of the reporting database. Make sure that there aren't any blank task names in any projects, though. These do cause all sorts of problems. Make sure that you scroll down in your projects as I see people accidentally create them when they scroll past the active tasks.


    Gary Chefetz, MCITP, MCP, MVP msProjectExperts
    Project and Project ServerFAQs
    Project Server Help BLOG
    Tuesday, April 26, 2011 2:44 PM
  • Hi Gary,

    I'm a little bit worried because I did an Administrative Backup of Enterprise Custom Fields and then I restore them, I got a lot of cancelled jobs in the queue, and this morning I've seen that the size of the backup file has decreased a lot, 2 days ago was 743736 Kb and yesterday was 71992 Kb.

    The backup I did was only Enterprise Custom Fields, and the restore was only Enterprise Custom Fields.

    What do you suggest I can do, I think that if I restore again I will have the same problem.

    The cancelled jobs looked like this:

    N/A Timesheet 26/04/2011 17:39 26/04/2011 17:39 N/A Reporting (Timesheet Assignments Refresh) Cancelled 100% José Espases
    <input title="Row 5" name="ctl00$ctl00$PlaceHolderMain$PWA_PlaceHolderMain$JobsGrid$ctl06$ctl00" type="checkbox" tabindex="0" /> N/A Project 26/04/2011 17:34 26/04/2011 17:34 N/A Reporting (Committed Portfolio Selection Scenarios Decision Sync) Cancelled 100% José Espases
    <input title="Row 6" name="ctl00$ctl00$PlaceHolderMain$PWA_PlaceHolderMain$JobsGrid$ctl07$ctl00" type="checkbox" tabindex="0" /> N/A Project 26/04/2011 17:34 26/04/2011 17:34 N/A Reporting (Committed Portfolio Selection Scenarios Decision Sync) Cancelled 0% José Espases
    <input title="Row 7" name="ctl00$ctl00$PlaceHolderMain$PWA_PlaceHolderMain$JobsGrid$ctl08$ctl00" type="checkbox" tabindex="0" /> N/A Project 26/04/2011 17:34 26/04/2011 17:34 N/A Reporting (Committed Portfolio Selection Scenarios Decision Sync) Cancelled 0% José Espases
    <input title="Row 8" name="ctl00$ctl00$PlaceHolderMain$PWA_PlaceHolderMain$JobsGrid$ctl09$ctl00" type="checkbox" tabindex="0" /> N/A Project 26/04/2011 17:34 26/04/2011 17:34 N/A Reporting (Committed Portfolio Selection Scenarios Decision Sync) Cancelled 0% José Espases
    <input title="Row 9" name="ctl00$ctl00$PlaceHolderMain$PWA_PlaceHolderMain$JobsGrid$ctl10$ctl00" type="checkbox" tabindex="0" /> N/A Project 26/04/2011 17:34 26/04/2011 17:34 N/A Reporting (Committed Portfolio Selection Scenarios Decision Sync) Cancelled 0% José Espases
    <input title="Row 10" name="ctl00$ctl00$PlaceHolderMain$PWA_PlaceHolderMain$JobsGrid$ctl11$ctl00" type="checkbox" tabindex="0" /> N/A Project 26/04/2011 17:34 26/04/2011 17:34 N/A Reporting (Committed Portfolio Selection Scenarios Decision Sync) Cancelled 0% José Espases
    <input title="Row 11" name="ctl00$ctl00$PlaceHolderMain$PWA_PlaceHolderMain$JobsGrid$ctl12$ctl00" type="checkbox" tabindex="0" /> N/A Project 26/04/2011 17:34 26/04/2011 17:34 N/A Reporting (Committed Portfolio Selection Scenarios Decision Sync) Cancelled 0% José Espases
    <input title="Row 12" name="ctl00$ctl00$PlaceHolderMain$PWA_PlaceHolderMain$JobsGrid$ctl13$ctl00" type="checkbox" tabindex="0" /> N/A Project 26/04/2011 17:34 26/04/2011 17:34 N/A Reporting (Committed Portfolio Selection Scenarios Decision Sync) Cancelled 0% José Espases
    <input title="Row 13" name="ctl00$ctl00$PlaceHolderMain$PWA_PlaceHolderMain$JobsGrid$ctl14$ctl00" type="checkbox" tabindex="0" /> N/A Project 26/04/2011 17:34 26/04/2011 17:34 N/A Reporting (Committed Portfolio Selection Scenarios Decision Sync) Cancelled 0% José Espases
    <input title="Row 14" name="ctl00$ctl00$PlaceHolderMain$PWA_PlaceHolderMain$JobsGrid$ctl15$ctl00" type="checkbox" tabindex="0" /> N/A Project 26/04/2011 17:29 26/04/2011 17:29 N/A Reporting (Project Publish) Cancelled 100% José Espases
    <input title="Row 15" name="ctl00$ctl00$PlaceHolderMain$PWA_PlaceHolderMain$JobsGrid$ctl16$ctl00" type="checkbox" tabindex="0" /> N/A Project 26/04/2011 17:29 26/04/2011 17:29 N/A Reporting (Project Publish) Cancelled 100% José Espases
    <input title="Row 16" name="ctl00$ctl00$PlaceHolderMain$PWA_PlaceHolderMain$JobsGrid$ctl17$ctl00" type="checkbox" tabindex="0" /> N/A Project 26/04/2011 17:29 26/04/2011 17:29 N/A Reporting (Project Publish) Cancelled 100% José Espases
    <input title="Row 17" name="ctl00$ctl00$PlaceHolderMain$PWA_PlaceHolderMain$JobsGrid$ctl18$ctl00" type="checkbox" tabindex="0" /> N/A Project 26/04/2011 17:29 26/04/2011 17:29 N/A Reporting (Project Publish) Cancelled 100% José Espases
    <input title="Row 18" name="ctl00$ctl00$PlaceHolderMain$PWA_PlaceHolderMain$JobsGrid$ctl19$ctl00" type="checkbox" tabindex="0" /> N/A Project 26/04/2011 17:29 26/04/2011 17:29 N/A Reporting (Project Publish) Cancelled 100% José Espases
    <input title="Row 19" name="ctl00$ctl00$PlaceHolderMain$PWA_PlaceHolderMain$JobsGrid$ctl20$ctl00" type="checkbox" tabindex="0" /> N/A Project 26/04/2011 17:29 26/04/2011 17:29 N/A Reporting (Project Publish) Cancelled 100% José Espases
    <input title="Row 20" name="ctl00$ctl00$PlaceHolderMain$PWA_PlaceHolderMain$JobsGrid$ctl21$ctl00" type="checkbox" tabindex="0" /> N/A Project 26/04/2011 17:29 26/04/2011 17:29 N/A Reporting (Project Publish) Cancelled 100% José Espases
    <input title="Row 21" name="ctl00$ctl00$PlaceHolderMain$PWA_PlaceHolderMain$JobsGrid$ctl22$ctl00" type="checkbox" tabindex="0" /> N/A Project 26/04/2011 17:29 26/04/2011 17:29 N/A Reporting (Project Publish) Cancelled 100% José Espases
    <input title="Row 22" name="ctl00$ctl00$PlaceHolderMain$PWA_PlaceHolderMain$JobsGrid$ctl23$ctl00" type="checkbox" tabindex="0" /> N/A Project 26/04/2011 17:29 26/04/2011 17:29 N/A Reporting (Project Publish) Cancelled 100% José Espases
    <input title="Row 23" name="ctl00$ctl00$PlaceHolderMain$PWA_PlaceHolderMain$JobsGrid$ctl24$ctl00" type="checkbox" tabindex="0" /> N/A Project 26/04/2011 17:29 26/04/2011 17:29 N/A Reporting (Project Publish) Cancelled 100% José Espases
    <input title="Row 24" name="ctl00$ctl00$PlaceHolderMain$PWA_PlaceHolderMain$JobsGrid$ctl25$ctl00" type="checkbox" tabindex="0" /> N/A Project 26/04/2011 17:29 26/04/2011 17:29 N/A Reporting (Project Publish) Cancelled 100% José Espases
    <input title="Row 25" name="ctl00$ctl00$PlaceHolderMain$PWA_PlaceHolderMain$JobsGrid$ctl26$ctl00" type="checkbox" tabindex="0" /> N/A Project 26/04/2011 17:29 26/04/2011 17:29 N/A Reporting (Project Publish) Cancelled 100% José Espases
    <input title="Row 26" name="ctl00$ctl00$PlaceHolderMain$PWA_PlaceHolderMain$JobsGrid$ctl27$ctl00" type="checkbox" tabindex="0" /> N/A Project 26/04/2011 17:29 26/04/2011 17:29 N/A Reporting (Project Publish) Cancelled 100% José Espases
    <input title="Row 27" name="ctl00$ctl00$PlaceHolderMain$PWA_PlaceHolderMain$JobsGrid$ctl28$ctl00" type="checkbox" tabindex="0" /> N/A Project 26/04/2011 17:29 26/04/2011 17:29 N/A Reporting (Project Publish) Cancelled 100% José Espases
    <input title="Row 28" name="ctl00$ctl00$PlaceHolderMain$PWA_PlaceHolderMain$JobsGrid$ctl29$ctl00" type="checkbox" tabindex="0" /> N/A Project 26/04/2011 17:29 26/04/2011 17:29 N/A Reporting (Project Publish) Cancelled 100% José Espases
    <input title="Row 29" name="ctl00$ctl00$PlaceHolderMain$PWA_PlaceHolderMain$JobsGrid$ctl30$ctl00" type="checkbox" tabindex="0" /> N/A Project 26/04/2011 17:29 26/04/2011 17:29 N/A Reporting (Project Publish) Cancelled 100% José Espases
    <input title="Row 30" name="ctl00$ctl00$PlaceHolderMain$PWA_PlaceHolderMain$JobsGrid$ctl31$ctl00" type="checkbox" tabindex="0" /> N/A Project 26/04/2011 17:29 26/04/2011 17:29 N/A Reporting (Project Publish) Cancelled 100% José Espases
    <input title="Row 31" name="ctl00$ctl00$PlaceHolderMain$PWA_PlaceHolderMain$JobsGrid$ctl32$ctl00" type="checkbox" tabindex="0" /> N/A Project 26/04/2011 17:29 26/04/2011 17:29 N/A Reporting (Project Publish) Cancelled 100% José Espases
    <input title="Row 32" name="ctl00$ctl00$PlaceHolderMain$PWA_PlaceHolderMain$JobsGrid$ctl33$ctl00" type="checkbox" tabindex="0" /> N/A Project 26/04/2011 17:29 26/04/2011 17:29 N/A Reporting (Project Publish) Cancelled 100% José Espases
    <input title="Row 33" name="ctl00$ctl00$PlaceHolderMain$PWA_PlaceHolderMain$JobsGrid$ctl34$ctl00" type="checkbox" tabindex="0" /> N/A Project 26/04/2011 17:29 26/04/2011 17:29 N/A Reporting (Project Publish) Cancelled 100% José Espases
    <input title="Row 34" name="ctl00$ctl00$PlaceHolderMain$PWA_PlaceHolderMain$JobsGrid$ctl35$ctl00" type="checkbox" tabindex="0" /> N/A Project 26/04/2011 17:29 26/04/2011 17:29 N/A Reporting (Project Publish) Cancelled 100% José Espases
    <input title="Row 35" name="ctl00$ctl00$PlaceHolderMain$PWA_PlaceHolderMain$JobsGrid$ctl36$ctl00" type="checkbox" tabindex="0" /> N/A Project 26/04/2011 17:29 26/04/2011 17:29 N/A Reporting (Project Publish) Cancelled 100% José Espases
    <input title="Row 36" name="ctl00$ctl00$PlaceHolderMain$PWA_PlaceHolderMain$JobsGrid$ctl37$ctl00" type="checkbox" tabindex="0" /> N/A Project 26/04/2011 17:29 26/04/2011 17:29 N/A Reporting (Project Publish) Cancelled 100% José Espases
    <input title="Row 37" name="ctl00$ctl00$PlaceHolderMain$PWA_PlaceHolderMain$JobsGrid$ctl38$ctl00" type="checkbox" tabindex="0" /> N/A Project 26/04/2011 17:29 26/04/2011 17:29 N/A Reporting (Project Publish) Cancelled 100% José Espases
    <input title="Row 38" name="ctl00$ctl00$PlaceHolderMain$PWA_PlaceHolderMain$JobsGrid$ctl39$ctl00" type="checkbox" tabindex="0" /> N/A Project 26/04/2011 17:29 26/04/2011 17:29 N/A Reporting (Project Publish) Cancelled 100% José Espases
    <input title="Row 39" name="ctl00$ctl00$PlaceHolderMain$PWA_PlaceHolderMain$JobsGrid$ctl40$ctl00" type="checkbox" tabindex="0" /> N/A Project 26/04/2011 17:29 26/04/2011 17:29 N/A Reporting (Project Publish) Cancelled 100% José Espases
    <input title="Row 40" name="ctl00$ctl00$PlaceHolderMain$PWA_PlaceHolderMain$JobsGrid$ctl41$ctl00" type="checkbox" tabindex="0" /> N/A

    Project

     

    26/04/2011 17:29 26/04/2011 17:29 N/A Reporting (Project Publish) Cancelled 100% José Espases
    Wednesday, April 27, 2011 7:16 AM
  • Jose:

    It looks like you copied this from the queue management page, which doesn't give us much to go on. The null task names are a problem if they exist in Published database, even if they are orphans. Can you have a look at the ULS logs for corresponding errors?


    Gary Chefetz, MCITP, MCP, MVP msProjectExperts
    Project and Project ServerFAQs
    Project Server Help BLOG
    Wednesday, April 27, 2011 12:13 PM
  • Jose:

    It looks like you copied this from the queue management page, which doesn't give us much to go on. The null task names are a problem if they exist in Published database, even if they are orphans. Can you have a look at the ULS logs for corresponding errors?


    Gary Chefetz, MCITP, MCP, MVP msProjectExperts
    Project and Project ServerFAQs
    Project Server Help BLOG
    Wednesday, April 27, 2011 12:13 PM
  • Hi Gary,

    yes, I copied it from the queue management page, just to show what is happening now.

    This is what I have found in the ULS logs regarding to one of the project that I saved and published:

    04/27/2011 15:39:17.59  Microsoft.Office.Project.Server (0x0C70) 0x1EB0 Project Server                 General                        8ym5 Monitorable PWA:http://projectserver/PWA, ServiceApp:Project Server Service Application, User:ODS\jespases, PSI: SqlException occurred in DAL:  <Error><Class>0</Class><LineNumber>7</LineNumber><Number>547</Number><Procedure>MSP_Epm_SetEnterpriseProjectType</Procedure>  <Message>  System.Data.SqlClient.SqlError: The UPDATE statement conflicted with the FOREIGN KEY constraint "FK_MSP_EpmProject_MSP_EpmEnterpriseProjectType". The conflict occurred in database "PWA_ProjectServer_Reporting", table "dbo.MSP_EpmEnterpriseProjectType", column 'EnterpriseProjectTypeUID'.  </Message>  <CallStack>     at System.Data.SqlClient.SqlConnection.OnError(SqlException exception, Boolean breakConnection)     at System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject stateObj)     at System.Data.SqlC... 12917df7-8ff6-459f-8086-ceda0def6e7b

    04/27/2011 15:39:17.59* Microsoft.Office.Project.Server (0x0C70) 0x1EB0 Project Server                 General                        8ym5 Monitorable ...lient.TdsParser.Run(RunBehavior runBehavior, SqlCommand cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet bulkCopyHandler, TdsParserStateObject stateObj)     at System.Data.SqlClient.SqlCommand.FinishExecuteReader(SqlDataReader ds, RunBehavior runBehavior, String resetOptionsString)     at System.Data.SqlClient.SqlCommand.RunExecuteReaderTds(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, Boolean async)     at System.Data.SqlClient.SqlCommand.RunExecuteReader(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, String method, DbAsyncResult result)     at System.Data.SqlClient.SqlCommand.InternalExecuteNonQuery(DbAsyncResult result, String methodName, Boolean sendToPipe)     at System.Data.SqlClient.SqlCommand.ExecuteNonQuery() ... 12917df7-8ff6-459f-8086-ceda0def6e7b

    04/27/2011 15:39:17.59* Microsoft.Office.Project.Server (0x0C70) 0x1EB0 Project Server                 General                        8ym5 Monitorable ...    at Microsoft.Office.Project.Server.DataAccessLayer.DAL.SubDal.ExecuteStoredProcedureNoResult(String storedProcedureName, SqlParameter[] parameters)  </CallStack>  </Error> 12917df7-8ff6-459f-8086-ceda0def6e7b

    04/27/2011 15:39:17.59  Microsoft.Office.Project.Server (0x0C70) 0x1EB0 Project Server                 General                        8ym5 Monitorable PWA:http://projectserver/PWA, ServiceApp:Project Server Service Application, User:ODS\jespases, PSI: SqlException occurred in DAL:  <Error><Class>0</Class><LineNumber>7</LineNumber><Number>3621</Number><Procedure>MSP_Epm_SetEnterpriseProjectType</Procedure>  <Message>  System.Data.SqlClient.SqlError: The statement has been terminated.  </Message>  <CallStack>     at System.Data.SqlClient.SqlConnection.OnError(SqlException exception, Boolean breakConnection)     at System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject stateObj)     at System.Data.SqlClient.TdsParser.Run(RunBehavior runBehavior, SqlCommand cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet bulkCopyHandler, TdsParserStateObject stateObj)     at System.Data.SqlClient.SqlCommand.FinishExecuteR... 12917df7-8ff6-459f-8086-ceda0def6e7b

    04/27/2011 15:39:17.59* Microsoft.Office.Project.Server (0x0C70) 0x1EB0 Project Server                 General                        8ym5 Monitorable ...eader(SqlDataReader ds, RunBehavior runBehavior, String resetOptionsString)     at System.Data.SqlClient.SqlCommand.RunExecuteReaderTds(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, Boolean async)     at System.Data.SqlClient.SqlCommand.RunExecuteReader(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, String method, DbAsyncResult result)     at System.Data.SqlClient.SqlCommand.InternalExecuteNonQuery(DbAsyncResult result, String methodName, Boolean sendToPipe)     at System.Data.SqlClient.SqlCommand.ExecuteNonQuery()     at Microsoft.Office.Project.Server.DataAccessLayer.DAL.SubDal.ExecuteStoredProcedureNoResult(String storedProcedureName, SqlParameter[] parameters)  </CallStack>  </Error> 12917df7-8ff6-459f-8086-ceda0def6e7b

    04/27/2011 15:39:17.59  Microsoft.Office.Project.Server (0x0C70) 0x1EB0 Project Server                 Reporting                      9i7f Monitorable Error is: ReportingProjectWorkflowInformationSyncMessageFailed. Details: Attributes:  Workflow Information and Enterprise Project Type Sync (ProjectUID = 2b13f7e1-9117-47c5-ab40-9a28c38b036b)  The UPDATE statement conflicted with the FOREIGN KEY constraint "FK_MSP_EpmProject_MSP_EpmEnterpriseProjectType". The conflict occurred in database "PWA_ProjectServer_Reporting", table "dbo.MSP_EpmEnterpriseProjectType", column 'EnterpriseProjectTypeUID'.  The statement has been terminated.  . Standard Information: PSI Entry Point:   Project User: ODS\jespases  Correlation Id: 12917df7-8ff6-459f-8086-ceda0def6e7b  PWA Site URL: http://projectserver/PWA  SSP Name: Project Server Service Application  PSError: ReportingProjectWorkflowInformationSyncMessageFailed (24028) 12917df7-8ff6-459f-8086-ceda0def6e7b

    04/27/2011 15:39:17.67  Microsoft.Office.Project.Server (0x0C70) 0x0E64 Project Server                 Queue                          cf0l Monitorable Error is: GeneralQueueJobFailed. Details: Attributes:  1e8b8abe-d787-462a-9ab3-c3a0c49606c3  CUESTOR  ReportWorkflowProjectDataSync  ReportWorkflowProjectDataSyncMessage  1    . Standard Information: PSI Entry Point:   Project User: ODS\jespases  Correlation Id: 12917df7-8ff6-459f-8086-ceda0def6e7b  PWA Site URL: http://projectserver/PWA  SSP Name: Project Server Service Application  PSError: GeneralQueueJobFailed (26000) d9a789af-fcc5-4d06-89d6-1a8aa9373b7b

    I don't really know what to do.

    Regards,

    José Espases

     

    Wednesday, April 27, 2011 1:44 PM
  • And this is what I get in my e-mail:

    The errors returned from the queue are as follows:
    Error ID: 26000

    Detailed error below - send it to the administrator for more detailed troubleshooting.

    <?xml version="1.0" encoding="utf-16"?>
    <errinfo>
    <general>
    <class name="Queue">
    <error id="26000" name="GeneralQueueJobFailed" uid="6be9fa16-0e4c-414c-b295-d9a12ace8aca" JobUID="1e8b8abe-d787-462a-9ab3-c3a0c49606c3" ComputerName="CUESTOR" GroupType="ReportWorkflowProjectDataSync" MessageType="ReportWorkflowProjectDataSyncMessage" MessageId="1" Stage="" />
    </class>
    </general>
    </errinfo>

    You can do the following:
    1. Try troubleshooting using the error IDs, error XML.
    2. Contact administrator with your jobID (1e8b8abe-d787-462a-9ab3-c3a0c49606c3) and error XML.

     

    Regards,

    José Espases

     

    • Marked as answer by José Espases Friday, May 6, 2011 8:08 AM
    • Unmarked as answer by José Espases Wednesday, February 22, 2012 10:37 AM
    Wednesday, April 27, 2011 1:45 PM
  • Any one got the solution for the same error.
    Friday, September 23, 2011 5:46 AM
  • I faced the same error twice. First I used the following sql script:

     

    declare @proj nvarchar (50)
    
    set @proj = '45c10fab-ee2a-481c-sb12-c26132y7d5a6'
    
    delete  from ProjectServer_Draft.dbo.MSP_TASK_BASELINES
    where ProjectServer_Draft.dbo.MSP_TASK_BASELINES.PROJ_UID = @proj
    	and ProjectServer_Draft.dbo.MSP_TASK_BASELINES.TASK_UID NOT IN
    	(
    		select TASK_UID
    		from ProjectServer_Draft.dbo.MSP_TASKS 
    		where PROJ_UID =@proj
    	)
     
    
    delete  from ProjectServer_Published.dbo.MSP_TASK_BASELINES
    where ProjectServer_Published.dbo.MSP_TASK_BASELINES.PROJ_UID = @proj
    	and ProjectServer_Published.dbo.MSP_TASK_BASELINES.TASK_UID NOT IN
    	(
    		select TASK_UID
    		from ProjectServer_Published.dbo.MSP_TASKS 
    		where PROJ_UID =@proj
    	)
    

    It deleted about 4 records and the problem was fixed. And now (after a couple of months) I came across this error again. This time about 1000 DB records should be deleted for another project using the above script. It doesn't seem to be a good solution now. I even doubt it is a solution at all.

     

    So my question: Has anyone found the solution for this error except backup/restore of Enterprise custom fields or delete/save_locally/republish of problematic project? Or maybe somebody could just list the possible causes of this problem?

    Thanks


    Wednesday, January 18, 2012 1:24 PM
  • Gary and all, we have seen these occurences on several occasions and as this issue is not caused by data in the reporting database rebuilding that will have no effect. As we see there are two possible ways to resolve such issues:

    1. Rebuild the baseline data in Project Pro

    2. Delete from the databases as Alexander has done

    The first solution has been tried out by us by copying baseline 0 to baseline 10, deleting baseline 0 and then copying back baseline 10 to baseline 0. This has worked, but the problem seems to sometimes return.

    The second solution basically does the same thing, but directly on the data. We are always very wary of doing data manipulations directly in the databases as one can never know 100% what the consequences are without having the detailed knowledge of the complete database design.

    The real solution is of course that MS sits up and takes notice and ensure that the same criteria is handled for storing baseline data in the Draft, Published and Reporting databases. Now it allows data in Draft and Published that cannot be stored onto the Reporting databases and that is what is causing these failures.


    Regards, Stig

    Friday, February 24, 2012 9:57 AM
  • Hi Stig,

    I agree with you, that option 1 is the preferable solution - from my point of view. It also worked for me, when having this issue once.

    Regards
    Barbara


    P.s.: Just last week was only deletion working. Tried everything else before, with no success. But it is still not my preferred solution.
    Friday, February 24, 2012 12:48 PM
  • Hi,

    This was fixed on Project 2010 June CU, although the cleanup described here is still needed.

    Hope you find this information helpful.

    Tuesday, July 17, 2012 8:57 PM
  • In my case a user had a task and a sub-task with the same exact name.  Only one of these made it into the task table.  I had the user rename the sub-task and then I was able to publish the schedule. 
    Thursday, August 2, 2012 8:50 PM
  • Hi All,

    There is an
    easy and much simpler solution to this issue.

    1. Open the plan using MSP from the server (in connected mode of course :-))

    2. Save the plan locally ( in your desktop/laptop)

    3. Close the plan + discard any changes in the plan to the server.

    4. Ensure the server version of the project/plan is checked-in .

    5. Open the local copy of the plan ( stored by step 2).

    6. Publish the plan (local copy) to the sever (over writing the existing server copy)

    If published successfully, the issue is resolved. In this approach, Project Server rewrites all records of the project in the server. Otherwise, it tries to update existing records or tries for incremental updates.

    Cheers
    & all the best !!


    • Edited by anpm Friday, January 4, 2013 6:44 AM
    Friday, January 4, 2013 6:42 AM
  • Hi,

    be careful with this solution. When you are working with timesheet, this is not the best solution. By overwriting the project by a local copy will generate new GUIDs for tasks and assignments. So you will have difficulties to generate reports based in timesheets and projects afterwards.

    My suggestion: Apply at least CU June 2012 and correct the issue as described by Alexander or in the link Andres provided.

    Regards
    Barbara

    Friday, January 4, 2013 7:32 AM
  • Completely agree with Barbara. We had this issue for a long time, but after applying the June 2012 CU, peforming the cleanup as described in the article and re-publishing the project we have not seen this issue again.

    Regards, Stig


    Regards, Stig

    Friday, January 4, 2013 9:58 AM