You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

TFS数据库服务器重映射操作遇到问题求助

Troubleshooting TFS Database Remapping to a New Server

It sounds like you've hit a snag while remapping your TFS databases to a new server. Let's start by recapping the steps you've already completed, then break down common issues and fixes for the TFSConfig RemapDBs command that's giving you trouble.

Your Completed Migration Steps

  • Opened an elevated Command Prompt and navigated to:
    C:\Program Files\Microsoft Team Foundation Server 12.0\Tools
    
  • Stopped TFS-related services with these commands:
    • IISRESET /stop
    • TfsServiceControl quiesce
  • Attempted to run the TFSConfig RemapDBs command to remap databases, but encountered issues.

Common Issues & Fixes for RemapDBs Failures

First, let's make sure you're using the correct command syntax for TFS 2013 (v12.0). The full command needs to specify both your old and new server details, and it's wise to use the /preview flag first to validate changes without making them:

TFSConfig RemapDBs /DatabaseName:New_Server_Name;Tfs_Configuration /SQLInstances:Old_Server_Name /AnalysisInstance:New_Analysis_Server_Name /AnalysisDatabaseName:New_Tfs_Analysis_DB /preview

If you're getting errors, check these key areas:

  1. Missing Pre-Requisites
    You can't remap databases unless you've already backed up all TFS databases from the old server (including Tfs_Configuration, collection databases, reporting/analysis databases) and restored them to the new SQL Server. Double-check that all databases are present and accessible on the new server.

  2. Permission Problems
    Even with an elevated prompt, the account running the command needs sysadmin privileges on both the old and new SQL servers. It should also have permissions to modify TFS service settings. Verify the account's permissions if you're seeing access-denied errors.

  3. Incomplete Service Shutdown
    TfsServiceControl quiesce pauses jobs but might not stop all TFS services entirely. Run TfsServiceControl stop to fully terminate all TFS-related services, and confirm via the Services console that Visual Studio Team Foundation Background Job Agent is stopped before re-running the remap command.

  4. Invalid Command Parameters

    • Ensure /DatabaseName uses the format New_Server_Name;Tfs_Configuration (the configuration database is mandatory here).
    • Don't forget the /SQLInstances parameter pointing to your old server—this tells TFS which server to remap from.
    • If you're using TFS Reporting/Analysis, include those parameters only if you're moving those databases too.

Post-Remap Steps (Once the Command Succeeds)

After a successful remap, you'll need to:

  • Restart IIS: IISRESET /start
  • Start TFS services: TfsServiceControl start
  • Open the TFS Administration Console to verify the application tier can connect to the new database server
  • Test core TFS functionality (source control, work items, builds) to confirm everything works as expected

If you're seeing a specific error message (e.g., database not found, connection timeout), share the exact error text and we can narrow down the issue further!

内容的提问来源于stack exchange,提问作者Veejay

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.05.27 03:37:48