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

Article translations Article translations
Article ID: 2704778 - View products that this article applies to.
Expand all | Collapse all

On This Page

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.

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')

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:
http://support.microsoft.com/contactus/?ws=support
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.
Collapse this tableExpand this table
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

Status

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

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:
More information about the Build delete options

General information about the Destroy command


Properties

Article ID: 2704778 - Last Review: December 11, 2012 - Revision: 2.0
Applies to
  • Microsoft Visual Studio Team Foundation Server 2010 Service Pack 1
  • Microsoft Visual Studio Team Foundation Server 2010
  • Microsoft Visual Studio 2010 Service Pack 1
  • Microsoft Visual Studio 2010 Ultimate
  • Microsoft Visual Studio 2010 Professional
  • Microsoft Visual Studio 2010 Premium
  • Microsoft Visual Studio Test Professional 2010
Keywords: 
kbqfe kbhotfixserver kbfix kbsurveynew kbexpertiseadvanced KB2704778

Give Feedback

 

Contact us for more help

Contact us for more help
Connect with Answer Desk for expert help.
Get more support from smallbusiness.support.microsoft.com