Tuesday, January 31, 2012

Common Project Server 2010 Questions and Answers 20120201

Question - Can I save a copy of my project schedule as an .mpp file, work on it disconnected from project server and when I am ready save over the top of my schedule version in project server?

Answer – Technically yes it can be achieved but don’t ever do it as it is a risky procedure and not the supported way to work on a schedule offline. The supported way of importing a schedule is to use the inbuilt Project import wizard within MS Project Professional. Even still this method is not bullet proof and I have witnessed occasions where the data does not import into the server correctly and sometimes takes a little gentle persuasion. Ideally changes should be made directly from the Server version or through the recommended offline mode method which leverages off the Project cache. This procedure must only be treated as an exception to perhaps rectifying an issue with the existing schedule in Project Server. If you ever have a need to bring a .mpp file into the system, you should always use the inbuilt project import wizard to do this in preference to the ‘Save As’ technique which will make certain assumptions in the process. This procedure should only be used for resolving schedule issues or importing new project schedules into the system.

 

Question - Do local resource cause schedule corruption?

Answer –It’s perfectly fine to have local resources on your project an no they won’t cause schedule corruption. The only caveat I’d add is to check your business process as some organisations mandate the use of global resources for reporting and resource management reasons for example.

 

Question – What happens to my schedule if I am using global resources and an administrator deleted them entirely from the system?

Answer – No global resources should ever be deleted without first communicating this change to the business. Before doing so you can report on what projects are using these global resources and notify the appropriate Project Managers so they can swap them out with the more appropriate global resource. That aside though, if you did experience this, the project would still function fine. What would happen is the next time you opened your project schedule, it will notify you that you had global resources which can no longer be found. As a result they would simply be converted to local resources and all existing information would be kept in regards to assignments, forecast and actuals.

 

Question - Can I copy and paste information from other project schedules into my project server schedule version?

Answer – Yes ‘but’ be careful if you are copying information from a previous version of project professional as I’ve seen cases of task corruption occur. Also if you are unfortunate enough to have a corrupt schedule then I would recommend copying information into excel or notepad first before copying directly into the new schedule version just in case some nasties sneak in.

 

Question – Should I delete my local project cache every time I work on my project in MS Project?

Answer – Ideally, No. The project cache has an important role to play but admittedly it does not always work perfectly and does need to be cleared on occasions where things get confused. Working on projects in offline mode completely relies on the project cache for example so never clear it if this is the case. There are also smarts put into the project cache to optimise the interaction between the client and the server so clearing it all the time will degrade the applications performance and would be most noticeable in a large project schedule. The important thing is to know what to do if you are unfortunate enough to experience caching issues. Another thing to do to keep on top of the game is ensure the project server and client patching versions are kept up to date. Just to clarify though if you are not working on projects in offline, it will not hurt the system to always clear your cache but it will mean the project will take longer to open initially as all related information needs to be copied back into your cache each time. Just to clarify though, doing so will not corrupt the system.

 

Question – What causes my project schedule to corrupt?

Answer – This is difficult to answer and can be caused through various reasons. What can be said is schedule corruption is an exceptional occurrence and should not happen often. When it does though it is rather unfortunate. I refer to them as ‘pants down moments’ when a client comes to me for a miracle fix and explanation as to why this has happened. Sometimes bad things happen and when they do it’ rather embarrassing standing in front of the client saying sorry but you have lost your entire day’s work and need to recreate everything again. On that note MAKE SURE YOU HAVE CONFIGURED YOUR PROJECT SERVER ENVIRONMENT TO USE DAILY ADMINISTRATIVE BACKUPS! Better to lose a day’s work rather than an entire project schedule. So what causes this anomaly? Below is a list of things which ‘may’ cause schedule corruption but it is often a mystery and difficult to diagnose.

·         The most common reason is where communication between the client (Ms Project) and the Server has been interrupted. This may be a network glitch or your computer/application was shut down during the communication process. Always observe the messages in the bottom right corner of MS Project to ensure the project has been successfully saved or published before closing the application.

