A duplicate object name has been found. This may occur...

gvfacorelogicgvfacorelogic Posts: 2
edited February 26, 2010 4:07AM in SQL Compare Previous Versions
During comparison or scripting we get the error "A duplicate object name 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 attached the log file.

The problem sql 2008 enterprise edition database I am comparing has 20 partition schemes and 5 partition functions (about 3000 function items) and its using database compression at table, clustered index and individual indexes.
I have another simpler 2008 enterprise database setup without partitioning and does not use compression and that database comparison completes successfully.


15:16:08.619|Info |Logging |1 |Current Logging levels enabled: Verbose,Warning,Fatal,Debug,Information,Trace,Error
15:16:24.496|Info |SQL Compare Engine |20 |Register live database start: {0}CoreStore
15:16:24.500|Info |SQL Compare Engine |20 |Populate Live Start, popoptions: 264
15:16:24.500|Info |SQL Compare Engine |20 |Populate Live Start, options: Default
15:16:24.505|Info |SQL Compare Engine |20 |Populate major version: {0}SqlServer2008
15:16:24.505|Info |SQL Compare Engine |20 |Populate got casing: False
15:16:24.505|Info |SQL Compare Engine |20 |Populate Case Sensitive: False
15:16:24.515|Info |SQL Compare Engine |20 |Populate FulltextCatalogs start.
15:16:24.515|Info |SQL Compare Engine |20 |Populate Fulltext Stoplists start.
15:16:24.515|Info |SQL Compare Engine |20 |Populate Fulltext Stopwords start.
15:16:24.515|Info |SQL Compare Engine |20 |Populate ObjectNames start.
15:16:24.624|Info |SQL Compare Engine |20 |Populate Users start.
15:16:24.624|Info |SQL Compare Engine |20 |Populate Tables start.
15:16:26.817|Error |SQL Compare Engine |20 |SqlCompareException: A duplicate object name 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.
System.ArgumentException: An item with the same key has already been added.
at System.ThrowHelper.ThrowArgumentException(ExceptionResource resource)
at System.Collections.Generic.Dictionary`2.Insert(TKey key, TValue value, Boolean add)
at RedGate.SQLCompare.Engine.Tables.Add(Table value)
at o.j()
at o.a(n )
15:16:26.900|Error |SQL Compare UI |1 |Exception in progress dialog
RedGate.SQLCompare.Engine.SqlCompareException: A duplicate object name 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. ---> System.ArgumentException: An item with the same key has already been added.
at System.ThrowHelper.ThrowArgumentException(ExceptionResource resource)
at System.Collections.Generic.Dictionary`2.Insert(TKey key, TValue value, Boolean add)
at RedGate.SQLCompare.Engine.Tables.Add(Table value)
at o.j()
at o.a(n )
--- End of inner exception stack trace ---
at o.a(n )
at RedGate.SQLCompare.Engine.Database.Register(ConnectionProperties connectionProperties, Options options)
at bK.DoRegisterDatabaseForCompare(Database database, LiveDatabaseSource dataSource)
at bK.DoRegisterDatabaseForCompare(Database database, DataSource dataSource)
at bK.DoRegisterDatabase1ForCompare()
at RedGate.Shared.Utils.ProgressTasks.ProgressTask.a()
at RedGate.Shared.Controls.ProgressDialogEx.e()

Comments

  • I think we have finally found out what the problem is.

    In the current version, SQL Compare 8.0 tries to add the table to the list of tables twice if the table exists in more than one schema and more than one filegroup simultaneously. So while the issue isn't explicitly caused by having partitioned data, it is a side effect of this strange bug to do with filegroups.

    We have a private release available that should resolve the issue.

    If you are suffering from these symptoms, please contact support@red-gate.com and reference this post.
    Chris
  • Brian DonahueBrian Donahue Posts: 6,590 Bronze 1
    This issue can also be caused when your SQL Server 2008 database uses a compression on an index which specifies a range of pages like this:
    CREATE NONCLUSTERED INDEX [IDX_Somethingorother] ON [dbo].[sometable] ([com1], [col2], [col3]) WITH (DATA_COMPRESSION = PAGE ON PARTITIONS (1 TO 798))
    If this describes your situation, then upgrading to SQL Compare 8.1 will solve the problem.
  • A duplicate definition was found for the role ...


    How can i resolve this issue?
    I'm using SqlCompare 8.1
  • Brian DonahueBrian Donahue Posts: 6,590 Bronze 1
    I don't think you have the same problem as the one described in this topic. Best contact support about that via email.
This discussion has been closed.