问题
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
回答1:
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
回答2:
After trying everything (without touching the real Data) I succeeded.
I decided to split the upgrade process to two 2008-2010 and 2010-2012.
- I copied the 2008 TFS db's to the neNew SQLSERVER which is being used by the TFS 2012
- I added another VM with TFS 2010
- I run from TFS 2010 the upgrade wizard which identify the 2008 copied db's
- The result was a new collection attached to TFS 2010
- I detached the collection On the TFS 2012
- I run attach collection (the TFS 2010 one) and this upgraded the collection.
The process worked smothly.
Thanks all for the Help
Erez.h
来源:https://stackoverflow.com/questions/20972422/migrate-data-from-tfs-2008-to-an-already-working-tfs-2012