Red Gate forums :: View topic - Duplicate object
Return to www.red-gate.com RSS Feed Available

Search  | Usergroups |  Profile |  Messages |  Log in  Register 
Go to product documentation
SQL Toolkit Previous Versions
SQL Toolkit Previous Versions forum

Duplicate object

Search in SQL Toolkit Previous Versions forum
Post new topic   Reply to topic
Jump to:  
Author Message
PeterHageus



Joined: 16 Apr 2008
Posts: 9

PostPosted: Mon May 12, 2008 8:22 am    Post subject: Duplicate object Reply with quote

I get the following ApplicationException when trying to use SQL Compare API against some databases:

"{"A duplicate object name (dbo) has been found. This may occur if the SQL Server that you are registering is case sensitive but the case sensitive option is not set."}"

I really can't find the cause of it. I've tried changing case sensitivity back and forth, but no difference. As far as I can tell I don't have any duplicates in the database at all.

Using the demo of SQL Compare does not exhibit the same problem.
Back to top
View user's profile Send private message
Michelle Taylor



Joined: 30 Oct 2006
Posts: 528
Location: Red Gate Software

PostPosted: Mon May 12, 2008 11:42 am    Post subject: Reply with quote

What version of the API do you have there? Early versions of v6 had a couple of problems when saving certain databases to scripts, which would end up with them writing out a 'dbo' and a 'DBO' schema, causing the error you're seeing, and previous versions have had similar problems synchronizing 2000 and 2005 databases.

If you're using 6.2.0.271 and it's still doing this, I'd like to know more details about exactly what you're doing, so I can track down where the probelm's coming from. e.g. what are the database verisons / types on each side, where in the code is the exception thrown, if possible the code you're using / full stack trace / backups or snapshots or folders with the databases in (to michelle.taylor@red-gate.com for things you don't want to post publically).
Back to top
View user's profile Send private message
PeterHageus



Joined: 16 Apr 2008
Posts: 9

PostPosted: Mon May 12, 2008 3:45 pm    Post subject: Reply with quote

It seems like I have version 6.2.2.14 or 6.2.1.36 (depending on if I look under Compare or Data Compare dir. Seems odd Data Compare has a newer version). I'm using a SQL 2005 snapshot to update a 2000 server so this is likely to be the problem. I'll try to mail a complete description tomorrow.

I don't know if I'm missing something, but the distribution of the Toolkit dll's seems quite confusing. First of all, the only download I can find is for the entire Toolbelt, and once installed, the dll's are scattered all around the place. This makes it very difficult to keep track of versions.
Back to top
View user's profile Send private message
Michelle Taylor



Joined: 30 Oct 2006
Posts: 528
Location: Red Gate Software

PostPosted: Mon May 12, 2008 4:31 pm    Post subject: Reply with quote

Data Compare has a newer version because we're almost constantly developing the SQL Compare Engine, and as Data Compare is currently the later release it has the most up to date released version of the SQL Compare Engine.

You should generally use a single product's set of dlls when using the toolkit - the latest version is generally the best for your task, but if you're using Data Compare functionality you have to use the ones from Data Compare and if you're using Packager functionality you have to use the ones from Packager. I know that this isn't very well signposted at the moment - we're currently looking into changing the way the Toolkit is distributed, which will hopefully include clearer documentation and installation procedures.
Back to top
View user's profile Send private message
PeterHageus



Joined: 16 Apr 2008
Posts: 9

PostPosted: Tue May 13, 2008 8:29 am    Post subject: Reply with quote

I have sent files wich should be able to duplicate the problem. It seems to be a problem specific to 2005 -> 2000 as fas as I can tell.

Glad to hear you're working on the distribution issue!
Back to top
View user's profile Send private message
frankk



Joined: 08 May 2008
Posts: 1

PostPosted: Fri May 16, 2008 3:55 pm    Post subject: Duplicate object Reply with quote

I am having a very similar problem. In a nutshell we are trying to compare a snapshot file to a .bak file and test for differences. The error occurs on the line:

Differences differences = dbSnapshot.CompareWith(dbBak, Options.Default);

I am using the RedGate.SQL.Shared.dll, version 6.2.1.36 from the RedGate Data Compare bundle (all dll's are from 2/5/2008).

The reason for using Data Compare is that if the above test shows the schemas are equal, we will be restoring the .bak file to a DB and doing custom table mappings between it and another DB.

Please let me know if I can provide further info.
Back to top
View user's profile Send private message
Brian Donahue



Joined: 23 Aug 2004
Posts: 6645

PostPosted: Sun Jun 01, 2008 8:23 pm    Post subject: Reply with quote

Hi,

Peter's issue was fixed by registering a database object separately for SQL Compare and Data Compare. Registering a single database object for both has this side-effect, so in order to prevent odd things like this, be sure to use only the Database.Register method for a schema comparison and Database.RegisterForDataCompare when using the database object for a data comparison.
Back to top
View user's profile Send private message
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