TF246062: Two or more databases are in conflict because they are each designated as the owners of the following schema: Framework

Symptom

The Azure DevOps Server configuration could not be reconfigured. The following errors were encountered:

TF246062: Two or more databases are in conflict because they are each designated as the owners of the following schema: Framework. The schema is for the host with the following name and ID: <CollectionName>, [GUID]. The databases with this conflict are: Data Source=<SqlServerName>;Initial Catalog=<CollectionDatabaseName-1>;Integrated Security=True;Encrypt=False, Data Source=<SqlServerName>;Initial Catalog=

<CollectionDatabaseName-2>;Integrated Security=True;Encrypt=False. You must specify one and only one database owner for the schema in the searchable SQL Server instances for this deployment of Azure DevOps Server.

Analysis

Snag_478c1c7f.png

  • [Tfs_Configuration].[dbo].[tbl_DatabasePartitionMap] – Get server instance’s ServiceHostId
  • [Tfs_Configuration].[dbo].[tbl_ServiceHost] – Get each collection’s HostId
  • [<CollectionDatabaseName>].[dbo].[tbl_DatabasePartitionMap] – Get the associated database name by scanning all databases with this ServiceHostId. This is how we can restore TFS databases with different names. It replys on the ServiceHostId rather than the database name.

Solution

  • Manually generate new GUIDs and replace them with ServiceHostId in tbl_DatabasePartitionMap and HostId in tbl_ServiceHost
  • Run tfsconfig RemapDBs

One thought on “TF246062: Two or more databases are in conflict because they are each designated as the owners of the following schema: Framework”

Leave a comment