Red Gate forums :: View topic - SQL Compare stopped working
Return to www.red-gate.com RSS Feed Available

Search  | Usergroups |  Profile |  Messages |  Log in  Register 
Go to product documentation
SQL Compare 10
SQL Compare 10 forum

SQL Compare stopped working

Search in SQL Compare 10 forum
Post new topic   Reply to topic
Jump to:  
Author Message
AlexKuznetsov



Joined: 15 Nov 2012
Posts: 4

PostPosted: Thu Jan 02, 2014 5:48 pm    Post subject: SQL Compare stopped working Reply with quote

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.
Back to top
View user's profile Send private message
AlexKuznetsov



Joined: 15 Nov 2012
Posts: 4

PostPosted: Thu Jan 02, 2014 10:16 pm    Post subject: Reply with quote

The root cause of this seems to be an exclusive lock acquired by a clustered index rebuild. Once the index completed rebuilding, SQL Compare started working again.

A more helpful error message would be greatly appreciated.
Back to top
View user's profile Send private message
Chris Auckland



Joined: 24 Oct 2006
Posts: 755
Location: Red Gate Software Ltd.

PostPosted: Mon Jan 06, 2014 4:02 pm    Post subject: Reply with quote

Thanks for your post.

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.
_________________
Chris
Back to top
View user's profile Send private message Send e-mail
Display posts from previous:   
Reply to topic All times are GMT + 1 Hour
Page 1 of 1

 
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group