·         Blank tasks in a project schedule is known to be a potential cause of task corruption

·         Assigning resources to summary tasks is not only an incorrect way of scheduling but can cause schedule corruption

·         Incorrect use of manually scheduled tasks. I have had incidents where I fixed issues after switching the task mode to auto scheduled. For example, the summary task was manually scheduled but the children tasks were either partially complete or complete with actuals against them which affected the summary rollup. I’m not implying manually schedule tasks cause corruption but did not one incident where the use of this task was not logical and switching it to automatic resolved the constraint.

·         Illogical or poor use of task constraints

·         Illogical or poor use of predecessor linkages. Circular references for example.

·         Assignment corruption. Not exactly sure what causes this but removing a resource from a particular task can sometimes resolve the issue.

·         Close your project schedules through File>Close and close the MS Project client through File>Exit. Apparently this method closes the application cleanly compared to the traditional x button in the top right of the screen.

·         Importing schedules from a previous version of MS Project Professional ‘can’ show signs of corruption at a later stage so be careful doing this.

·         Misalignment of the moon as it travels around the earth… :\

·         Last but not least, bugs in the application can cause corruption if a certain scenario is encountered which the application cannot handle. Best thing we can do to mitigate these issues is to be vigilant in keeping the Project Server and Project Professional application up to date with the latest service packs and cumulative updates.

 

Question – What measures can I take to avoid project schedule corruption?

Answer – The following measures can be taken

·         If you are responsible for administering schedules within Project Server then ensure you are proficient in the use of MS Project 2010 Professional. There are courses around to provide this. If you are in Australia, let me know and we (IPMO) can help you out.

·         Ensure you regularly updated your project schedule in Project Server. Configure Administrative backups to occur nightly. Project Server will check each night to see if your project has changed since the last backup. If it has then a new version is stored in the server. If a corruption occurs we can restore the schedule to the previous days version. In theory you should only ever lose  maximum of one day’s work on the schedule if this is configured.

·         Ensure your version of Project Server is up to date with the latest recommended patching levels. Ideally the Project Professional version should match the Server version although technically they can be different.

·         Adhere to the policies and guidelines set out by management on how you are to interact with the tool

·         Check the jobs you place on the project server queue go through successfully. From PWA got to Personal Settings and click on the ‘My queued jobs’ link. Any errors that day will be seen on this screen. If you encounter issues, contact the local Project Server Administrator.

The Supported Way to Work Offline in Project Server 2010

I often come across Project Managers who still use Project Server like it was an .mpp file whereby they open the project from project server, save it to their local PC or Laptop. Then edit it locally for the remainder of the month until monthly processing comes around and then they save the file back into Project Server and overwrite the existing schedule version. In short PLEASE DON’T DO THIS! Believe me, it’s for your own benefit! The schedule in Project Server has an added layer of complexity compared to that of the traditional .mpp file. Although technically possible it is a common cause of schedule corruption and can also cause havoc with linkages to timesheets, task updates, issue, risks, documents and so forth. Embrace the Project Server supported methods and you will have a much more fruitful relationship with the system.



A quick search on the internet will find this procedure but the quick steps are as follows:
1.       Connect to Project Server through Project Pro.
2.       Open the project you need to work on.
3.       Navigate to File>Info>Manage Accounts and select ‘Work Offline’. This will keep your project checked out so nobody else can make changes to it until you check it back in and also switch your project to offline mode which means it is purely working from your local cache. A good reason not to delete your cache by the way.
4.       Close the project. When prompted to check the project back in, choose No. IF you were to select yes, you would not be able to check the file out again in offline mode until you reconnect to the server.
5.       So now you are at home for example and  not connected to the Corporate network. Open project professional. Select the environment to connect to (Production connection for example) and click the ‘Work Offline’ option. NOTE if you do not see this dialog box, enable it through File>Info>Manage Accounts. Select the ‘Choose an account’ option and click OK. Close project pro and open it again.
6.       Continue to work on the project and make the necessary changes, remembering to save regularly. Again if you need to close project pro, keep the project checked out to you so you don’t lock yourself out the next time you want to open in offline mode.
7.       When you get back to the office and want to update your offline changes into Project Server then open project professional. Select the appropriate connection and click the OK button. This will connect you back with project server.
8.       Click File>Open. The dialog box which opens will show you all your local cached project files. Open the project you worked on offline from this list by selecting it and clicking open.
9.       Click Save to update your offline changes into the project server version. Now you can continue to save and publish the project as per normal. Remember to check your project back in this time.



