Updating from TFS 2012 Update 1 to TFS 2012 Update 4 – Problem with Upgrade Warehouse

My team recently needed to update from TFS 2012 Update 1 to TFS 2012 Update 4, but ran into a problem during the upgrade:

Upgrade Error

Looking closer at the log file, it had this information:

XML parsing failed at line 1, column 0: A document must contain exactly one root element.
.
Errors in the metadata manager. An error occurred when instantiating a metadata object from the file, ‘\\?\d:\Program Files\Microsoft SQL Server\MSAS11.MSSQLSERVER\OLAP\Data\Tfs_Analysis.0.db\Team System.8676.cub.xml’.

[Info @22:20:14.393] Microsoft.AnalysisServices.OperationException: XML parsing failed at line 1, column 0: A document must contain exactly one root element.
.
Errors in the metadata manager. An error occurred when instantiating a metadata object from the file, ‘\\?\d:\Program Files\Microsoft SQL Server\MSAS11.MSSQLSERVER\OLAP\Data\Tfs_Analysis.0.db\Team System.8676.cub.xml’.

To get around this we:

  1. Restored the TFS_Configuration and TFS_[Collections] databases to their pre-upgrade state
  2. Re-ran the upgrade wizard, but this time unchecked the Reporting portion of the upgrade. This causes the installer to ignore the warehouse and analysis services part of the install
  3. After the install completed, we deleted the tfs_warehouse and tfs_analysis databases
  4. Following instructions from this TFS Setup Support blog post, rebuilt the warehouse and analysis databases

Upgrade complete!

TF14045: The identity <guid> is not a recognized identity

A Team Foundation Server instance I manage, on TFS 2012 Update 1, has had some unhealthy signs for a little while – notifications stopped working, and viewing history for some files\branches displayed an ominous error:

error

It turned out to be due to Active Directory accounts for some contractors being deleted.  Microsoft has a hotfix for this, but in our case updating to TFS 2012 Update 4 did the trick.

Side effect: TFS sent me 350+ notification emails that had been queued up and unable to send.  Whoops!