Visual studio tfs multiple server add issue - tfs

I have TFS server connected to visual studio. And
I have restore it to another tfs server differnet name. Now i need add new server to visual studio. When i try to add it getting server with same id already exists.

You need to change the TFS or Azure DevOps Server's ID or GUID of the new instance. You can do that by using the TFSConfig command line.
TfsConfig changeServerID /sqlInstance:<serverName> /databaseName:<configurationDatabaseName>
[/projectCollectionsOnly] [/configDBOnly] [/collectionName]

Not sure your detail process of restoring operation. However according to your description, guess you may have two same server ID(applicationID)
You could find your old Team Foundation Server GUID Info in below location:
C:\Program Files\Microsoft Team Foundation Server 1x.0\Application Tier\Web Services\web.config
There should be a value like
Then you could compare the GUID of two servers old and new TFS server, change one of them and re-register db. You may need to restart sever, tfs service.
More details about it, please take a look at this blog: How to find Team Foundation Server(TFS) GUID Info
As how to change server ID, just as Niel mentioned, you could use TFSConfig command:
TFSConfig ChangeServerID /SQLInstance:server_db /DatabaseName:TFS_Configuration
Note: After you use the changeServerID command, you must direct clients to create a connection to the changed server before it can be used.

Related

TFS users migrated to new domain; accounts in TFS reports not updated

We recently migrated users to a new domain using this command:
TFSConfig Identities /change /fromdomain:Domain1 /todomain:Domain2 /account:OldAccount /toaccount:NewAccount
Accessing TFS appears to be fine for the users, however, the folder security in TFS reports don't show that the users updated. There must be a separate process for this since reports exists out on the SQl database server?
http://<SQLSERVER>/Reports/Pages/Folder.aspx?ItemPath=%2fTfsReports%2fDefaultCollection
You could try the items below:
Run the following command to update the service account:
TFSConfig Accounts /change /AccountType:ApplicationTier /account:AccountName /password:Password
Run the following command to update the data source account used for reporting:
TFSConfig Accounts /change /AccountType:ReportingDataSource /account:AccountName /password:Password
Re-configure Reporting and Analysis Services in Administration Console.
Restart TFS services. On the TFS application-tier computer, open a Command Prompt window with administrative permissions and change directories to Drive:\%programfiles%\Microsoft Team Foundation Server 14.0\Tools, and type the following TFSServiceControl command:
TFSServiceControl unquiesce
Re-start TFS server.

team foundation server 2012 restore

I am trying to restore a Team Foundation Server database to another server.
The Original server was a Team Foundation server express 2012 install.
Steps so far
Created backup of all the databases using SQL management studio
i.e. TFS_defaultCollection,TFS_Configuration, Tfs_Company1, TFS_Company2.
Installed TFS Express 2012 on another server
Restored all the SQL Server database's to the new server
I get an error the SQL instance is missing.
Is there any way to restore the TFS databases to the new server.
or
is there any way to extract the project data from the databases.
Make sure you have created the SQL instance in SQL server.
Based on your description your backup should be executed manually. So,to restore data for Team Foundation to a different server or instance, you must complete the procedures that your deployment topology requires the sequence mentioned in below link:
https://www.visualstudio.com/en-us/docs/setup-admin/tfs/admin/backup/restore-data-different-instance#back-up-data
Recommend you follow the steps in this link provided by Daniel to backup and restore the database from TFS Administrtion Console, it's more convenient than manually backup.

I can't connect to a new TFS server because Visual Studio won't let me supply new credentials

I'm trying to connect to a new TFS server in Visual Studio 2015. I already have a local TFS server on my dev machine. When I attempt to add the new TFS server in the "Add Team Foundation Server" prompt it allows me to enter the URL, path and port number, but no credentials. Without credentials it can't connect to the server because it's supplying my local admin credentials instead of my active directory ID.
I've tried Credential Manager in Control Panel but it is empty. I've tried clearing my internet explorer cache/passwords/everything. I've tried running Visual Studio with the /netonly switch and supplied my AD credentials. None of this has worked.
How do I add a new TFS server to my list that I can connect to?
Close VS, and clean the cache file under C:\Users\username\AppData\Local\Microsoft\Team Foundation\6.0\Cache.
Check Windows Credentials in the Credential Manager to see if there stores credentials.
Remove the local TFS in Add/Remove Team Foundation Server.
After the steps above, when you connect new TFS, a windows should promote to let you enter credential.

