TFS 2012 到 2015 升级 - 出现错误 TF400311 "The database connection strings are not valid"
TFS 2012 to 2015 Upgrade - Getting error TF400311 "The database connection strings are not valid"
我使用 TFSBackup.exe
工具从现有服务器对所有 TFS 2012 数据库进行了完整备份。
我使用 SQL 2014 和 TFS 2015 Update 3 的全新安装设置了一个干净的服务器。我使用 SQL studio 在新实例上恢复了 TFS 数据库备份。
接下来,我 运行 TFS 升级向导并选择了我恢复的 Tfs_Configuration 数据库。除了一个 - 数据层之外,所有就绪检查都通过了。
出现的错误是:
TF400311 - "The database connection strings are not valid and cannot
be automatically corrected. To fix this problem, use the TFSConfig
RemapDBs command-line tool to correct the database connection
strings."
当我尝试 运行 TFSConfig RemapDBs
工具时,出现以下错误:
PS E:\Microsoft Team Foundation Server 14.0\Tools> .\TFSConfig RemapDBs /DatabaseName:TFSTEST\MSSQL;TFS_Configuration /SQLInstances:TFSTEST\MSSQL /continue
Logging sent to file C:\ProgramData\Microsoft\Team Foundation\Server Configuration\Logs\CFG_CFG_AT_0919_192225.log
Microsoft (R) TfsConfig - Team Foundation Server Configuration Tool
Copyright (c) Microsoft Corporation. All rights reserved.
Command: remapDBs
Microsoft (R) TfsConfig - Team Foundation Server Configuration Tool
Copyright (c) Microsoft Corporation. All rights reserved.
The sqlInstances argument is required. See the command line help for the remapDBs command.
TFS_Configuration : The term 'TFS_Configuration' is not recognized as the name of a cmdlet, function, script file, or operable program. Check the spelling of the name, or if a path was included, verify that the path is correct and try again.
At line:1 char:50
+ .\TFSConfig RemapDBs /DatabaseName:TFSTEST\MSSQL;TFS_Configuration /SQLInstances ...
+ ~~~~~~~~~~~~~~~~~
+ CategoryInfo : ObjectNotFound: (TFS_Configuration:String) [], CommandNotFoundException
+ FullyQualifiedErrorId : CommandNotFoundException
我做错了什么??谢谢!
运行 它来自命令行,而不是来自 PowerShell。分号令人困惑。
这就泄露了:
The sqlInstances argument is required. See the command line help for
the remapDBs command.
TFS_Configuration : The term 'TFS_Configuration'
is not recognized as the name of a cmdlet, function, script file, or
operable program. Check the spelling of the name, or if a path was
included, verify that the path is correct and try again. At line:1
char:50
您可以看出它正在尝试 运行 命令直到分号,然后失败了。它报告缺少 /sqlinstances
标志,您在分号之后提供了该标志。您可以看到它正在尝试 运行“Tfs_Configuration”作为 cmdlet。
我使用 TFSBackup.exe
工具从现有服务器对所有 TFS 2012 数据库进行了完整备份。
我使用 SQL 2014 和 TFS 2015 Update 3 的全新安装设置了一个干净的服务器。我使用 SQL studio 在新实例上恢复了 TFS 数据库备份。
接下来,我 运行 TFS 升级向导并选择了我恢复的 Tfs_Configuration 数据库。除了一个 - 数据层之外,所有就绪检查都通过了。
出现的错误是:
TF400311 - "The database connection strings are not valid and cannot be automatically corrected. To fix this problem, use the TFSConfig RemapDBs command-line tool to correct the database connection strings."
当我尝试 运行 TFSConfig RemapDBs
工具时,出现以下错误:
PS E:\Microsoft Team Foundation Server 14.0\Tools> .\TFSConfig RemapDBs /DatabaseName:TFSTEST\MSSQL;TFS_Configuration /SQLInstances:TFSTEST\MSSQL /continue
Logging sent to file C:\ProgramData\Microsoft\Team Foundation\Server Configuration\Logs\CFG_CFG_AT_0919_192225.log
Microsoft (R) TfsConfig - Team Foundation Server Configuration Tool
Copyright (c) Microsoft Corporation. All rights reserved.
Command: remapDBs
Microsoft (R) TfsConfig - Team Foundation Server Configuration Tool
Copyright (c) Microsoft Corporation. All rights reserved.
The sqlInstances argument is required. See the command line help for the remapDBs command.
TFS_Configuration : The term 'TFS_Configuration' is not recognized as the name of a cmdlet, function, script file, or operable program. Check the spelling of the name, or if a path was included, verify that the path is correct and try again.
At line:1 char:50
+ .\TFSConfig RemapDBs /DatabaseName:TFSTEST\MSSQL;TFS_Configuration /SQLInstances ...
+ ~~~~~~~~~~~~~~~~~
+ CategoryInfo : ObjectNotFound: (TFS_Configuration:String) [], CommandNotFoundException
+ FullyQualifiedErrorId : CommandNotFoundException
我做错了什么??谢谢!
运行 它来自命令行,而不是来自 PowerShell。分号令人困惑。
这就泄露了:
The sqlInstances argument is required. See the command line help for the remapDBs command.
TFS_Configuration : The term 'TFS_Configuration' is not recognized as the name of a cmdlet, function, script file, or operable program. Check the spelling of the name, or if a path was included, verify that the path is correct and try again. At line:1 char:50
您可以看出它正在尝试 运行 命令直到分号,然后失败了。它报告缺少 /sqlinstances
标志,您在分号之后提供了该标志。您可以看到它正在尝试 运行“Tfs_Configuration”作为 cmdlet。