試著將版控由VSS2005轉移至TFS 2012,Franma有一篇詳細操作說明,原則上如法炮製多可順利完成,且如該文所說,一開始跑VSS DB分析及整理程式專案是最花時間的,實際使用VSSConerter.exe轉資料反而很快。

在此只補充一點,我在執行"C:\Program Files (x86)\Microsoft Visual Studio 10.0\Common7\IDE\VSSConverter.exe" migrate my-migration.xml時,遇到以下錯誤:

Microsoft (R) Visual SourceSafe Converter version 10.0.0.0
for Microsoft (R) Visual Studio Ultimate v10.0
Copyright (C) Microsoft Corporation.  All rights reserved.

Initializing...

TF60022:  Unable to connect to Microsoft SQL Server .\SQLEXPRESS. A network-rela
ted or instance-specific error occurred while establishing a connection to SQL S
erver. The server was not found or was not accessible. Verify that the instance
name is correct and that SQL Server is configured to allow remote connections. (
provider: SQL Network Interfaces, error: 26 - Error Locating Server/Instance Spe
cified)

原以為VSSConverter要直接連TFS的SQL Server塞資料所以有SQL連線設定問題,看過MSDN文件才知是VSSConverter需要SQL當成暫時的工作資料庫,預設是用SQLExpress,而我的工作機只有安裝SQL Server 2008 R2,沒有SQL Express。因此,需要在XML中加入如下設定:

<?xml version="1.0" encoding="utf-8"?>
<SourceControlConverter>
      <ConverterSpecificSetting>
            <Source name="VSS">
                  <VSSDatabase name="D:\VSSDB\VSS1"></VSSDatabase>
                  <SQL Server="(local)" />
            </Source>

請注意,執行VSSConverter.exe的Windows帳號必須對該SQL Server有系統管理者權限,在轉換期間上面會出現暫時的SQL DB,程式執行完畢時再自動刪除:

對於有安裝SQL Express的機器,這些動作都在背後默默完成,操作者根本不會察覺。若是未裝SQL Express,就需要找到一台可用的SQL Server,並修改XML加入設定。


Comments

Be the first to post a comment

Post a comment