0
votes

I setup a 3 tier TFS preprod environment that includes: an application server, a build server and one database server (SQL Server 2016).

I restored SQL Server databases from the production environment to the preprod environment, installed TFS 2017 on the app server, attached the database and tested successfully.

I then upgraded TFS 2017 to TFS2018 and tested successfully. I restored the databases from SQL Server 2016 to SQL Server 2017, updated compatibility mode on the databases to SQL Server 2017, stopped the collection in preprod environment, edited settings to point to the new SQL Server 2017 instance, clicked Test (which was successful), saved, clicked Start Collection and got an error

TF400787: The host 'DefaultCollection' cannot be started. The servicing needs to be scheduled and completed before the host can be started.

The TFS account I'm using to run TFS Admin Console is a sysadmin on all databases: TFS_Configuration, TFS_DefaultCollection and TFS_Warehouse.

How can I resolve this error and attach "DefaultCollection?"

1

1 Answers

0
votes

How can I resolve this error and attach "DefaultCollection?"

The cause of this problem seems to be the loss of data in the database.

Generally, there will be backup database when using tfs or before tfs upgrade. You could use the backup of the databases to restore the database.

Here are the steps to re-configure the TFS:

Step1: Unconfigure the TFSfeature. You could use the "Remove feature" option in Administration console to remove feature or use the TfsConfig setup / uninstall:All

Step2: Restore the database from the backup.

Step3: Configure the TFS again in Administration Console.

In addition, you could go to TFS Administration Console -> the target collection -> Status tab. Then you could find the job that is failed, try to click the Rerun Job button and check the result.

enter image description here

Here is the ticket with a similar issue, you can refer to it