In place TFS 2012 to TFS 2013 upgrade?

We have created a VM clone of our TFS server (but haven't turned on networking yet for the clone).
We have created a test SQL server that we plan on using for the test upgrade.
I'm not sure what we should do first (after populating the tfs databases on the test SQL server).
Since our test TFS server is a VM clone, TFS is installed and configured already. The Cloned TFS server is pointing to our production SQL server. Are the following steps correct:
Turn on networking for the Cloned TFS server
Remote into the Cloned TFS server
Run command TFSServiceControl quiesce
Run the command TFSConfig PrepareClone
Run the command TFSConfig ChangeServer ID
Run the command TFSConfig RemapDBS
Update the TFS URLS in the admin console
Edit Reporting to point to the new test Reporting instance
Update all service accounts
Are the steps correct? I am not sure which order to carry out the steps out after the TFS databases have been put on the test SQL server. Any help would be greatly appreciated.
I would suggest doing the following:
Unconfigure your test server. I assume you don't want to upgrade your production server yet, you just want to test the upgrade, correct? If that's the case run 'TfsConfig.exe setup /Uninstall:All' to unconfigure the new server.
(if you haven't done it already) Backup all TFS databases from production server. You'll need all DBs with the names starting with 'Tfs_' including Tfs_Configuration, Tfs_Warehouse and all collection databases.
Restore TFS backups from production on VM or some other test SQL server (using SQL server management studio)
Run tfsconfig changeserverid command (on the new server) to change the TFS server id. It's required because you want to have both TFS instances live for some time. If you don't do it, VS clients will think that it's the same server (even though the name is different) and this can cause some issues.
Run tfsconfig remapdbs command (on the new server) which will fix the old Tfs_Configuration database. This is only required because you are moving TFS to a different machine (with a different name)
Now you can start TFS management console and perform the actual upgrade which is pretty straightforward. Upgrade wizard will ask you for the new service account names and new test reporting instance location.

Transfer TFS 2012 to another machine

Now we plan to move our running Tfs server to another machine in data center.
Running tfs server specifications:
1.Having several tiers: two app tiers and two data tiers
Data center tfs server specifications:
1.Single box topology: the data base and the tfs server in the same virtual machine
We have done the following steps to do backup:
Run tfsbackup.exe (C:\Program Files\Microsoft Team Foundation Server 11.0\Tools) to backup the tfs from running tfs
Backup all data bases including the report servers (the data bases are selected default by tfsbackup.exe tool)
Backup the encryption key for reporting services (followed steps in here)
After backup, we do the following to restore the tfs:
Log to data center tfs server as tfs service account (the tfs service account should be in local administrator group)
Run the TfsRestore.exe (C:\Program Files\Microsoft Team Foundation Server 11.0\Tools) to restore data base backup
After restore, open the tfs console to attach the collection from the restored data base
Issue:
When we try to attach the collection, we are blocked at the step to list the available data base: the restored data base can't be listed out.
Could anyone give some suggestion?
Thank you very much.
After some investigation, we found out the way to store the tfs is wrong.
Actually we are doing tfs transfer. So we should do the following steps to do tfs transfer and it works:
Logon tfs server in data center as tfs service account, and the tfs service account should be in local administrator group
Open tfs console and remove tfs feature : remove the current installed tfs instance
Manually delete all tfs related data bases in data base server
Be sure the related tfs service is running including www service
Run the TfsRestore.exe (C:\Program Files\Microsoft Team Foundation Server 11.0\Tools) to restore data base backup
Run TFS installer and follow the Application-Tier Only wizard to do tfs transfer configuration
At the data base step, click list available data base to list the restored data base
Restart the tfs server
Check the tfs configuration in the tfs console and update some links
10.
Thanks.

Resources