【问题标题】:migrate data from TFS 2008 to an already working TFS 2012将数据从 TFS 2008 迁移到已经工作的 TFS 2012
【发布时间】:2014-01-07 13:05:45
【问题描述】:

我阅读了有关从 TFS 2008 到 2012 的升级过程的所有内容。

但我的情况有点不同。我需要在不损坏 TFS 2012 数据的情况下将数据从 tfs 2008 (sqlserver 2003) 移动到 tfs 2012 (sqlserver 2008 R2)。

最佳做法是什么?

添加一些问题:

我在不损坏任何数据的情况下尽可能谨慎。 所以我有: 1. 正在使用的带有 sqlserver 2005 的旧服务器 TFS 2008 2 带有 TFS 2012 和 sqlserver 2008 R2 的演示服务器,上面有一些集合和项目(这是我们拥有并且正在使用的服务器的副本)。

主要目的是将所有数据传输到2012服务器并杀死旧机器。 我所做的是从 sqlserver 2005 备份并将所有 tf​​s* db 恢复到演示服务器。 TfsActivityLogging TfsBuild Tfs集成 Tfs版本控制 Tfs仓库 TfsWorkItemTracking TfsWorkItemTrackingAttachments

之后我在演示服务器上运行“tfsconfig import”。

TfsConfig 导入 /SQLInstance:SQLSERVERNAME /CollectionName:DemoImportCollection /confirmed

失败了:

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] 

我怀疑出现此问题是由于数据库中的希伯来语字符在临时导入表上翻译为问号(“?????”)

感谢任何解决此问题的帮助或指导。

问候

埃雷兹

【问题讨论】:

    标签: tfs tfs-migration


    【解决方案1】:

    您可以为此使用 TFS 集成平台。它将迁移所有文件和历史记录。如果您有 TFS 工作项,您也可以迁移它们(如果您在 2012 服务器上也使用相同的项目模板)

    你需要知道的两个小点:

    1) 迁移后,history会有你迁移时的Datetime,但是你可以在cmets中看到实际的Datetime。

    2) 它还会在您的 cmets 中添加一个额外的文本,说明您使用集成平台进行了迁移。

    http://tfsintegration.codeplex.com

    【讨论】:

    • 您知道希伯来语(或其他非拉丁语)字符是否存在问题?我正在使用 TFsconfig 导入,它似乎将希伯来语字符作为问号 (?????) 迁移到临时表中,该表因重复条目而失败。
    • 不确定,但可能与您用于 tfs 集成的数据库设置有关?
    【解决方案2】:

    在尝试了一切之后(不接触真实数据)我成功了。

    我决定将升级过程拆分为两个 2008-2010 和 2010-2012。

    1. 我将 2008 TFS 数据库复制到了新的 SQLSERVER 由 TFS 2012 使用
    2. 我使用 TFS 2010 添加了另一个 VM
    3. 我从 TFS 2010 运行升级向导,识别 2008 年复制的数据库
    4. 结果是附加到 TFS 2010 的新集合
    5. 我在 TFS 2012 上分离了集合
    6. 我运行附加集合(TFS 2010 之一),这升级了集合。

    这个过程很顺利。

    感谢大家的帮助

    埃雷兹.h

    【讨论】:

    • 好问题...我检查了我的数据库,剩下的 tfs 2012 集合在程序之前正在使用,并且没有停机时间(这是我在实验中的主要问题,附上2008 db 到一个工作的 tfs s2012 服务器)。旧的 tfs 2008 db 已转换为 2010 集合,然后通过 2012 附加按钮转换为 tfs 2012 集合,因此这是第二个集合。
    猜你喜欢
    • 2013-02-06
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多