Notice: This website is an unofficial Microsoft Knowledge Base (hereinafter KB) archive and is intended to provide a reliable access to deleted content from Microsoft KB. All KB articles are owned by Microsoft Corporation. Read full disclaimer for more details.

FIX: "Arithmetic overflow error converting IDENTITY to data type int" error message when you build a project in Team Foundation Server 2010


View products that this article applies to.

Symptoms

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:
Exception Message: Arithmetic overflow error converting IDENTITY to data type int.
Arithmetic overflow occurred. (type SqlException)
Additionally, an unhandled exception message that resembles the following is generated:
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.Framework.Server.TeamFoundationSqlResourceComponent.ExecuteReader()

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)
Note This issue typically occurs when large build logs are stored in the TFS build server database.

↑ Back to the top


Cause

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:
Select IDENT_CURRENT('tbl_buildInformation')

↑ Back to the top


Resolution

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 information

A 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:Note In special cases, charges that are ordinarily incurred for support calls may be canceled if a Microsoft Support Professional determines that a specific update will resolve your problem. The usual support costs will apply to additional support questions and issues that do not qualify for the specific update in question.

Prerequisites

To apply this hotfix, you must have Microsoft Visual Studio Team Foundation 2010 Service Pack 1 (SP1) installed.

Restart requirement

You 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 information

This hotfix does not replace a previously released hotfix.

File information

The 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.
File nameFile versionFile sizeDateTimePlatform
Microsoft.teamfoundation.build.server.logger.dll10.0.40219.41349,2808-Aug-1214:55x86
Microsoft.teamfoundation.build.workflow.dll10.0.40219.413660,6168-Aug-1214:55x86
Tfsbuildservicehost.exe10.0.40219.413192,6088-Aug-1214:55x86

↑ Back to the top


Status

Microsoft has confirmed that this is a problem in the Microsoft products that are listed in the "Applies to" section.

↑ Back to the top


More Information

 To prevent this issue , use one of the following methods: 
  • Open your build process template by using a text editor, add the LogProjectNodes and LogWarnings properties to the MSBuild activity, and then set the values of the properties to false.
  • Open your build process template by using the workflow designer in Visual Studio, browse to the MSBuild activity, and then change the values of the two properties to false.
Notes
  • There are two MSBuild activities in default build process template.
  • The default value of the two properties is true.
We recommend that you reduce the verbosity level for the builds if you are using the Detailed or Diagnostic level. Use these options only when it is required.

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:

↑ Back to the top


Keywords: kb, kbqfe, kbhotfixserver, kbfix, kbsurveynew, kbexpertiseadvanced, kbhotfixdev, kbseo

↑ Back to the top

Article Info
Article ID : 2704778
Revision : 1
Created on : 1/7/2017
Published on : 12/11/2012
Exists online : False
Views : 325