Issue with Printing from the Project Centre Using the Print Button

Are experiencing issue when printing from the Project Centre in Project Server 2010?

Ensure the pop-up blocker settings in the browser are turned off. From within the IE the Browser, select file> Pop-up Blocker>Turn off Pop-up Blocker.

Also ensure the site is in a trusted site or intranet zone to enable the necessary IE security features.

Thursday, January 19, 2012

Project Centre – “An unknown error has occurred”

UPDATE
Microsoft have officially relased a fix for this particular issue. Please refer to Brian Smiths post for more details: http://blogs.msdn.com/b/brismith/archive/2012/04/16/project-server-2010-an-unknown-error-in-project-center-usually-related-to-filters-and-duplicate-custom-field-values.aspx

Download the fix from the following link to the Feb 2012 Cumulative Update: http://support.microsoft.com/kb/2598251

This issue was raised directly to Microsoft. The last formal communcation I have recieved on this issue is that it has been ackowledged by Microsoft now as a 'known issue'. The current status is that a hot fix is scheduled for release in the April 2012 Cumulative Updates. If you would like to reference our support call in this instance to fast track the process then please quote SR 112020314749718 in your support call.

ISSUE
When navigating from PWA to the Project Centre, the user is presented with an error message explaining ‘An unknown error has occurred’. This only occurs for some certain views in the project centre but it does affect all users of the Project Server instance. Since Project Server remembers the last view a user has selected this becomes problematic as once the broken view becomes the users default view, the next time they navigate to the Project Centre, the view selector on the ribbon bar becomes disabled and disallows them to select an alternative view, therefore completely losing the ability to view the Project Centre all together. Over the last two weeks this incident has occurred four times. We have a work around solution for resolving it but request assistance to ensure this issue does not continue to disrupt our business.




STEPS TO REPRODUCE THE ISSUE
Unfortunately this is still a mystery. One minute the Project Centre is fine, then someone saves/publishes their project schedule and the Project Centre view breaks. We then need to go through the motion of working out which project schedule has caused the issue and rectify it.
RESOLUTION STEPS.
  1. Note your most recently published projects around the time the issue begun to identify a potential list of suspect project schedules.
  2. Perform an administrative backup of project via PWA>Server Settings>Administrative Backup. This will give you something to restore to if the project is not the culprit.
  3. Now if you are not very techy then you can go through the process of elimination. For each project use the administrative restore functionality to restore the project schedule. Then open the restored project schedule in project professional and publish the project.. Test the Project Centre. Continue this process until the Project Centre is working again and you can therefore identify the problematic project. In this particular scenario,  we found the project, restored to an old version and got it working. Then we restored the most recent version again, re-published the project and everything was still working and the PM did not lose any data. Phew!
    UPDATE(20 Feb 2012) - In some instances we also had to delete the project from the publish database before we performed the restore. Be careful though as you may loose some values for any lookup type customfields in the schedule.
  4. Now for those who like to get down and dirty into the techy side of things, there is something you can do to hunt down the project. To achieve this you will need to navigate to the application server running the Project Server service and take a look at the SharePoint Log files. In this instance I always use the ULSViewer to reduce the pain in viewing these logs. It allows you to open the ULS logs at a given point in time, then you reproduce the error and stop the logger so you only have to read through a short list of logs. However if you reproduce the error and then quickly open the most recent log file you should be able to still figure it out.
  5. I discovered one log entry in particular which was logged as an ‘Exception’ level error. I’ll post the error at then end of the post for the search bots but it basically logged a large chunk of SQL. I copied and pasted this SQL section of the error into SQL Management Studio and trimmed of any exception text messages. I had to wrap single quotes around the initial GUID parameter declaration section and point the query at the Project Server Published Database to get the query to work.
  6. Once you get the data out, look for any duplicate project name (PROJ_NAME) rows or duplicate rows of PROJ_UIDS. You can use excel to help out with this task. I performed a sort by PROJ_UID and then added an excel formula which checks if the cell on the same row is the same as the one below it. If it is return the text "DUPLICATE". If you need to figure out what Project name maps to the duplicate PROJ_UID then take a look at the MSP_Projects table in the Published Database. (e.g. SELECT * FROM MSP_PROJECTS WHERE PROJ_UID = ‘Insert GUID here’)
  7. Once you find the little gremlin, Apply the same logic as described in step 3 to restore the previous schedule, remembering to publish the schedule after it has been restored. Once confirmed the project centre is working again, restore the most recent schedule, republish and life should be normal again. If you do not have administrative backups on…then learn from this lesson and start doing them. You can then try deleting the project schedule tasks to try and eliminate the tasks/s causing the row duplication.
