Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
426 views
in Technique[技术] by (71.8m points)

tfs migration - migrate data from TFS 2008 to an already working TFS 2012

I read everything about the upgrade process from TFS 2008 to 2012.

but my situation is a bit diffrent. I need to move data from tfs 2008 (sqlserver 2003) to tfs 2012 (sqlserver 2008 R2) without damaging the TFS 2012 data.

what is the best practice?

Adding some issues:

I am trying to be as cautious as possible without damaging any of the data. So I have: 1. old server TFS 2008 with sqlserver 2005 which is being used 2 demo server with TFS 2012 and sqlserver 2008 R2 with some collections and projects on it (this is a replica of a server we have and is being used as well).

The main purpose is to transfer all data to the 2012 server and kill the old machine. what i did was to take a backup from the sqlserver 2005 and restore all the tfs* db's to the demo server . TfsActivityLogging TfsBuild TfsIntegration TfsVersionControl TfsWarehouse TfsWorkItemTracking TfsWorkItemTrackingAttachments

Afterward I run "tfsconfig import" on the demo server.

TfsConfig Import /SQLInstance:SQLSERVERNAME /CollectionName:DemoImportCollection /confirmed

which fails:

Creating temporary structures... (169 of 502)
[Info   @15:45:36.159] [2014-01-14 15:45:33Z][Error] TF400744: An error occurred while executing the following script: UpgradeTestResults_OrcasToDev10Beta1.sql. Failed batch starts on the line 613. Statement line: 23. Script line: 635. Error: 2627 Violation of PRIMARY KEY constraint 'PK__tmp_tbl___1786A43E234A136B'. Cannot insert duplicate key in object 'dbo.tmp_tbl_OrcasTestOutcomeLookUp'. The duplicate key value is (?????????????????¢????????????). (169 of 502)
[Info   @15:45:36.159] [2014-01-14 15:45:34Z][Informational] Microsoft.TeamFoundation.Framework.Server.CollectionServicingException: TF400744: An error occurred while executing the following script: UpgradeTestResults_OrcasToDev10Beta1.sql. Failed batch starts on the line 613. Statement line: 23. Script line: 635. Error: 2627 Violation of PRIMARY KEY constraint 'PK__tmp_tbl___1786A43E234A136B'. Cannot insert duplicate key in object 'dbo.tmp_tbl_OrcasTestOutcomeLookUp'. The duplicate key value is (?????????????????¢????????????).
   at Microsoft.TeamFoundation.Framework.Server.SqlScriptResourceComponent.ExecuteScripts(List`1 scripts, SqlParameter[] sqlParameters, List`1 serviceVersions, Boolean acquireLock)
   at Microsoft.TeamFoundation.Server.Servicing.TFCollection.FrameworkStepPerformer.ExecuteSql(String stepData, ServicingContext servicingContext)
   at Microsoft.TeamFoundation.Framework.Server.TeamFoundationStepPerformerBase.Microsoft.TeamFoundation.Framework.Server.IStepPerformer.PerformStep(String servicingOperation, String stepType, String stepData, ServicingContext servicingContext)
   at Microsoft.TeamFoundation.Framework.Server.ServicingStepDriver.PerformServicingStep(ServicingStep step, ServicingContext servicingContext, ServicingStepGroup group, ServicingOperation servicingOperation) (169 of 502)
[Warning@15:45:36.596] TF255185: Encountered a warning during operation. Message=[2014-01-14 15:45:34Z] Servicing step Upgrade Test Results failed. (ServicingOperation: UpgradePreTfs2010Databases; Step group: Upgrade.TfsTestManagement).
[Info   @15:45:36.627] [2014-01-14 15:45:34Z] Servicing step Upgrade Test Results failed. (ServicingOperation: UpgradePreTfs2010Databases; Step group: Upgrade.TfsTestManagement) (169 of 502)
[Info   @15:45:36.627] [2014-01-14 15:45:34Z][Informational] Removing item. Key: TargetRequestContext. (169 of 502)
[Info   @15:45:36.627] [2014-01-14 15:45:34Z][Informational] Clearing dictionary, removing all items. (169 of 502)
[Warning@15:45:36.659] TF255185: Encountered a warning during operation. Message=TF255271: The team project collection could not be created. The number of steps before the completion of project creation is: 502. The number of steps completed before the failure was 169..
[Warning@15:45:37.690] Warning Message: [2014-01-14 15:45:34Z] Servicing step Upgrade Test Results failed. (ServicingOperation: UpgradePreTfs2010Databases; Step group: Upgrade.TfsTestManagement)
[Warning@15:45:37.690] 
[Warning@15:45:37.737] Warning Message: TF255271: The team project collection could not be created. The number of steps before the completion of project creation is: 502. The number of steps completed before the failure was 169.
[Warning@15:45:37.737] 

I have a suspicion that this problem occur due to Hebrew characters in database which translate on the temp import tables as question marks ("?????")

Appreciate any help or direction solving this issue.

Regards

Erez

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Reply

0 votes
by (71.8m points)

You can use TFS integration platform for that. It will migrate all the files and history. If you have TFS work items you can migrate those as well(if you use the same Project template on the 2012 server as well)

Two minor points you need to know:

1) After the migration, history will have the Datetime of when you migrate but you can see the actual Datetime in the comments.

2) It will also add an extra text to your comments saying you migrated using the integration platform.

http://tfsintegration.codeplex.com


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...