FIX: Error message when you start database mirroring in SQL Server 2005 on a database that is restored or upgraded from SQL Server 2000: “The Service Broker ID for the remote copy of database “&l …
Symptoms
Consider one of the following scenarios:You restore a database backup from Microsoft SQL Server 2000 on an instance of Microsoft SQL Server 2005 by using the WITH RECOVERY option. You also restore this database backup on another instance of SQL Server 2005 by using the WITH NORECOVERY option.You have two instances of SQL Server 2000 that have a database that is the same on these instances. One instance has the database in the Loading status. The other instance has the database in the regular status. Then, you upgrade these instances to SQL Server 2005.You configure database mirroring on this database in SQL Server 2005. However, when you start database mirroring, you receive the following error message:
The Service Broker ID for the remote copy of database “<DatabaseName>” does not match the ID on the principal server. (Microsoft SQL Server, Error: 1436)Note This problem also occurs in Microsoft SQL Server 2008.
You usually encounter this problem when you upgrade a Microsoft SQL Server 2000 log shipping configuration. Consider the following scenario:You have a SQL Server 2000 log shipping configuration.You upgrade the servers that are involved in the log shipping configuration to SQL Server 2005.After the upgrade, you configure database mirroring by using the database that is used previously in the log shipping configuration.When you start database mirroring, you receive this error message.
Resolution
Databases in SQL Server 2000 do not have a Service Broker ID. If you restore these databases on instances of SQL Server 2005 by using the WITH NORECOVERY option, these databases will not be upgraded. Therefore, theService Broker ID of these databases is NULL after the restore. Additionally, if you upgrade an instance ofSQL Server 2000, existing databases that are in the Loading status will not be upgraded. Therefore, theService Broker ID of these databases is NULL after the upgrade. When you start database mirroring, the Service Broker ID of the principal server is compared to the Service ID of the mirror server. Because the Service Broker IDs do not match, the comparison fails.
In the upgrade scenario of a SQL Server 2000 log shipping configuration, the secondary database is in the Loading status. After you upgrade the server that holds the secondary database, the database does not have a Service Broker ID. After you upgrade the server that holds the primary database, the database has a Service Broker ID. When you start database mirroring, the Service Broker ID of the principal server is sent to the mirror server for comparison. Because the Service Broker ID of the mirror server is NULL, the comparison fails.