Related ‘Exception’ error located in the SharePoint Logs:
Exception occurred in method Microsoft.Office.Project.Server.BusinessLayer.Project.ProjectGetProjectCenterProjectsForGridJson Microsoft.Office.Project.Server.DataAccessLayer.FilterDal+FilterException: Error during filter query execution.   Query:     declare @ResUid UniqueIdentifier; set @ResUid = 79f96144-b782-4504-b44b-cd8a0b7385b3;  declare @PermUid UniqueIdentifier; set @PermUid = a120a079-75bc-4f0f-b376-3fb0ae9ac940;  declare @ViewUid UniqueIdentifier; set @ViewUid = 6ac38e5a-af43-4ac4-9e5e-63178560ba5e;  declare @P0 UniqueIdentifier; set @P0 = 998c2ef5-b986-4d10-8d36-f5da091a5956;  declare @P1 UniqueIdentifier; set @P1 = 18a812d6-e266-496c-a133-4e8a98ac4822;  declare @P2 UniqueIdentifier; set @P2 = a849eb95-6e4c-4ed6-891d-1e737b7b0cf3;  declare @P3 UniqueIdentifier; set @P3 = 8c832669-2f8e-474d-9a91-a581ec28a48b;  declare @P4 Int; set @P4 = 5;  declare @P5 UniqueIdentifier; set @P5 = a849eb95-6e4c-4ed6-891d-1e737b7b0cf3;    SET NOCOUNT ON    SELECT      T.PROJ_UID   INTO #T0   FROM dbo.MSP_PROJECTS AS P      INNER JOIN dbo.MSP_TASKS AS T ON T.PROJ_UID = P.PROJ_UID     INNER JOIN dbo.MSP_RESOURCES AS R ON R.RES_UID = P.WRES_UID     LEFT JOIN dbo.MSP_WORKFLOW_STATUS AS WFSTS ON WFSTS.PROJ_UID = P.PROJ_UID     INNER JOIN dbo.MSP_WEB_FN_SEC_GetAllProjectsResCanViewByViewID(@ResUid, @PermUid, @ViewUid, 3) AS perm ON perm.PROJ_UID = T.PROJ_UID     LEFT JOIN dbo.ProjectSummaryCustomFields AS TABLEALIAS_0 ON TABLEALIAS_0.PROJ_UID = P.PROJ_UID AND TABLEALIAS_0.MD_PROP_UID = @P0     LEFT JOIN dbo.ProjectSummaryCustomFields AS TABLEALIAS_1 ON TABLEALIAS_1.PROJ_UID = P.PROJ_UID AND TABLEALIAS_1.MD_PROP_UID = @P2  WHERE T.TASK_OPTINDX = 1.0    AND (ISNULL(WFSTS.STAGE_STATUS,-1) IN (-1, 1,2,3,5,6))   AND  (  ( (TABLEALIAS_0.CODE_VALUE = @P1) AND ((TABLEALIAS_1.CODE_VALUE <> @P3) OR (TABLEALIAS_1.CODE_VALUE IS NULL)) )  AND ((P.PROJ_TYPE <> @P4) OR (P.PROJ_TYPE IS NULL)) )   CREATE CLUSTERED INDEX PK_#T0 ON #T0 (PROJ_UID)    SET NOCOUNT OFF    SELECT      T.PROJ_UID ,      P.PROJ_NAME ,      R.RES_NAME ,      T.TASK_START_DATE ,      T.TASK_FINISH_DATE ,      TB0.TB_BASE_FINISH AS TB_BASE_FINISH_0 ,      T.TASK_PCT_COMP ,      TB0.TB_BASE_COST AS TB_BASE_COST_0 ,      T.TASK_COST ,      T.TASK_REM_COST ,      P.PROJ_LAST_SAVED ,      P.WPROJ_LAST_PUB ,      P.PROJ_OPT_MINUTES_PER_DAY ,      P.PROJ_OPT_MINUTES_PER_WEEK ,      P.PROJ_OPT_DAYS_PER_MONTH ,      T.TASK_SUMMARY_PROGRESS_DATE ,      T.TASK_IS_MILESTONE ,      dbo.MSP_FN_HYPERLINK_HREF(T.TASK_HYPERLINK_ADDRESS, T.TASK_HYPERLINK_SUB_ADDRESS) AS TASK_HYPERLINK_HREF ,      T.TASK_OUTLINE_LEVEL ,      P.PROJ_TYPE ,      T.TASK_DUR_FMT ,      P.WSTS_SERVER_UID ,      P.PROJ_OPT_CURRENCY_CODE ,      P.PROJ_ACTIVE_RISK_COUNT ,      P.PROJ_ACTIVE_ISSUE_COUNT ,      P.PROJ_TOTAL_DOC_COUNT ,      WOB.WOBJ_ISSUE_REF_CNT ,      WOB.WOBJ_RISK_REF_CNT ,      WOB.WOBJ_DOC_REF_CNT ,      PJSYNC.SYNC_WSS_LIST_UID ,      TB0.TB_BASE_START AS TB_BASE_START_0 ,      T.TASK_COMPLETE_THROUGH ,      T.TASK_IS_SUMMARY ,      (CASE WHEN T.TASK_UID=T.TASK_PARENT_UID THEN 1 ELSE 0 END) AS TASK_IS_PROJECT_SUMMARY ,      T.TASK_IS_ACTIVE ,      T.TASK_DUR   FROM dbo.MSP_PROJECTS AS P      INNER JOIN dbo.MSP_TASKS AS T ON T.PROJ_UID = P.PROJ_UID     INNER JOIN dbo.MSP_RESOURCES AS R ON R.RES_UID = P.WRES_UID     LEFT JOIN dbo.MSP_WORKFLOW_STATUS AS WFSTS ON WFSTS.PROJ_UID = P.PROJ_UID     INNER JOIN #T0 AS keys ON keys.PROJ_UID = P.PROJ_UID     LEFT JOIN dbo.MSP_TASK_BASELINES AS TB0 ON TB0.PROJ_UID = T.PROJ_UID AND TB0.TASK_UID = T.TASK_UID AND TB0.TB_BASE_NUM = 0     LEFT JOIN (SELECT WOBJ_PROJ_UID as PROJ_UID,[4] as WOBJ_ISSUE_REF_CNT, [5] as WOBJ_RISK_REF_CNT, [3] as WOBJ_DOC_REF_CNT               FROM (               SELECT WOBJ_TYPE, WOBJ_PROJ_UID                FROM MSP_WEB_OBJECTS WHERE WOBJ_TASK_UID='00000000-0000-0000-0000-000000000000') pwob              PIVOT (COUNT(WOBJ_TYPE) FOR WOBJ_TYPE in([3] ,[4],[5])) AS pvt) AS WOB ON WOB.PROJ_UID = P.PROJ_UID     LEFT JOIN dbo.MSP_SYNC_PROJECT_SETTINGS AS PJSYNC ON PJSYNC.PROJ_UID = P.PROJ_UID  WHERE T.TASK_OPTINDX = 1.0    AND (ISNULL(WFSTS.STAGE_STATUS,-1) IN (-1, 1,2,3,5,6))      CREATE TABLE #T1 (MD_PROP_UID uniqueidentifier)   INSERT INTO #T1 (MD_PROP_UID) VALUES (@P5)   INSERT INTO #T1 (MD_PROP_UID)      SELECT MD_PROP_UID_SECONDARY FROM MSP_CUSTOM_FIELDS WHERE MD_PROP_UID IN (@P5)   INSERT INTO #T1 (MD_PROP_UID)      SELECT DISTINCT MD_PROP_UID FROM MSP_PROJECT_CUSTOM_FIELDS_WORKING_VIEW WHERE MD_PROP_UID_SECONDARY IN (@P5)   INSERT INTO #T1 (MD_PROP_UID)      SELECT DISTINCT MD_PROP_UID_SECONDARY FROM MSP_PROJECT_CUSTOM_FIELDS WHERE MD_PROP_UID IN (@P5)     SELECT      CFV.CUSTOM_FIELD_UID ,      CFV.PROJ_UID ,      CFV.MD_PROP_UID ,      CFV.MD_PROP_ID ,      CF.MD_PROP_NAME ,      CFV.FIELD_TYPE_ENUM ,      CFV.FLAG_VALUE ,      CFV.DUR_VALUE ,      CFV.NUM_VALUE ,      CFV.DUR_FMT ,      CFV.DATE_VALUE ,      CFV.CODE_VALUE ,      CFV.TEXT_VALUE ,      CFV.INDICATOR_VALUE   FROM dbo.MSP_PROJ_CUSTOM_FIELD_VALUES AS CFV      INNER JOIN #T0 AS keys ON keys.PROJ_UID = CFV.PROJ_UID     INNER JOIN dbo.#T1 AS cfkeys ON cfkeys.MD_PROP_UID = CFV.MD_PROP_UID     INNER JOIN dbo.MSP_CUSTOM_FIELDS AS CF ON CF.MD_PROP_UID = CFV.MD_PROP_UID  UNION  SELECT      CFV.CUSTOM_FIELD_UID ,      CFV.PROJ_UID ,      CFV.MD_PROP_UID ,      CFV.MD_PROP_ID ,      PCF.MD_PROP_NAME ,      CFV.FIELD_TYPE_ENUM ,      CFV.FLAG_VALUE ,      CFV.DUR_VALUE ,      CFV.NUM_VALUE ,      CFV.DUR_FMT ,      CFV.DATE_VALUE ,      CFV.CODE_VALUE ,      CFV.TEXT_VALUE ,      CFV.INDICATOR_VALUE   FROM dbo.MSP_TASK_CUSTOM_FIELD_VALUES AS CFV      INNER JOIN dbo.MSP_TASKS AS T ON T.PROJ_UID = CFV.PROJ_UID AND T.TASK_UID = CFV.TASK_UID AND T.TASK_UID = T.TASK_PARENT_UID     INNER JOIN #T0 AS keys ON keys.PROJ_UID = CFV.PROJ_UID     INNER JOIN dbo.#T1 AS cfkeys ON cfkeys.MD_PROP_UID = CFV.MD_PROP_UID     INNER JOIN dbo.MSP_PROJECT_CUSTOM_FIELDS AS PCF ON PCF.MD_PROP_UID = CFV.MD_PROP_UID AND PCF.PROJ_UID = CFV.PROJ_UID    DROP TABLE #T0;  DROP TABLE #T1;     ---> System.Data.ConstraintException: Failed to enable constraints. One or more rows contain values violating non-null, unique, or foreign-key constraints.