SQL Compare stopped working
AlexKuznetsov
Posts: 6
Without any changes on either client or server, I was getting this error when running SQL Compare 8.1:
Registering data sources - reading tables
An entry with the same key already exists.
The Profiler indicates that the last SQL issued by SQL Compare is as follows:
SELECT
d.is_fulltext_enabled AS FullTextEnabled,
d.is_encrypted AS IsEncrypted,
dec.key_algorithm AS KeyAlgorithm,
dec.key_length AS KeyLength
FROM sys.databases d
LEFT JOIN sys.dm_database_encryption_keys dec ON dec.database_id = d.database_id
WHERE d.database_id = DB_ID()
I happen to have a copy of my target which is one moth old. I was able to successfully run SQL compare against that old copy.
I upgraded to the latest version, 10.4.8.87 - that did not fix the problem.
Registering data sources - reading tables
An entry with the same key already exists.
The Profiler indicates that the last SQL issued by SQL Compare is as follows:
SELECT
d.is_fulltext_enabled AS FullTextEnabled,
d.is_encrypted AS IsEncrypted,
dec.key_algorithm AS KeyAlgorithm,
dec.key_length AS KeyLength
FROM sys.databases d
LEFT JOIN sys.dm_database_encryption_keys dec ON dec.database_id = d.database_id
WHERE d.database_id = DB_ID()
I happen to have a copy of my target which is one moth old. I was able to successfully run SQL compare against that old copy.
I upgraded to the latest version, 10.4.8.87 - that did not fix the problem.
Comments
A more helpful error message would be greatly appreciated.
I agree that the error message isn't very helpful in this situation.
I suspect that while the index is being rebuild SQL Server creates a temporary copy which gets flagged as a duplicate when SQL Compare stumbles across it.
I'm not sure how to test for that, as I don't really know what SQL Server does internally while rebuilding, or if there is any way to determine if this kind of operation is being performed and warn the user.