A duplicate object name has been found. This may occur...
gvfacorelogic
Posts: 2
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()
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()
This discussion has been closed.
Comments
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.
How can i resolve this issue?
I'm using SqlCompare 8.1