Cascade Skyline - with Microsoft Logo and Project Support header - author Brian Smith

  • Brian Smith's Microsoft Project Support Blog

    Friends don't let friends delete their cache or cancel queue jobs

    • 42 Comments

    Inspired by Brian Kennemer's e-mail tag line of "Friends don't let friends assign resources to summary tasks" I thought I would get back on my soapbox about the cache and queue.  I do appreciate that there are some early bugs around custom field display that require the occasional local cache deletion - and there are a couple of rare scenarios that will leave the queue in a bad way and things need canceling.  But generally many of the situations our customers run into can be resolved without recourse to either of these actions - which can both lead to DATA LOSS!

    A couple of examples from the queue:-

    Project Save from Project Professional - Getting Queued

    This means the data is flowing from the client cache to the server queue - and once it is all in the queue it will then be loaded into the Project Server database tables.  If the client goes away while this is happening (and this can be our fault as we don't handle Project closing very well) or the network goes down, or you hibernate your laptop as you race out of Starbucks, then the queue will just sit in this state.  If you cancel the queue job then the good data in the client cache will never see the light of day.  The correct approach is to identify from the queue where the save is coming from (the owner will display from the queue) and then get that person to re-connect their client and the getting queued should continue.  In some cases you will see the original save show as canceled but if you look in the ULS logs it will have a message along the lines of:-

    PWA:http://server1/PWA, SSP:SharedServices1, User:DOMAIN\username, PSI: WinProj.PreSaveProject [T:abf8f56f-e3d1-4139-9355-55ef33aa1378][U:079d778a-2a14-455a-a52e-3141b57e75ea][S:6521e25f-5c1c-41d3-a224-7a868e161c42][D:CLIENT1\ProjConf 2][J:abf8f56f-e3d1-4139-9355-55ef33aa1378][PS_AC][3] Cancelling correlation 2439f848-3966-44b7-a645-1ff7b6914f10 as it has 1 send incomplete winproj save jobs.

    which indicates the original save hadn't got very far so it cancels it from the server and starts again.  This was in fact the project that should have demonstrated this recovery at the project conference - but I didn't leave Project Professional connected to that profile for long enough (my fault - trying to present 3 hours of stuff in 75 minutes).  Another interesting tip from this queue job - CLIENT1\ProjConf 2 is the server name and the Project Server account (not user account but the "profile") used on that machine to make this queue request.

    So the queue shows something like this:-

    image

    with the important fact that I didn't cancel anything and the save came from my client cache - and nothing was lost.

    Timesheet Update - Failed and Blocking Correlation

    This next example shows a couple of things - the sleeping state and that the retry does work.  As long as you fix the underlying problem.  The queue is all data driven and if the data stays the same then it will behave exactly the same.  (One definition of insanity is doing the same thing over and over expecting a different outcome - same thing with the queue).  If I submit a timesheet with administrative time then when the update is processed it puts a calendar exception in to my calendar for the non-working time.  If as a resource I am checked out then this update can go into a sleeping state (Waiting to be processed (Sleeping)) - and it wakes up every 2 minutes and tries again.  If I happen to get checked in in the meantime then all is good and the process completes.  If not then eventually it will fail.  The error shown in the queue even gives you a reasonable clue to why it failed (if you know the secret language - CICO = Check-in check-out):-

    Error summary/areas:
    Array
    CICOAlreadyCheckedOutToYou
    Queue
    GeneralQueueJobFailed
    Error details:

    <?xml version="1.0" encoding="utf-16"?>
    <errinfo>
      <array name="Array" type="System.Guid">
        <item value="079d778a-2a14-455a-a52e-3141b57e75ea">
          <error id="10101" name="CICOAlreadyCheckedOutToYou" uid="ce366c36-421b-4c47-8fa0-d68f42ba63d6" />
        </item>
      </array>
      <general>
        <class name="Queue">
          <error id="26000" name="GeneralQueueJobFailed" uid="385171b0-3ee9-4087-b308-859cb62fea53" JobUID="702e81a6-4f0e-4faf-ab78-2ab81fe60972" ComputerName="SERVER2" GroupType="TimesheetUpdate" MessageType="UpdateTimesheetMessage" MessageId="1" Stage="" />
        </class>
      </general>
    </errinfo>

    To recover from this error you do not need to cancel - just fix the underlying problem, which in this case was that I had my account open in Manage Users on another IE session, and then select the job and click retry.

    image

    This time it all works fine - even the blocked jobs can continue and other related jobs get spawned to update the reporting DB.

    image

    So please, please, please - deleting the local cache and canceling queue jobs should be a last resort.  There is usually a better way.

    Technorati Tags: Project Server 2007

  • Brian Smith's Microsoft Project Support Blog

    Setting custom field values using the PSI

    • 27 Comments

    We don't seem to have done a good job in educating our customers on this topic, so thought I'd put this out there at least as a starting point and I'm sure we can also try and get better samples in the SDK. 

    One of the tricky things with setting custom fields for any entity (Project, Resource or Task - but also assignment or timesheet) is that you cannot always just call up the dataset, navigate to the custom field row and set the value.  In many cases the row may not yet exist, so you need to add it, then set all the required properties and then update back through the PSI.

    As an example if you create a project through the PSI it will have no project level custom field rows created by default, (except ones based on Lookup Tables with a default value forced) and any tasks will only have the "Health" special custom field set, and again- any with Lookup Table defaults. If you then open in Project Professional and just save again, you will then have added any calculated fields at the project level, along with any calculated fields at the task level.  Also at this stage the project summary task (Task 0) is populated with any task level fields with roll up to summary level set.

    As my server does not have all the possible combinations of fields I may be missing something here - but ProjTool is a great way to see just what is in the dataset at any time.

    So whenever you are setting custom fields first see if the row already exists - and if not you will need to add a customfieldrow to whatever dataset you are working with.  Then the next step is to set the appropriate properties - which will depend on the type of field you are setting (defined by FIELD_TYPE_ENUM), and the dataset you are adding it to.  For instance a ProjectCustomFieldsRow will need the PROJ_UID.  A TaskCustomFieldsRow will need the PROJ_UID and the TASK_UID.  A Timesheet CustomFieldsRow will need the TS_UID to identify the timesheet and a TS_LINE_UID to identify the specific line.  Then for any row you need to set a new GUID for the CUSTOM_FIELD_UID, the MD_PROP_UID and/or the MD_PROP_ID to identify the specific custom field and the actual value you want to set in the appropriate property as detailed in the following table.

    Field Type ENUM Value Description Set field value in:
    COST 9 Value in 1/COST_MULTIPLIER dollars NUM_VALUE
    DATE 4 A date value. HIWORD contains days off set from 1/1/84. LOWORD contains minute off-set, ranging from 0 to 1440, from 12:00 A.M. (midnight) DATE_VALUE
    DURATION
    6 Value in 1/DUR_MULTIPLIER minutes DUR_VALUE and DUR_FMT
    TEXT 21 A string value TEXT_VALUE
    FLAG 17 Index into yes/no string table FLAG_VALUE
    NUMBER 15 A number value NUM_VALUE
    (Lookup Table)   GUID CODE_VALUE

    FINISHDATE is also listed in the SDK but is not applicable to these custom fields.  Lookup Table isn't specifically a custom field type - but I added it for completeness.  If the custom field is based on a Lookup Table then the LT_STRUCT_UID of the specific entry in the Lookup Table is entered in the CODE_VALUE property.  For those that accept multiple values there will be a row with each CODE_VALUE - not a single row with multiple CODE_VALUES.

    Another property you will come across in the datasets is the INDICATOR_VALUE - which will hold the enumeration value for the indicator to be displayed based on the custom field settings. 

    No code sample just yet on this - but I will try and come up with some shortly.  I am looking into a support incident where values are being set for summary tasks (or rather they are not) - these are likely to be read-only if "roll-up" is set, so be aware of that.

    *** Update *** Finally got a sample together - hope it is worth the wait - http://blogs.msdn.com/b/brismith/archive/2010/08/25/project-server-adding-custom-fields-to-projects-and-tasks-using-the-psi.aspx 

    The ProjCFDlg.cs sample in ProjTool and the Add Project Custom Field option on the Project Details pane of ProjTool is a great place to look for an example that covers this well.

    Other things to be aware of are that constraints applied to the custom fields will need to be adhered to.  If the custom field only allows selection of codes with no subordinate value (leaf nodes) then the PSI cannot over-ride this. 

  • Brian Smith's Microsoft Project Support Blog

    Waiting for Resources? - What happens when you provision a new Project Web Access site

    • 46 Comments

    One problem I have seen a few times is the Project Web Access site provisioning running into issues.  If it fails completely then the error messages are pretty good - and you can generally resolve the issue and re-try and everything will be good.  However, what do you do when it just sits on "Waiting for Resources" and nothing happens?  The quick answer is that this relies on the SharePoint Timer Service and a couple of Shared Service Provider services that can be viewed through Timer Job Definitions (Shared Services Timer Job and Project Server Synchronizing Job for 'SharedServices1' - or whatever yours is called).  If these are not running then you will be "Waiting for resources" for a very long time!  Also there could be multiple versions of the timer jobs if you have multiple SSPs so it can get confusing, particularly as the first one does not differentiate by name.  (Clue - the JobId in the URL for the job is the Id of the timer job row in the Objects table in SharePoint_Config database, and the Properties column from this row will lead you to the Guid of the TargetSharedResourceProvider - which will be the Id of the Shared Services Provider also in the same table.)

    So to dig a little deeper so you can understand where it might be stuck I'll explain what is going on in the background which hopefully will help you find what is stopping it from working.

    So, step 1 - you have been on the Create a Project Web Access Site page (CreatePWA.aspx) and entered all the details, and it goes back to the Manage Project Web Access Sites (ManagePWA.aspx) page and just sits there.  At that point a row has been added to the MIPScheduledJob table in the SharedService1_DB (your database name may vary - this is the default).  This is a pre-synchronizing job for the site, and is added to the database by the account running the Shared Services Provider application pool.

    Step 2.  The Shared Service Timer Job picks up the row from this database table and adds a row to the SharePoint_Config database Objects table.  In the properties field of this table is some XML describing the site to be built, database names etc.  This timer job will run as the account of the farm administrator (i.e. the account running the OWSTIMER service)

    Step 3.  The Project Server Synchronizing Job for 'SharedServices1' sees this row and actions it by creating the site, creating the database and then configuring the instance of PWA.  If everything is working you see the status change on the ManagePWA page as these different stages are processed, and finally it will say Provisioned!  Again, this timer service runs as the farm administrator.

    Waiting for resources will be seen until the early stages of step 3.

    So check all your services are running and your timer jobs are present and enabled and all should be good.  One other workaround that generally gets things moving again is to create  a new Shared Services Provider - which will then create new timer jobs and overcome any underlying issues.  The web applications can then be associated with the new SSP, the new SSP can be made the default if you are not using the old one for anything else, and the old one could be deleted.

    I mention the databases here on the condition that you can look - but don't touch! 

    Technorati Tags: Project Server 2007

  • Brian Smith's Microsoft Project Support Blog

    Project Server 2010: Restoring or Migrating PWA Instances

    • 8 Comments

    Just a quick posting on this topic pointing out a few of the changes between 2007 and 2010.  We have some documents already up on TechNet – under the Operations section at http://technet.microsoft.com/en-us/library/cc197578.aspx, but thought this would be a useful posting to make clear what you can and cannot do.

    In 2007 you could restore your 4 Project Server databases, then point your provision job at these 4 and you’d have a new PWA instance using those DBs.  If you wanted your workspaces too then you’d need to copy the sites or if you’d had the forethought to use a different web application for sites then it could be even easier.

    In 2010 we introduce the 5 dB restore –so you can now restore your Content database containing your PWA site (and potentially all your Project sites (workspaces,in 2007 speak), and your 4 Project Server databases, attach the Content DB to a web application and then you can provision and it will use this PWA site and the databases – rather than complaining that the /PWA site already exists – which was the case in 2007.  So this is excellent – and makes it much easier to move a complete copy of the instance around. 

    However, there are some gotchas:

    You cannot change the name of the site - but you could restore to a different web application (port) to avoid a clash if you needed to pull /PWA from one server to another server where /PWA already existed

    If you change domains you might have some unexpected results – This is due to differences in accounts in different domains, and will be even more unusual if you happen to use a different farm admin from the Project admin (which would be best practice, but in a dev/test/support scenario might not be the case.  The issue here is that attaching the content DB will add the farm admin as the site administrator, but will not add the Project admin when you provision the site.  So you have a great Catch 22. Once you provision the PWA instance the Project admin will get an access denied on /PWA as he has no rights to the site.  Farm Admin will get Access Denied (or might be unexpected error) as he is not a project server user.  Simple solution is to navigate to http://servername/pwa/-layouts/user.aspx as the Farm Admin and then give the Project admin rights.  Once you can connect as Project Admin then you can update users credentials as necessary.

    4 DB restores will NOT work – it looks like it has worked, but if you try to drill in to a project you will see a message “Unable to open Project, no valid Project Detail Page could be found for the project.”  The Project Detail Pages (PDPs) are stored in the Content DB – if you don’t; restore the Content DB then you don’t have them and cannot get to existing Projects through Project Center.  You can however still access via Project Professional, so in some support or disaster recovery scenarios this might be good enough – just to get access to projects while the full recovery happens somewhere else.

    You may need to use the WSS site re-linker tool – now built in to Server Settings in PWA as “Bulk Update Project Sites”.  If you have changed URL die to a different port then re-linking should get your sites in order. In upgrade scenarios the “Previous Site Path” Web application might show as a GUID in the drop down – however it still works and will re-link the sites.

    Cannot attach Content DB via the Central Administration UI – This is handled with very good error messages and will tell you to use stsadm if it needs to upgrade the content database due to differences of versions.  You could also use the PowerShell command – mount-SPContentDatabase. The correct syntax of the stsadm command is:

    stsadm –o addcontentdb –url “http;//servername:port/ –databasename Content_DB_Name

    Partial Restores using Full Farm Backup are not supported.  From the UI it looks as though you should be able to select just a PWA instance and backup stuff and then restore from this backup to another farm.  This isn’t supported.  it will only work when restoring to the same farm and the same named /PWA site.  I guess it could be used as a means of restoring the required databases, but you would still need to provision a site on the target server against the databases to get anything to work.

    I am sure we will find more gotchas as we go along, and perhaps even some workarounds to recover from certain issues – but that’s all for now.  Let me know of anything you feel should be added.  I will probably do a more “step by step” posting with a few more details – but the TechNet articles cover those kind of details pretty well.

    Technorati Tags: ,
  • Brian Smith's Microsoft Project Support Blog

    How to tell which Cumulative Update, Hotfix or Service Pack version of Project Server 2010 and Project 2010 you are running

    • 7 Comments

    I’ll get this information into a KB article too, and I’ll also try and keep this posting up to date as we release each cumulative update or service pack for Project Server 2010 and Project 2010.  If you are not reading this at http://blogs.msdn.com/b/brismith then you may be reading out of date information!

    The version can be different depending where you look, so I will tabulate the version you will see in Control Panel, Programs and Features (binary version) or on the individual binaries – which is also listed in Central Administration under Upgrade and Migration, Check Product and Patch Installation Status – and also the version you will see in the databases.  I’ll mention too various other components that might be of interest.  I have listed just the Project Server KB for the CU – but the DB Version noted for SharePoint assumes that either a SharePoint Server or Server rollup has also been installed.

    As a reminder to get the version from the database there is a table in each SharePoint DB, and each Project Server DB called Versions so a query such as the following will return the current version, which will be the highest Version next to the NULL GUID. 

    USE <PROJECTSERVERNAME>_Published

    SELECT * FROM Versions

    WHERE VersionId ='00000000-0000-0000-0000-000000000000'

    Project Server 2010

    Release Binary Version DB Version KB
    Initial Release 14.0.4763.1000 Project - 14.0.4750.1000
    SharePoint - 14.0.4762.1000
     
    June 2010 CU 14.0.5114.5003 – See KB for individual binary versions – KB will show in Installed Updates Project - 14.0.5114.5000
    SharePoint - 14.0.5114.5000
    KB 2075990
    August 2010 CU 14.0.5123.5000
    See KB for individual binary versions – KB will show in Installed Updates
    Project - 14.0.5114.5000 (no change from June)
    SharePoint – 14.0.5123.5000
    KB 2276341
     October 2010 CU  14.0.5126.5003 Re-released - See KB for individual binary versions – KB will show in Installed Updates Project - 14.0.5114.5000 (still no change from June)
    SharePoint – 14.0.5128.5000
     KB 2394322
     December 2010 CU  14.0.5130.5000  See KB for individual binary versions.  KB will show in installed updates

     Project - 14.0.5130.500

     SharePoint 14.0.5130.5002

     KB 2459258

    February 2011 CU

    14.0.5136.5000
    See KB for individual binary versions.  KB will show in installed updates

    Project – 14.0.5135.5000

    SharePoint -
    14.0.5136.5002

    KB 2475879

    April 2011 CU

    14.0.5138.5000
    See KB for individual binary versions.  KB will show in installed updates

    Project – 14.0.5137.5000

    SharePoint -
    14.0.5138.5001

    KB 2512801

    June 2011 CU

    14.0.6106.5002
    See KB for individual binary versions.  KB will show in installed updates

    Project – 14.0.6105.5000

    SharePoint -
    14.0.6106.5002

    KB 2536600

    If you load Service Pack 1 for Project Server 2010 then you will see Versions of 14.0.6027.1000 for Project and 14.0.6029.1000 for SharePoint.  If you loaded June CU at the same time and did not run the SharePoint Configuration Wizard between loading the SP and the CU then you will just see the latest - the 6105.5000 and 6106.5002 from the table above.

    Project 2010

    Details from Control Panel, Programs and Features, and also the Backstage (File, Help tab), both the main version displayed, and the additional version information.

    Release Binary Version KB
    Initial Release Control Panel - 14.0.4763.1000
    BackStage – 14.0.4760.1000
    Under Additional Versions and Copyright Information – Microsoft Project 2010 (14.0.4751.1000) MSO(14.0.4760.1000)
    MSO may be different depending on other Office KBs installed
     
    June 2010 CU KB 2075992 will show in installed updates
    BackStage – 14.0.4760.1000
    Under Additional Versions and Copyright Information – Microsoft Project 2010 (14.0.5112.5000) MSO(14.0.4760.1000)
    MSO may be different depending on other Office KBs installed
    KB 2075992
    August 2010 CU NA – No client release for August.  MSO may change if other Office updates loaded NA
     October 2010 CU

     KB 2413663 will show in installed updates.  Backstage 14.0.5128.5000.  Under Additional Versions and Copyright Information – Microsoft Project 2010 (14.0.5126.5000) MSO(14.0.5128.5000)
    MSO may be different depending on other Office KBs installed

     

     KB 2413663
     December 2010 CU  KB 2466263 will show in installed updates.  Backstage (File, Help) 14.0.5128.5000.  Under Additional Versions and Copyright Information – Microsoft Project 2010 (14.0.5130.5000) MSO(14.0.5128.5000)
    MSO may be different depending on other Office KBs installed
     KB 2466263
    February 2011 CU KB 2496946 will show in installed updates.  Backstage (File, Help) 14.0.5128.5000.  Under Additional Versions and Copyright Information – Microsoft Project 2010 (14.0.5130.5000) MSO(14.0.5128.5000)
    MSO may be different depending on other Office KBs installed
    KB 2496946
    April 2011 CU KB 2516479 will show in installed updates.  Backstage (File, Help) 14.0.5137.5000.  Under Additional Versions and Copyright Information – Microsoft Project 2010 (14.0.5137.5000) MSO(14.0.5128.5000)
    MSO may be different depending on other Office KBs installed
    KB 2516479
    June 2011 CU KB 2536590 will show in installed updates.  Backstage (File, Help) 14.0.6023.1000.  Under Additional Versions and Copyright Information – Microsoft Project 2010 (14.0.6106.5000) MSO(14.0.6023.1000)
    MSO may be different depending on other Office KBs installed - 6023.1000 relates to SP1 in this example.
    KB 2536590

    Cumulative Update Release Posts

    June 2010 - http://blogs.technet.com/b/projectadministration/archive/2010/07/22/microsoft-project-server-and-sharepoint-2010-june-cu-2010-are-live.aspx

    August 2010 - http://blogs.technet.com/b/projectadministration/archive/2010/09/02/microsoft-project-server-and-sharepoint-2007-and-2010-august-cu-2010-are-live.aspx

    October CU - http://blogs.technet.com/b/projectadministration/archive/2010/10/27/microsoft-project-server-and-sharepoint-2007-and-2010-october-cu-2010-are-live.aspx

    December CU - http://blogs.technet.com/b/projectadministration/archive/2010/12/15/microsoft-project-server-and-sharepoint-2007-and-2010-december-cu-2010-are-mostly-live.aspx 

    February 2011 CU - http://blogs.technet.com/b/projectadministration/archive/2011/02/24/microsoft-project-server-and-sharepoint-2007-and-2010-february-cu-2011-are-live.aspx

    April 2011 CU - http://blogs.technet.com/b/projectadministration/archive/2011/04/29/microsoft-project-server-and-sharepoint-2007-and-2010-april-cu-2011-are-live.aspx

    SP1 - http://blogs.msdn.com/b/project/archive/2011/06/28/announcing-the-release-of-service-pack-1-sp1-for-microsoft-project-and-project-server-2010.aspx

    June 2011 CU - http://blogs.technet.com/b/projectadministration/archive/2011/08/22/microsoft-project-server-and-sharepoint-2007-and-2010-june-cu-2011-announcement.aspx

    Links to all the Cumulative Update Webcasts, and other great update links can be found at http://technet.microsoft.com/en-US/projectserver/gg176680.aspx

Page 3 of 91 (451 items) 12345»