A duplicate object name has been found. This may occur if th
moviancp
Posts: 3
I am having troubles we comparing a specific source database in SQL Compare 10.7. The source database is not case sensitive, and contains several schemas, some table names exists is multiple schemas.
Previously this was not an issue for SQL Compare, however today i start receiving the following 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.
But as mentioned above the database is not case sensitive. How do a cope with this error. I find it strange that it is not reporting the actual name of the object that resulted in the conflict - how can I figure this out?
Extract of log:
Previously this was not an issue for SQL Compare, however today i start receiving the following 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.
But as mentioned above the database is not case sensitive. How do a cope with this error. I find it strange that it is not reporting the actual name of the object that resulted in the conflict - how can I figure this out?
Extract of log:
10:26:58.958|Error |SQL Compare Engine |13 |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: Der findes allerede et element med samme nøgle. ved System.ThrowHelper.ThrowArgumentException(ExceptionResource resource) ved System.Collections.Generic.SortedList`2.Add(TKey key, TValue value) ved #8rg.#Ssg.#Klh() ved #8rg.#Ssg.#vl(DBPopulationOptions #WXrc) 10:26:59.093|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: Der findes allerede et element med samme nøgle. ved System.ThrowHelper.ThrowArgumentException(ExceptionResource resource) ved System.Collections.Generic.SortedList`2.Add(TKey key, TValue value) ved #8rg.#Ssg.#Klh() ved #8rg.#Ssg.#vl(DBPopulationOptions #WXrc) --- Slut på staksporing af indre undtagelser --- ved #8rg.#Ssg.#vl(DBPopulationOptions #WXrc) ved #8rg.#AHud.Register(ConnectionProperties #Ap8b, Options #5OPb) ved RedGate.SQLCompare.Engine.Database.Register(ConnectionProperties connectionProperties, Options options) ved RedGate.SQLCompare.Common.CompareEngineExecutor.DoRegisterDatabaseForCompare(Database #RHc, LiveDatabaseSource #ovUb) ved RedGate.SQLCompare.Common.CompareEngineExecutor.DoRegisterDatabaseForCompare(Database #RHc, DataSource #ovUb) ved RedGate.SQLCompare.Common.CompareEngineExecutor.#7bH() ved RedGate.Shared.Utils.ProgressTasks.ProgressTask.#kco() ved RedGate.Shared.Controls.ProgressDialogEx.DoTasks()
Comments
Sorry this is not straightforward, and depends on what is being compared. If it's a live datasource, this should not happen as SQL Server does not allow two objects of any type with the same name. In that case, possibly the database is corrupt.
With scripts folders, you can use MS-DOS findstr (findstr /S /I /C:"object name" *.*) The reason this happens is usually CI-related - either someone has put a scripts folder as a subfolder of a scripts folder, put "migrations" scripts inside the scripts folder, or specified two VCS roots containing scripts, which then combine into the same folder.