2012/09/27

Project Server 2010 : FOREIGN KEY constraint Error

Hello again ,

Today we are having a n interesting project Server Issue , I dont have a clear idea on the cause of this Issue but Microsoft calims its a bug that will cause some of your GUID to change when you try to use the save and send feature .... anyway when you try to publish you r project you will end up with this error



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 "ProjectServer_Reporting", table "dbo.MSP_EpmTask". The statement has been terminated.



so what this error basically say that there is  foreign key want found when it was trying to insert a task with a foreign key UID from another table , in another words less technical there is some data missing from the database ...


so the bad news is you cant really know what is the cause behind this , the good news is there is a solution

actually to make it better the solution is easy
 backup ..backup..backup 


run the following script against your draft database and against your published database
select PROJ_NAME, MTB.PROJ_UID,TASK_UID,TB_BASE_NUM from MSP_TASK_BASELINES MTB


inner join MSP_PROJECTS MP on MTB.proj_uid=MP.proj_uid

where TASK_UID not in (select TASK_UID from MSP_TASKS)

    if and you should get some raws with this command those tasks are the origin of your Issue to resolve it run the following command againest your draft and puplished databes


DELETE FROM MSP_TASK_BASELINES WHERE TASK_UID not in (SELECT TASK_UID FROM MSP_TASKS)


once you run this make sure that you clean the project cashe from the user machine and republish it again

hope this help
regards










2012/09/05

I have did something bad

Hello All , 

I will start with a big disclaimer  : 
 I have did this only for testing and because i needed this database to get attached this is a development environment , and what i did is totally 100% not supported not recommended .

2012/08/07

Project Server 2013 good news and bad news


Hi ,
I was going through project online and looking for any changes and if any of the things that we usually struggle with have changed, I was more than happy to notice allow multiple lines in timesheet administrative tasks as you can notice below



2012/08/01

SSRS Error

Hi All 


I know it should be about project server 2010 but for this im making a small change and i just want to mention a small error that consumed some of my time trying to figure it out in SQL reporting service .


so basically i was creating a custom report for one of our clients , did a small modification on my SQL statement and let the fun begin the error below appeared 


2 hours wasted 


and as you can notice the error message  is not helpful not in any way  but apparently it was an issue with my Query which is running perfectly on SQL and on the query designer retrieving the data with no issues 


my SQL was something like this (just an example) 


SELECT p.TaskDate , p.TaskName , x.TaskDate FROM 


Table1 p JOIN Table2 x on p.TaskDate = x.TaskDate




the query will never have a problem on SQL or with the query designer , 


but the problem is SQL reporting service couldn't handle the same column name generated so you need to use aliases  , just do that and you are good to go 




Cheers hope this will help 
Malek