Search code examples
azure-devops-server-2019

Azure DevOps Server 2019 Update 1.1. Can't detach Collection. Collection is "offline" now, can't turn it "online"


Azure DevOps Server 2019 Update 1.1. Can't detach Collection. Collection is "offline" now, can't turn it "online".

If I try at Azure DevOps Managment Console: - on "detach": "The following error occurred while running readiness checks: TF400579: Could not find a database with DatabaseId: 16" (In [Tfs_Configuration].[dbo].[tbl_Database] DatabaseId = 26.)

  • on turning it online: "TF400784: The host 'FifthElement' cannot be started. The snapshot operation may have failed and needs to be restarted and completed before the host can be started."

This started when we tryed to split this collection. This is one of copyed and reattached collection. I have a backup of detached collection. I can attach this backup as another (a new one) collection, but I cant' turn this new collection on, because problematic collection and new collection have same projects.

I've tryed to change [Tfs_Configuration].[dbo].[tbl_Database].[DatabaseId] from 26 to 16, but it didn't help. In this case I got on "detach": "The following error occurred while running readiness checks: TF400579: Could not find a database with DatabaseId: 26". It looks like original Collection's database had DatabaseID = 16, and after attaching detached backup it now DatabeseId=26.


Solution

  • I tried to split collection according to the instruction. Also, I tried to /detach collection using TFSConfig, but got the same error: "Could not find a database with DatabaseId: 16". I had left the use of / delete as a last resort, in the hope that there is an opportunity to correct the database.

    I tried "dbcc checkdb ('TfsVersionControl',repair)" on Tfs_Configuration DB and on problematic collection DB. It didn't found any errors. After that, I still couldn't to /detach. But I was able to run "TFSConfig Collection /delete" and it completed correctly.

    So, at the moment I have already attached a backup of DB, and it works correctly. I'll try to split it again... maby.