Project creation fails

Hi, I'm getting the following error when creating a new project in TFS:
Event Description: Task "Currituck.WITs" failed
Exception Type: System.Web.Services.Protocols.SoapException
Exception Message: Server was unable to process request. > Violation of UNIQUE KEY constraint 'UQ_ADObjects__DomainName_SamAccountName'. Cannot insert duplicate key in object 'dbo.ADObjects'.
SoapException Detail: <soap:Detail xmlns:soap="http://www.w3.org/2003/05/soap-envelope" />
SoapException Full Info: System.Web.Services.Protocols.SoapException: Server was unable to process request. > Violation of UNIQUE KEY constraint 'UQ_ADObjects__DomainName_SamAccountName'. Cannot insert duplicate key in object 'dbo.ADObjects'.
at System.Web.Services.Protocols.SoapHttpClientProtocol.ReadResponse(SoapClientMessage message, WebResponse response, Stream responseStream, Boolean asyncCall)
at System.Web.Services.Protocols.SoapHttpClientProtocol.Invoke(String methodName, Object[] parameters)
at Microsoft.VisualStudio.Currituck.Proxies.DataServices.ClientServiceProxy.SyncBisGroupsAndUsers(String projectUri)
at Microsoft.VisualStudio.Currituck.Proxies.DataServices.ClientService.SyncBisGroupsAndUsers(String requestId, String projectUri)
at Microsoft.VisualStudio.Currituck.Package.CurrituckPcwPlugin.PcwPluginComponentCreator.SyncUsersAndGroups(ContextWrapper wrapper, String WebServiceUrl, String ProjectUri)
at Microsoft.VisualStudio.Currituck.Package.CurrituckPcwPlugin.PcwPluginComponentCreator.Synchronize(ContextWrapper wrapper)
at Microsoft.VisualStudio.Currituck.Package.CurrituckPcwPlugin.PcwPluginComponentCreator.Execute(ProjectCreationContext ctxt, XmlNode taskXml)
at Microsoft.VisualStudio.TeamSystem.ELead.ProjectCreationNew.ProjectCreationEngine.TaskExecutor.PerformTask(IProjectComponentCreator componentCreator, ProjectCreationContext context, XmlNode taskXml)
at Microsoft.VisualStudio.TeamSystem.ELead.ProjectCreationNew.ProjectCreationEngine.RunTask(Object taskObj)
Stack Trace:
at System.Web.Services.Protocols.SoapHttpClientProtocol.ReadResponse(SoapClientMessage message, WebResponse response, Stream responseStream, Boolean asyncCall)
at System.Web.Services.Protocols.SoapHttpClientProtocol.Invoke(String methodName, Object[] parameters)
at Microsoft.VisualStudio.Currituck.Proxies.DataServices.ClientServiceProxy.SyncBisGroupsAndUsers(String projectUri)
at Microsoft.VisualStudio.Currituck.Proxies.DataServices.ClientService.SyncBisGroupsAndUsers(String requestId, String projectUri)
at Microsoft.VisualStudio.Currituck.Package.CurrituckPcwPlugin.PcwPluginComponentCreator.SyncUsersAndGroups(ContextWrapper wrapper, String WebServiceUrl, String ProjectUri)
at Microsoft.VisualStudio.Currituck.Package.CurrituckPcwPlugin.PcwPluginComponentCreator.Synchronize(ContextWrapper wrapper)
at Microsoft.VisualStudio.Currituck.Package.CurrituckPcwPlugin.PcwPluginComponentCreator.Execute(ProjectCreationContext ctxt, XmlNode taskXml)
at Microsoft.VisualStudio.TeamSystem.ELead.ProjectCreationNew.ProjectCreationEngine.TaskExecutor.PerformTask(IProjectComponentCreator componentCreator, ProjectCreationContext context, XmlNode taskXml)
at Microsoft.VisualStudio.TeamSystem.ELead.ProjectCreationNew.ProjectCreationEngine.RunTask(Object taskObj)
end Exception entry
I have project creation rights in TFS, I am an admin in Sharepoint and I am in the nampsace admin group.... what am I missing?`
When trying to create a project with TFSSERVICE, I get the same result.
[3614 byte] By [thys] at [2007-12-16]
# 1
Are you using a project name that you used and deleted before? If so, I believe you will not be able to reuse that Team Project name.
D.OmarVillarreal at 2007-9-9 > top of Msdn Tech,Visual Studio Team System,Team Foundation Server - General...
# 2
No, that was not the case, although I've noticed before that deleting a project doesn't free its name.
Somehow, a duplicate key error occurs. TFS tries to insert a record with an already existing combination of DomainName and SamAccountName. DomainName might be the project name, but I'm certain that I used new project names, so how could a duplicate occur?
thys at 2007-9-9 > top of Msdn Tech,Visual Studio Team System,Team Foundation Server - General...
# 3
What is the name of your Team Foundation Server as it appears in Team Explorer? I believe we have seen problems when you use the Fully Qualified Name versus just the computer name. If you have the full name there (i.e. MyServer.MyDomain.com) click on the 'Connect to Team Foundation Server' button and connect add a connection to 'MyServer', then try using that one.
D.OmarVillarreal at 2007-9-9 > top of Msdn Tech,Visual Studio Team System,Team Foundation Server - General...
# 4
We always use the short computer name, not the Fully Qualified Name, so that shouldn't be a problem.
Will the deleteteamproject procedure change before RTM? I mean, will it really delete everything of the project, thus enabling the re-use of a project name?
thys at 2007-9-9 > top of Msdn Tech,Visual Studio Team System,Team Foundation Server - General...
# 5
Yes. By the time v1 ships, deleteteamproject will allow you to reuse the project name.

Buck

BuckHodges at 2007-9-9 > top of Msdn Tech,Visual Studio Team System,Team Foundation Server - General...
# 6
Hi,

I have Exactly same problem? Have you resolved it?

njalkane at 2007-9-9 > top of Msdn Tech,Visual Studio Team System,Team Foundation Server - General...
# 7
Hi,

I have Exactly same problem? Have you resolved it? I can create project with tfsservice or tfssetup account but not my own? Is some rights missing?

njalkane at 2007-9-9 > top of Msdn Tech,Visual Studio Team System,Team Foundation Server - General...
# 8
Unfortunately not. I found out that that was a problem with a unique key contraint, so I thought "let's see what happens when I remove it". Well, that was not a good idea, in the end I decided to rebuild my whole VSTS environment.
thys at 2007-9-9 > top of Msdn Tech,Visual Studio Team System,Team Foundation Server - General...
# 9

This is due to data corruption in BIS db. You can verify this by running the following SQL Query in BIS DB.

select
account_name from dbo.[tbl_security_identity_cache] group by account_name having count(*) > 1

The fix is really painful.
1. You need to delete the identity in question from the above table Bis.dbo.[tbl_security_identity_cache]
2. Update the SID of the corresponding Identity (left in the above table) in CurrituckDB.dbo.[ADObjects] & CurrituckDB.dbo.[Constants] tables

Let us know if you have questions.

Thanks
-Sundar

Sundar at 2007-9-9 > top of Msdn Tech,Visual Studio Team System,Team Foundation Server - General...
# 10
Updated the SQL query in my previous post (to be run on BIS db).

select * from [tbl_security_identity_cache]

where account_name in

(

select account_name from [tbl_security_identity_cache]

group by account_name having count(*) > 1

) and account_name <> ''

Sundar at 2007-9-9 > top of Msdn Tech,Visual Studio Team System,Team Foundation Server - General...
# 11
Thanks! This looks like the solution!
thys at 2007-9-9 > top of Msdn Tech,Visual Studio Team System,Team Foundation Server - General...
# 12
hi,

I couldn't make it work ? mayby my own mistake, Delete some wrong line, i think... I think I install server again.

thanks

niko

njalkane at 2007-9-9 > top of Msdn Tech,Visual Studio Team System,Team Foundation Server - General...
# 13

Hi,

I have the same problem with the final version of team system, not the betas.

I couldn't find the [tbl_security_identity_cache] table in the DB or the BIS DB? does it has a new name in the final version?

How can I find it?

Thanks

DotanP at 2007-9-9 > top of Msdn Tech,Visual Studio Team System,Team Foundation Server - General...
# 14

It's in the TfsIntegration database. It still has the same name (tbl_security_identity_cache)

JamesManning-MSFT at 2007-9-9 > top of Msdn Tech,Visual Studio Team System,Team Foundation Server - General...

Visual Studio Team System

Site Classified