Search code examples
sql-servertfsrecoverydata-recovery

TFS 2010 lost but database intact. Can we resume using it?


We lost a server with TFS2010 installed on it. Can we recover the source control as the database was unaffected on another server?


Solution

  • Assumption: Your application tier was hosed, your database was not.

    If that is the case, here's the text from the administation guide:

    If you are using Network Service as the service account for Team Foundation (TFSService), on the application-tier server, open a Command Prompt window, and change directories to

    Drive:%Program Files%\ Microsoft Team Foundation Server 2010\Tools.
    

    At the command prompt, type the following command:

    TfsConfig Accounts /add /account:"NT Authority\Network Service" /SQLInstance:ServerName /DatabaseName:DatabaseName
    

    Note For more information, see Accounts Command.

    Install Team Foundation Server on the new server, and start the Application-Tier Only wizard.

    For more information and step-by-step procedures, see Checklist: Adding an Application Tier, or download the most recent version of the installation guide for Team Foundation, and follow the instructions for how to use the Application-Tier Only wizard: Installation Guide for Team Foundation.

    If you are using Visual Studio Lab Management, install the System Center Virtual Machine Manager (SCVMM) Administrator Console on the application tier, and configure it to connect to the server that is running SCVMM.

    For more information, see Configuring Lab Management for the First Time.

    If the computer name has changed, open the administration console for Team Foundation.

    In the navigation bar, click Application Tier, and then click Change URLs.

    The Change URLs window opens.

    In Notification URL, type the URL for the new application-tier server, and then click OK.

    Note The name of the old application-tier server will still appear in the list of application-tier servers in the administration console for Team Foundation. If you select the Filter out machines that have not connected in more than 3 days check box, the old server will disappear from the list within three days.