Cannot insert the value NULL into column 'ChangerId'
Lately i have been having the following error and warning messages in the event log of my TFS Server:
Code SnippetEvent Type: Error
Event Source: TFS WorkItem Tracking
Event Category: None
Event ID: 3017
Date: 1-8-2008
Time: 10:54:13
User: N/A
Computer: MARIANNETIMMER
Description:
TF53010: The following error has occurred in a Team Foundation component or extension:
Date (UTC): 8/1/2008 8:54:13 AM
Machine: MARIANNETIMMER
Application Domain: /LM/W3SVC/3/Root/WorkItemTracking-5-128620266027369380
Assembly: Microsoft.TeamFoundation.Common, Version=9.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a; v2.0.50727
Process Details:
Process Name: w3wp
Process Id: 23516
Thread Id: 22636
Account name: NT AUTHORITY\NETWORK SERVICEDetailed Message: TF53013: A crash report is being prepared for Microsoft. The following information is included in that report:
System Values
OS Version Information=Microsoft Windows NT 5.2.3790 Service Pack 2
CLR Version Information=2.0.50727.1433
Machine Name=MARIANNETIMMER Processor Count=1
Working Set=142647296
System Directory=C:\WINDOWS\system32
Process Values
ExitCode=0
Interactive=False
Has Shutdown Started=False
Process Environment Variables
Path = C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\Program Files\Microsoft SQL Server\80\Tools\Binn\;C:\Program Files\Microsoft SQL Server\90\DTS\Binn\;C:\Program Files\Microsoft SQL Server\90\Tools\binn\;C:\Program Files\Microsoft SQL Server\90\Tools\Binn\VSShell\Common7\IDE\;C:\WINDOWS\system32\WindowsPowerShell\v1.0
TEMP = C:\WINDOWS\TEMP
PATHEXT = .COM;.EXE;.BAT;.CMD;.VBS;.VBE;.JS;.JSE;.WSF;.WSH;.PSC1
PROCESSOR_ARCHITECTURE = x86
SystemDrive = C:
windir = C:\WINDOWS
DSETPATH = C:\Program Files\Dell\DSET
TMP = C:\WINDOWS\TEMP
USERPROFILE = C:\Documents and Settings\Default User
ProgramFiles = C:\Program Files
FP_NO_HOST_CHECK = NO
COMPUTERNAME = MARIANNETIMMER
APP_POOL_ID = Microsoft Team Foundation Server Application Pool
NUMBER_OF_PROCESSORS = 1
PROCESSOR_IDENTIFIER = x86 Family 6 Model 23 Stepping 6, GenuineIntel
DXROOT = C:\Program Files\Sandcastle\
ClusterLog = C:\WINDOWS\Cluster\cluster.log
SystemRoot = C:\WINDOWS
ComSpec = C:\WINDOWS\system32\cmd.exe
CommonProgramFiles = C:\Program Files\Common Files
PROCESSOR_LEVEL = 6
PROCESSOR_REVISION = 1706
VS80COMNTOOLS = C:\Program Files\Microsoft Visual Studio 8\Common7\Tools\
ALLUSERSPROFILE = C:\Documents and Settings\All Users
VS90COMNTOOLS = C:\Program Files\Microsoft Visual Studio 9.0\Common7\Tools\
OS = Windows_NTRequest Details
Url=http://mariannetimmer:8080/WorkItemTracking/v1.0/Integration.asmx [method = POST]
User Agent=Team Foundation (w3wp.exe[Integration], 9.0.21022.8)
Headers=Content-Length=1724&Content-Type=text%2fxml%3b+charset%3dutf-8&Accept-Encoding=gzip&Accept-Language=en-US&Expect=100-continue&Host=mariannetimmer%3a8080&User-Agent=Team+Foundation+(w3wp.exe%5bIntegration%5d%2c+9.0.21022.8)&X-TFS-Version=1.0.0.0&X-TFS-Session=00000000-0000-0000-0000-000000000000&SOAPAction=%22http%3a%2f%2fschemas.microsoft.com%2fTeamFoundation%2f2005%2f06%2fServices%2fNotification%2f03%2fNotify%22
Path=/WorkItemTracking/v1.0/Integration.asmx
Local Request=True
User Host Address=10.100.101.5
User=NT AUTHORITY\NETWORK SERVICE [auth = NTLM]Application Provided Information
Team Foundation Application Information
Event Log Source = TFS WorkItem Tracking
Configured Team Foundation Server = http://MARIANNETIMMER:8080
License Type = EnterpriseLicense
Server Culture = en-US
Activity Logging Name = WorkItem Tracking
Component Name = WI
Database Schema Version = 9.20904.00
Initialized = Yes
Requests Processed = 139
Exception: SqlException
Message: Cannot insert the value NULL into column 'ChangerID', table 'TfsWorkItemTracking.dbo.Constants'; column does not allow nulls. INSERT fails.
SQL Exception Class: 16
SQL Exception Number: 515
SQL Exception Server: MARIANNETIMMER
SQL Exception Source: .Net SqlClient Data Provider
SQL Exception State: 2
SQL Exception Procedure: AddConstant
SQL Exception Line Number: 130
Exception Data Dictionary follows
HelpLink.ProdName = Microsoft SQL Server
HelpLink.ProdVer = 09.00.3068
HelpLink.EvtSrc = MSSQLServer
HelpLink.EvtID = 515
HelpLink.BaseHelpUrl = http://go.microsoft.com/fwlink
HelpLink.LinkId = 20476
Stack Trace:
at Microsoft.TeamFoundation.WorkItemTracking.Server.SqlAccess.HandleDalError(Exception e)
at Microsoft.TeamFoundation.WorkItemTracking.Server.SqlAccess.ExecuteBatchPayloadImpl(IRequestContext context, String sqlBatch, List`1 parameterList, Boolean& errorOnBulkUpdate, String connectionString)
at Microsoft.TeamFoundation.WorkItemTracking.Server.AdoDbBase.ExecuteBatchQuery(IRequestContext context, String sqlBatch, List`1 parameterList)
at Microsoft.TeamFoundation.WorkItemTracking.Server.SqlBatchBuilder.ExecuteBatchInternal(IRequestContext context, Boolean passInConnectionInfo, String server, String database)
at Microsoft.TeamFoundation.WorkItemTracking.Server.DataAccessLayerImpl.AddNewBuild(String serverName, String databaseName, String userSid, String buildName, String project, String uri)
at Microsoft.TeamFoundation.WorkItemTracking.Server.IntegrationService.Notify(String eventXml, String tfsIdentityXml)Application Domain Information
Assembly Name=mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
Assembly CLR Version=v2.0.50727
Assembly Version=2.0.0.0
Assembly Location=C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\mscorlib.dll
Assembly File Version:
File: C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\mscorlib.dll
InternalName: mscorlib.dll
OriginalFilename: mscorlib.dll
FileVersion: 2.0.50727.1433 (REDBITS.050727-1400)
FileDescription: Microsoft Common Language Runtime Class Library
Product: Microsoft® .NET Framework
ProductVersion: 2.0.50727.1433
Debug: False
Patched: False
PreRelease: False
PrivateBuild: False
SpecialBuild: False
Language: English (United States)Assembly Name=System.Web, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a
Assembly CLR Version=v2.0.50727
Assembly Version=2.0.0.0
Assembly Location=C:\WINDOWS\assembly\GAC_32\System.Web\2.0.0.0__b03f5f7f11d50a3a\System.Web.dll
Assembly File Version:
File: C:\WINDOWS\assembly\GAC_32\System.Web\2.0.0.0__b03f5f7f11d50a3a\System.Web.dll
InternalName: System.Web.dll
OriginalFilename: System.Web.dll
FileVersion: 2.0.50727.1433 (REDBITS.050727-1400)
FileDescription: System.Web.dll
Product: Microsoft® .NET Framework
ProductVersion: 2.0.50727.1433
Debug: False
Patched: False
PreRelease: False
PrivateBuild: False
SpecialBuild: False
Language: English (United States)Assembly Name=System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
Assembly CLR Version=v2.0.50727
Assembly Version=2.0.0.0
Assembly Location=C:\WINDOWS\assembly\GAC_MSIL\System\2.0.0.0__b77a5c561934e089\System.dll
Assembly File Version:
File: C:\WINDOWS\assembly\GAC_MSIL\System\2.0.0.0__b77a5c561934e089\System.dll
InternalName: System.dll
OriginalFilename: System.dll
FileVersion: 2.0.50727.1433 (REDBITS.050727-1400)
FileDescription: .NET Framework
Product: Microsoft® .NET Framework
ProductVersion: 2.0.50727.1433
Debug: False
Patched: False
PreRelease: False
PrivateBuild: False
SpecialBuild: False
Language: English (United States)Assembly Name=System.Xml, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
Assembly CLR Version=v2.0.50727
Assembly Version=2.0.0.0
Assembly Location=C:\WINDOWS\assembly\GAC_MSIL\System.Xml\2.0.0.0__b77a5c561934e089\System.Xml.dll
Assembly File Version:
File: C:\WINDOWS\assembly\GAC_MSIL\System.Xml\2.0.0.0__b77a5c561934e089\System.Xml.dll
InternalName: System.Xml.dll
OriginalFilename: System.Xml.dll
FileVersion: 2.0.50727.1433 (REDBITS.050727-1400)
FileDescription: .NET Framework
Product: Microsoft® .NET Framework
ProductVersion: 2.0.50727.1433
Debug: False
Patched: False
PreRelease: False
PrivateBuild: False
SpecialBuild: False
Language: English (United States)Assembly Name=System.Configuration, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a
Assembly CLR Version=v2.0.50727
Assembly Version=2.0.0.0
Assembly Location=C:\WINDOWS\assembly\GAC_MSIL\System.Configuration\2.0.0.0__b03f5f7f11d50a3a\System.Configuration.dll
Assembly File Version:
File: C:\WINDOWS\assembly\GAC_MSIL\System.Configuration\2.0.0.0__b03f5f7f11d50a3a\System.Configuration.dll
InternalName: System.Configuration.dll
OriginalFilename: System.Configuration.dll
FileVersion: 2.0.50727.1433 (REDBITS.050727-1400)
FileDescription: System.Configuration.dll
Product: Microsoft® .NET Framework
ProductVersion: 2.0.50727.1433
Debug: False
Patched: False
PreRelease: False
PrivateBuild: False
SpecialBuild: False
Language: English (United States)Assembly Name=System.Data, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
Assembly CLR Version=v2.0.50727
Assembly Version=2.0.0.0
Assembly Location=C:\WINDOWS\assembly\GAC_32\System.Data\2.0.0.0__b77a5c561934e089\System.Data.dll
Assembly File Version:
File: C:\WINDOWS\assembly\GAC_32\System.Data\2.0.0.0__b77a5c561934e089\System.Data.dll
InternalName: system.data.dll
OriginalFilename: system.data.dll
FileVersion: 2.0.50727.1433 (REDBITS.050727-1400)
FileDescription: .NET Framework
Product: Microsoft® .NET Framework
ProductVersion: 2.0.50727.1433
Debug: False
Patched: False
PreRelease: False
PrivateBuild: False
SpecialBuild: False
Language: English (United States)Assembly Name=System.Transactions, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
Assembly CLR Version=v2.0.50727
Assembly Version=2.0.0.0
Assembly Location=C:\WINDOWS\assembly\GAC_32\System.Transactions\2.0.0.0__b77a5c561934e089\System.Transactions.dll
Assembly File Version:
File: C:\WINDOWS\assembly\GAC_32\System.Transactions\2.0.0.0__b77a5c561934e089\System.Transactions.dll
InternalName: system.transactions.dll
OriginalFilename: system.transactions.dll
FileVersion: 2.0.50727.1433 (REDBITS.050727-1400)
FileDescription: .NET Framework
Product: Microsoft® .NET Framework
ProductVersion: 2.0.50727.1433
Debug: False
Patched: False
PreRelease: False
PrivateBuild: False
SpecialBuild: False
Language: English (United States)Assembly Name=System.EnterpriseServices, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a
Assembly CLR Version=v2.0.50727
Assembly Version=2.0.0.0
Assembly Location=C:\WINDOWS\assembly\GAC_32\System.EnterpriseServices\2.0.0.0__b03f5f7f11d50a3a\System.EnterpriseServices.dll
Assembly File Version:
File: C:\WINDOWS\assembly\GAC_32\System.EnterpriseServices\2.0.0.0__b03f5f7f11d50a3a\System.EnterpriseServices.dll
InternalName: System.EnterpriseServices.dll
OriginalFilename: System.EnterpriseServices.dll
FileVersion: 2.0.50727.1433 (REDBITS.050727-1400)
FileDescription: Microsoft .NET Services Support Infrastructure
Product: Microsoft® .NET Framework
ProductVersion: 2.0.50727.1433
Debug: False
Patched: False
PreRelease: False
PrivateBuild: False
SpecialBuild: False
Language: English (United States)Assembly Name=Microsoft.JScript, Version=8.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a
Assembly CLR Version=v2.0.50727
Assembly Version=8.0.0.0
Assembly Location=C:\WINDOWS\assembly\GAC_MSIL\Microsoft.JScript\8.0.0.0__b03f5f7f11d50a3a\Microsoft.JScript.dll
Assembly File Version:
File: C:\WINDOWS\assembly\GAC_MSIL\Microsoft.JScript\8.0.0.0__b03f5f7f11d50a3a\Microsoft.JScript.dll
InternalName: Microsoft.JScript.dll
OriginalFilename: Microsoft.JScript.dll
FileVersion: 8.0.50727.1433
FileDescription: Microsoft.JScript.dll
Product: Microsoft (R) Visual Studio (R) 2005
ProductVersion: 8.0.50727.1433
Debug: False
Patched: False
PreRelease: False
PrivateBuild: False
SpecialBuild: False
Language: Language NeutralAssembly Name=VJSharpCodeProvider, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a
Assembly CLR Version=v2.0.50727
Assembly Version=2.0.0.0
Assembly Location=C:\WINDOWS\assembly\GAC_32\VJSharpCodeProvider\2.0.0.0__b03f5f7f11d50a3a\VJSharpCodeProvider.dll
Assembly File Version:
File: C:\WINDOWS\assembly\GAC_32\VJSharpCodeProvider\2.0.0.0__b03f5f7f11d50a3a\VJSharpCodeProvider.dll
InternalName: VJSharpCodeProvider.dll
OriginalFilename: VJSharpCodeProvider.dll
FileVersion: 2.0.50727.42 (RTM.050727-4200)
FileDescription: Microsoft Visual J#® .NET Managed Code DOM Provider
Product: Microsoft Visual J#® .NET
ProductVersion: 2.0.50727.42
Debug: False
Patched: False
PreRelease: False
PrivateBuild: False
SpecialBuild: False
Language: English (United States)Assembly Name=CppCodeProvider, Version=8.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a
Assembly CLR Version=v2.0.50727
Assembly Version=8.0.0.0
Assembly Location=C:\WINDOWS\assembly\GAC_MSIL\CppCodeProvider\8.0.0.0__b03f5f7f11d50a3a\CppCodeProvider.dll
Assembly File Version:
File: C:\WINDOWS\assembly\GAC_MSIL\CppCodeProvider\8.0.0.0__b03f5f7f11d50a3a\CppCodeProvider.dll
InternalName: CppCodeProvider.dll
OriginalFilename: CppCodeProvider.dll
FileVersion: 8.0.50727.813
FileDescription: CppCodeProvider.dll
Product: Microsoft (R) Visual Studio (R) 2005
ProductVersion: 8.0.50727.813
Debug: False
Patched: False
PreRelease: False
PrivateBuild: False
SpecialBuild: False
Language: Language NeutralAssembly Name=App_global.asax.8moyxg50, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null
Assembly CLR Version=v2.0.50727
Assembly Version=0.0.0.0
Assembly Location=C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files\workitemtracking\27cb2108\45dd2f02\App_global.asax.8moyxg50.dll
Assembly File Version:
File: C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files\workitemtracking\27cb2108\45dd2f02\App_global.asax.8moyxg50.dll
InternalName: App_global.asax.8moyxg50.dll
OriginalFilename: App_global.asax.8moyxg50.dll
FileVersion: 0.0.0.0
FileDescription:
Product:
ProductVersion: 0.0.0.0
Debug: False
Patched: False
PreRelease: False
PrivateBuild: False
SpecialBuild: False
Language: Language NeutralAssembly Name=Microsoft.TeamFoundation.WorkItemTracking.Server.DataServices, Version=9.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a
Assembly CLR Version=v2.0.50727
Assembly Version=9.0.0.0
Assembly Location=C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files\workitemtracking\27cb2108\45dd2f02\assembly\dl3\7f6fae24\5088aba2_d822c801\Microsoft.TeamFoundation.WorkItemTracking.Server.DataServices.DLL
Assembly File Version:
File: C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files\workitemtracking\27cb2108\45dd2f02\assembly\dl3\7f6fae24\5088aba2_d822c801\Microsoft.TeamFoundation.WorkItemTracking.Server.DataServices.DLL
InternalName: Microsoft.TeamFoundation.WorkItemTracking.Server.DataServices.dll
OriginalFilename: Microsoft.TeamFoundation.WorkItemTracking.Server.DataServices.dll
FileVersion: 9.0.21022.8 built by: RTM
FileDescription: Work Item Tracking Client Web Service
Product: Microsoft® Visual Studio® 2008
ProductVersion: 9.0.21022.8
Debug: False
Patched: False
PreRelease: False
PrivateBuild: False
SpecialBuild: False
Language: English (United States)Assembly Name=Microsoft.TeamFoundation.Common, Version=9.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a
Assembly CLR Version=v2.0.50727
Assembly Version=9.0.0.0
Assembly Location=C:\WINDOWS\assembly\GAC_32\Microsoft.TeamFoundation.Common\9.0.0.0__b03f5f7f11d50a3a\Microsoft.TeamFoundationCode SnippetEvent Type: Warning
Event Source: TFS WorkItem Tracking
Event Category: None
Event ID: 6004
Date: 1-8-2008
Time: 10:54:11
User: N/A
Computer: MARIANNETIMMER
Description:
TF53010: The following error has occurred in a Team Foundation component or extension:
Date (UTC): 8/1/2008 8:54:11 AM
Machine: MARIANNETIMMER
Application Domain: /LM/W3SVC/3/Root/WorkItemTracking-5-128620266027369380
Assembly: Microsoft.TeamFoundation.Common, Version=9.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a; v2.0.50727
Process Details:
Process Name: w3wp
Process Id: 23516
Thread Id: 22636
Account name: NT AUTHORITY\NETWORK SERVICEDetailed Message: TF53014: A crash report for this problem was recently created; a new crash report for this occurrence of the problem is not being created. This problem has occurred 19 times.
Web Request Details
Url: http://mariannetimmer:8080/WorkItemTracking/v1.0/Integration.asmx [method: POST]
User Agent: Team Foundation (w3wp.exe[Integration], 9.0.21022.8)
Headers: Content-Length=1721&Content-Type=text%2fxml%3b+charset%3dutf-8&Accept-Encoding=gzip&Accept-Language=en-US&Expect=100-continue&Host=mariannetimmer%3a8080&User-Agent=Team+Foundation+(w3wp.exe%5bIntegration%5d%2c+9.0.21022.8)&X-TFS-Version=1.0.0.0&X-TFS-Session=00000000-0000-0000-0000-000000000000&SOAPAction=%22http%3a%2f%2fschemas.microsoft.com%2fTeamFoundation%2f2005%2f06%2fServices%2fNotification%2f03%2fNotify%22
Path: /WorkItemTracking/v1.0/Integration.asmx
Local Request: True
Host Address: 10.100.101.5
User: NT AUTHORITY\NETWORK SERVICE [authentication type: NTLM]Exception Message: Cannot insert the value NULL into column 'ChangerID', table 'TfsWorkItemTracking.dbo.Constants'; column does not allow nulls. INSERT fails. (type SqlException)
SQL Exception Class: 16
SQL Exception Number: 515
SQL Exception Procedure: AddConstant
SQL Exception Line Number: 130
SQL Exception Server: MARIANNETIMMER
SQL Exception State: 2
SQL Error(s):Exception Data Dictionary:
HelpLink.ProdName = Microsoft SQL Server
HelpLink.ProdVer = 09.00.3068
HelpLink.EvtSrc = MSSQLServer
HelpLink.EvtID = 515
HelpLink.BaseHelpUrl = http://go.microsoft.com/fwlink
HelpLink.LinkId = 20476
Exception Stack Trace: at Microsoft.TeamFoundation.WorkItemTracking.Server.SqlAccess.HandleDalError(Exception e)
at Microsoft.TeamFoundation.WorkItemTracking.Server.SqlAccess.ExecuteBatchPayloadImpl(IRequestContext context, String sqlBatch, List`1 parameterList, Boolean& errorOnBulkUpdate, String connectionString)
at Microsoft.TeamFoundation.WorkItemTracking.Server.AdoDbBase.ExecuteBatchQuery(IRequestContext context, String sqlBatch, List`1 parameterList)
at Microsoft.TeamFoundation.WorkItemTracking.Server.SqlBatchBuilder.ExecuteBatchInternal(IRequestContext context, Boolean passInConnectionInfo, String server, String database)
at Microsoft.TeamFoundation.WorkItemTracking.Server.DataAccessLayerImpl.AddNewBuild(String serverName, String databaseName, String userSid, String buildName, String project, String uri)
at Microsoft.TeamFoundation.WorkItemTracking.Server.IntegrationService.Notify(String eventXml, String tfsIdentityXml)I can't find anything on the web about these error messages. Does anyone here have an idea why they are suddenly appearing and what to do about them? The only problem i can see so far with the actual workings of the server is that areas and iterations are not updated in the work item view.
답변
We have an upgrade bug where certain older versions of TFS would write NETWORK SERVICE to the database as a Windows Group rather than a Windows User. Unfortunately, there are a few random places in the WIT code base that check that the service account is a Windows User. The synchronization of nodes and builds are the most noticeable example.
Unfortunately, there is no way to to resolve this issue through the public APIs. The system assumes that, once an identity has been written to the database with a specific type, the identity's type will not change.
Your options:
1.) Install TFS2008 SP1. It won't fix the identity type of NETWORK SERICE, but it fixes the places in WIT that require the service account to be a Windows User.
2.) Update the database manually:
use
TfsIntegrationupdate
[tbl_security_identity_cache]set
[type] = 2where
[account_name] = 'NETWORK SERVICE' and [type] = 3GO
use
TfsWorkItemTrackingbegin
transet
xact_abort onset
nocount onexec
dbo.BoxCarAdminDataChanges null,nullupdate
[ADObjects]set
[ObjectCategory] = 2where
[SamAccountName] = 'NETWORK SERVICE' and [ObjectCategory] = 3if
(@@rowcount > 0)begin
declare @constID int select @constID = [ConstID] from [Constants] where [NamePart] = 'NETWORK SERVICE'update [Persons]
set [fUser] = 1, [fGroup] = 0
where [fUser] = 0 and [ConstID] = @constID
if
(@@rowcount = 0)begin
insert
into dbo.Persons (ConstID,fUser,fGroup,fForeignPrincipal,fComputer,fEmailName,fSamName,ProjectID)values
(@constID,1,0,0,0,0,1,0)end
update [Sets]
set [fDeletedHere] = 1
where [ParentID] = -10 and [ConstID] = @constID
update [Sets]
set [fDeletedHere] = 0
where [ParentID] = -2 and [ConstID] = @constID
if (@@rowcount = 0)
begin insert into [Sets] ([ParentID],[ConstID],[fDeletedInAD],[fDeletedHere],[ChangerID],[ChangeDate]) values (-2, @constID, 0, 0, 0, getutcdate()) endprint('Success!')
end
commit tran
To verify success, you can run re-run the queries that I provided before. The 3's should become 2's, and fUser should go from 0 to 1.
모든 응답
Moving to the WIT forum in case someone there has run across this.
Cheers,
Adam
This error will occur if the account running the TFS app pool is not a member of the TFS Service Accounts role.
You can verify the membership of that group through the VS UI. Based on your error messages, it should contain NT AUTHORITY\NETWORK SERVICE.
If you see NETWORK SERVICE in the group in the UI, there may be something wrong in the underlying storage. Some TSQLqueries to run:
select
[type], [deleted] from TfsIntegration.dbo.tbl_security_identity_cache where account_name = 'NETWORK SERVICE'select
[ObjectCategory], [fDeleted] from TfsWorkItemTracking.dbo.ADObjects where SamAccountName = 'NETWORK SERVICE'select
[RemovedDate] from TfsWorkItemTracking.dbo.Constants where NamePart = 'NETWORK SERVICE'select
[fUser] from TfsWorkItemTracking.dbo.Persons where ConstID in (select c.[ConstID] from TfsWorkItemTracking.dbo.Constants c where NamePart = 'NETWORK SERVICE')Thanks for your answer, i had almost given up hope.
NT AUTHORITY\NETWORK SERVICE is present in the group you mentioned. So there must be something wrong with the data. I ran your queries, but i can not interpret the data they output. So i hope you can, here are the results of the queries:
Type Deleted
3 0
ObjectCategory fDeleted
3 0
RemovedDate
9999-01-01 00:00:00.000
fUser
0
Thanks in advance for your analysis.
There is a problem with your data. I think that I have a resolution, but I want to confirm your server information to ensure that the resolution is not temporary and that I've identified the correct root cause.
1.) Is the server currently running TFS2008 RTM?
2.) Had the server been running a beta version of TFS2008?
3.) If the server had been running TFS2005, was it using NT AUTHORITY\NETWORK SERVICE as a service account?
I hope that you have a fix, here are the answers to the questions:
1. Yes
2. No
3. Not 100% sure, but i am fairly certain that it used another account.
We have an upgrade bug where certain older versions of TFS would write NETWORK SERVICE to the database as a Windows Group rather than a Windows User. Unfortunately, there are a few random places in the WIT code base that check that the service account is a Windows User. The synchronization of nodes and builds are the most noticeable example.
Unfortunately, there is no way to to resolve this issue through the public APIs. The system assumes that, once an identity has been written to the database with a specific type, the identity's type will not change.
Your options:
1.) Install TFS2008 SP1. It won't fix the identity type of NETWORK SERICE, but it fixes the places in WIT that require the service account to be a Windows User.
2.) Update the database manually:
use
TfsIntegrationupdate
[tbl_security_identity_cache]set
[type] = 2where
[account_name] = 'NETWORK SERVICE' and [type] = 3GO
use
TfsWorkItemTrackingbegin
transet
xact_abort onset
nocount onexec
dbo.BoxCarAdminDataChanges null,nullupdate
[ADObjects]set
[ObjectCategory] = 2where
[SamAccountName] = 'NETWORK SERVICE' and [ObjectCategory] = 3if
(@@rowcount > 0)begin
declare @constID int select @constID = [ConstID] from [Constants] where [NamePart] = 'NETWORK SERVICE'update [Persons]
set [fUser] = 1, [fGroup] = 0
where [fUser] = 0 and [ConstID] = @constID
if
(@@rowcount = 0)begin
insert
into dbo.Persons (ConstID,fUser,fGroup,fForeignPrincipal,fComputer,fEmailName,fSamName,ProjectID)values
(@constID,1,0,0,0,0,1,0)end
update [Sets]
set [fDeletedHere] = 1
where [ParentID] = -10 and [ConstID] = @constID
update [Sets]
set [fDeletedHere] = 0
where [ParentID] = -2 and [ConstID] = @constID
if (@@rowcount = 0)
begin insert into [Sets] ([ParentID],[ConstID],[fDeletedInAD],[fDeletedHere],[ChangerID],[ChangeDate]) values (-2, @constID, 0, 0, 0, getutcdate()) endprint('Success!')
end
commit tran
To verify success, you can run re-run the queries that I provided before. The 3's should become 2's, and fUser should go from 0 to 1.
It seems to work, i previously tried to install SP1, but it wouldn't install. So thats the next problem on my list. But this one is fixed.

