Article ID: 2704778 - View products that this article applies to.
When you try to build a project in Microsoft Visual Studio Team Foundation Server (TFS) 2010, the build process fails, and you receive the following error message:
Additionally, an unhandled exception message that resembles the following is generated:
Exception Message: Arithmetic overflow error converting IDENTITY to data type int.
Arithmetic overflow occurred. (type SqlException)
Note This issue typically occurs when large build logs are stored in the TFS build server database.
at Microsoft.TeamFoundation.Framework.Server.TeamFoundationSqlResourceComponent.MapException(SqlException ex, QueryExecutionState queryState)
at Microsoft.TeamFoundation.Framework.Server.TeamFoundationSqlResourceComponent.HandleException(SqlException ex)
at Microsoft.TeamFoundation.Framework.Server.TeamFoundationSqlResourceComponent.Execute(ExecuteType executeType, CommandBehavior behavior)
at Microsoft.TeamFoundation.Build.Server.BuildComponent.UpdateBuildInformation(String buildUri, IEnumerable`1 changes, String requestedBy)
at Microsoft.TeamFoundation.Build.Server.TeamFoundationBuildService.UpdateBuildInformation(TeamFoundationRequestContext requestContext, IList`1 changes, IdentityDescriptor requestedFor)
at Microsoft.TeamFoundation.Build.Server.BuildWebService.UpdateBuildInformation(InformationChangeRequest changes)
This issue occurs because the MSBuild logger adds nodes to the tbl_BuildInformation table during each build process. Therefore, the NodeId column reaches its maximum integer value.
For example, if you run all your builds in Diagnostic or Detailed mode, a lot of messages are written to the database. This behavior causes the value to grow. Additionally, if you have activities that are writing out messages, these values can add up over time.
When you run the following SQL statement against your collection database, the returned value is close to the maximum value of 2.147 billon:
To resolve this issue, apply the following hotfix.
This is a preventive hotfix. This hotfix does not resolve this issue if it has already occurred. We recommend that you contact Microsoft Customer Support Services if you encounter the issue.
After you apply this hotfix, the LogProjectNodes and LogWarnings properties are added to MSBuild activities in TFS 2010.
Note To set the new properties in MSBuild activities,you must apply this hotfix on the TFS build server and on the Microsoft Visual Studio clients that are used to edit the build workflow.
Hotfix informationA supported hotfix is now available from Microsoft. However, it is intended to correct only the problem that is described in this article. Apply it only to systems that are experiencing this specific problem. This hotfix may receive additional testing. Therefore, if you are not severely affected by this problem, we recommend that you wait for the next software update that contains this hotfix.
To resolve this problem immediately, contact Microsoft Customer Support Services to obtain the hotfix. For a complete list of Microsoft Customer Support Services telephone numbers and information about support costs, visit the following Microsoft website:
PrerequisitesTo apply this hotfix, you must have Microsoft Visual Studio Team Foundation 2010 Service Pack 1 (SP1) installed.
Restart requirementYou have to restart the computer after you apply this hotfix if the affected files are being used during installation. We recommend that you close all instances of Visual Studio before you install this hotfix.
Hotfix replacement informationThis hotfix does not replace a previously released hotfix.
File informationThe global version of this hotfix has the file attributes (or later file attributes) that are listed in the following table. The dates and times for these files are listed in Coordinated Universal Time (UTC). When you view the file information, it is converted to local time. To find the difference between UTC and local time, use the Time Zone tab in the Date and Time item in Control Panel.
Collapse this tableExpand this table
Microsoft has confirmed that this is a problem in the Microsoft products that are listed in the "Applies to" section.
To prevent this issue , use one of the following methods:
In TFS2012, these messages are no longer written to the database. Instead, they are written to a file that will help this issue.
For more information about how to maintain TFS build tables, go to the following Microsoft websites:
More information about the Build delete options
General information about the Destroy command
Article ID: 2704778 - Last Review: December 11, 2012 - Revision: 2.0
Contact us for more help
Connect with Answer Desk for expert help.