简体   繁体   中英

TFS 2012 to 2015 Upgrade - Getting error TF400311 “The database connection strings are not valid”

I took a full backup of all my TFS 2012 databases from the existing server using the TFSBackup.exe tool.

I set up a clean server with fresh installation of SQL 2014 and TFS 2015 Update 3. I restored the TFS database backups on the new instance using SQL studio.

Next, I ran the TFS upgrade wizard and selected the Tfs_Configuration database I restored. All of the readyness checks passed except for one - Data Tier.

The error that comes up is:

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."

When I try running the TFSConfig RemapDBs tool, I get the following error:

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

What am I doing wrong?? Thanks!

Run it from the command line, not from PowerShell. The semicolon is confusing things.

This gives it away:

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

You can tell that it's trying to run the command up to the semicolon, then failing. It's reporting the lack of a /sqlinstances flag, which you provided... after the semicolon. And you can see that it's trying to run "Tfs_Configuration" as a cmdlet.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM