Duplicate object

Forum for users of SQL Toolkit 3,4,and 5

Duplicate object

Postby PeterHageus » Mon May 12, 2008 8:22 am

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.
PeterHageus
 
Posts: 9
Joined: Wed Apr 16, 2008 10:17 am

Postby Michelle Taylor » Mon May 12, 2008 11:42 am

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).
Michelle Taylor
 
Posts: 529
Joined: Mon Oct 30, 2006 12:45 pm
Location: Red Gate Software

Postby PeterHageus » Mon May 12, 2008 3:45 pm

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.
PeterHageus
 
Posts: 9
Joined: Wed Apr 16, 2008 10:17 am

Postby Michelle Taylor » Mon May 12, 2008 4:31 pm

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.
Michelle Taylor
 
Posts: 529
Joined: Mon Oct 30, 2006 12:45 pm
Location: Red Gate Software

Postby PeterHageus » Tue May 13, 2008 8:29 am

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!
PeterHageus
 
Posts: 9
Joined: Wed Apr 16, 2008 10:17 am

Duplicate object

Postby frankk » Fri May 16, 2008 3:55 pm

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.
frankk
 
Posts: 1
Joined: Thu May 08, 2008 3:05 pm

Postby Brian Donahue » Sun Jun 01, 2008 8:23 pm

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.
Brian Donahue
 
Posts: 6670
Joined: Mon Aug 23, 2004 10:48 am


Return to SQL Toolkit Previous Versions

Who is online

Users browsing this forum: No registered users and 0 guests