English
Orphan baseline prevents Project Server 2010 report publishing queue to complete its job. In our environment it was caused by sudden disconnection of either client or SQL server during the publish command. I search arround internet and found following discussion on orphan baseline : http://social.technet.microsoft.com/Forums/projectserver/en-US/f4d638ad-003e-421c-85d9-7ed5d7fda029/project-server-2007-error-24006-reportingprojectchangemessagefailed-insert-statement-conflicted .
The solution suggested by that discussion is:
delete from MSP_TASK_BASELINES where MSP_TASK_BASELINES.PROJ_UID ='[PROJECT UID]' AND MSP_TASK_BASELINES.TASK_UID NOT IN ( select TASK_UID from dbo.MSP_TASKS where PROJ_UID ='[PROJECT UID]' )
For me, I believe that any TASK_UID not in TASK_UID of MSP_TASKS table are orphan baseline. So, change the above SQL statement to below statement will clear off any orphan baseline in EPM
delete from MSP_TASK_BASELINES where MSP_TASK_BASELINES.TASK_UID NOT IN (select TASK_UID from dbo.MSP_TASKS )
Execute the above script for *_Draft and *_Published database of your EPM.
To prevent the same problem in the future, you have to install latest CU for Project Server as well as SharePoint Server.