Error recreating Team Project with same name
-
2005年6月23日 10:54The story:
We created a Team Project with name "SomeProjectName"
Couse of something we deleted it later:
DeleteTeamProject /q /domain:MyDomain SomeProjectName /f
It was ok.
Now I tried to recreate it with the previouse name "SomeProjectName" and I've got this fail and exception in the ProjectCreation log:
---begin Exception entry---
Time: 06/23/2005 12:29:41.237
Module: Engine
Event Description: Task "Scc.SccTask" failed
Exception Type: System.Web.Services.Protocols.SoapException
Exception Message: A database error occurred (SQL error 2627) ---> Violation of PRIMARY KEY constraint 'PK_tbl_tmpReleaseNoteDefinition'. Cannot insert duplicate key in object 'dbo.tbl_tmpReleaseNoteDefinition'.
The statement has been terminated.
SoapException Full Info: System.Web.Services.Protocols.SoapException: A database error occurred (SQL error 2627) ---> Violation of PRIMARY KEY constraint 'PK_tbl_tmpReleaseNoteDefinition'. Cannot insert duplicate key in object 'dbo.tbl_tmpReleaseNoteDefinition'.
The statement has been terminated.
at Microsoft.VisualStudio.Hatteras.Client.Repository.ExecWebServiceRequest(HttpWebRequest request, XmlTextWriter requestXml, HttpWebResponse& response)
at Microsoft.VisualStudio.Hatteras.Client.Repository.CreateCheckinNoteDefinition(String associatedServerItem, FieldDefinition[] checkinNoteFields)
at Microsoft.VisualStudio.Hatteras.Client.TeamProject.SetCheckinNoteFields(FieldDefinition[] checkinNoteFields)
at Microsoft.VisualStudio.Hatteras.Package.SccPortfolioProjectCreator.CreateCheckinNoteField(TeamProject teamProject, String label, Boolean required, Int32 displayOrder)
at Microsoft.VisualStudio.Hatteras.Package.SccPortfolioProjectCreator.InternalExecute(ProjectCreationContext creationContext, XmlNode taskXml, Boolean execute)
at Microsoft.VisualStudio.Hatteras.Package.SccPortfolioProjectCreator.Execute(ProjectCreationContext creationContext, 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 Microsoft.VisualStudio.Hatteras.Client.Repository.ExecWebServiceRequest(HttpWebRequest request, XmlTextWriter requestXml, HttpWebResponse& response)
at Microsoft.VisualStudio.Hatteras.Client.Repository.CreateCheckinNoteDefinition(String associatedServerItem, FieldDefinition[] checkinNoteFields)
at Microsoft.VisualStudio.Hatteras.Client.TeamProject.SetCheckinNoteFields(FieldDefinition[] checkinNoteFields)
at Microsoft.VisualStudio.Hatteras.Package.SccPortfolioProjectCreator.CreateCheckinNoteField(TeamProject teamProject, String label, Boolean required, Int32 displayOrder)
at Microsoft.VisualStudio.Hatteras.Package.SccPortfolioProjectCreator.InternalExecute(ProjectCreationContext creationContext, XmlNode taskXml, Boolean execute)
at Microsoft.VisualStudio.Hatteras.Package.SccPortfolioProjectCreator.Execute(ProjectCreationContext creationContext, 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 ---
Can somebody help me to solve this?
全部回复
-
2005年6月23日 18:04
DeleteTeamProject /q /domain:MyDomain SomeProjectName /f
Since you ran with /f, the deletion would have continued even if there were some parts of the project which could not be deleted. Could you retry without /f to see if any errors exist? -
2005年6月23日 21:55版主
Gabor,
Someone internally recently reported this issue and it is on the way to get fixed.
Please try what Adam suggested and see if DeleteTeamProject reports anything about not being able to clean tbl_tmpReleaseNoteDefinition entries. Most probably DeleteTeamProject is just missing to delete these entries.
To workaround this issue,
- Of course, you could create the team project with different name :)
- You could just get on DataTier and delete everything in tmpReleaseNoteDefinition table. This table, as name suggests, contains ReleaseNoteDefintion information temporarily while real table gets populated. Get connected to VSTEAMSCC database and try...delete from tbl_tmpReleaseNoteDefinition
Try creating the same named project again and see if it project creation goes fine. Let us know if you have any problem.
Thanks,
Bhavik -
2005年6月24日 13:18
Adam, Bhavik: Both of you thaks for the eary answer!
I tried it what you wrote (wo /f and DELETE tbl_tmpReleaseNoteDefinition), but was the same error.
An idea coming: 'tbl_tmpReleaseNoteDefinition' table contains no rows, but the 'tbl_ReleaseNoteDefinition' contain some row referring the SomeProjectName
Step: DELETE FROM tbl_tmpReleaseNoteDefinition
Step: DeleteTeamProject /q /domain:MyDomain SomeProjectName /f
Result:
some exception and Not Found error and the end:
Deleting from vstfs ... Done
Step: DELETE FROM tbl_ReleaseNoteDefinition WHERE AssosiatedItem = '$\SomeProjectName'
Step: Try to recreate
Result: Success
Additional: when I use DeleteTeamProject wo /f swith I gave the following error:
---begin Exception entry---
Time: 06/24/2005 02:30:48.891
Module: Initializer
Event Description: Initialization for plugin "Microsoft.Pcw.Css" failed with error: "Project already exists"
Exception Type:
Microsoft.VisualStudio.TeamSystem.ELead.ProjectCreationNew.PcwInitializationFailedException
Exception Message: Project already exists
Stack Trace:
at Microsoft.VisualStudio.TeamSystem.ELead.ProjectCreationNew.CssStructureUploader.Initialize(ProjectCreationContext context)
at Microsoft.VisualStudio.TeamSystem.ELead.ProjectCreationNew.PluginInitializer.InitializePlugins(MsfTemplate template, ProjectCreationContext context)
--- end Exception entry ---
Thanks for all!

