Case sensitivity for objects

jjwynnjjwynn Posts: 3
Hello,

I have a database which I am trying to add to source control (v2.1). It is a SQL Server 2008 R2 database and the source control repository is SVN. The database has a collation of Latin1_General_BIN2 and has objects (tables and stored procedures) which differ only by case.

I am able to link the database successfully, but when I click on the "Commit Changes" tab, I get an error during the "Calculating changes" phase.

The error is posted below. While I am not positive the error has to do with a case-insensitive equality check on keys (where the key is possibly the schema.objectname), the error seems to point in that direction. Is there a setting to change to support case-sensitivity in object names?

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 System.Linq.Enumerable.ToDictionary[TSource,TKey,TElement](IEnumerable`1 source, Func`2 keySelector, Func`2 elementSelector, IEqualityComparer`1 comparer)
at System.Linq.Enumerable.ToDictionary[TSource,TKey,TElement](IEnumerable`1 source, Func`2 keySelector, Func`2 elementSelector)
at #G3c.#A57.#l36(String , #B57 )
at #G3c.#K3c.#83c(String , #O9U )
at #G3c.#A57.#f6c(String , Options , DatabaseConnection , Database , Database , SchemaMappings , ICancellableOperationStatus )
at #oEc.#VXM.#t.#XXM.#tYM()
at #oEc.#VXM.#t.#WXM.#qYM()
at #oEc.#VXM.#t.#XXM.#zYM(ToCommitChangeSet& toCommitChangeSet)
at #oEc.#VXM.#mYM[#eTb](Func`2 , ICancellableOperationStatus , IReadOnlySourceControlServerCallBacks )
at #oEc.#VXM.#jYM(ICancellableOperationStatus , IReadOnlySourceControlServerCallBacks )
at #oEc.#4Ec.#7Jc(ICancellableOperationStatus , IReadOnlySourceControlServerCallBacks )
at #oEc.#4Ec.#t.#u3.#ofA(ICancellableOperationStatus )
at RedGate.SQLSourceControl.Engine.Cancellables.MutexedCancellableOperation`1.#t.#u3.#k5f()
at RedGate.SQLSourceControl.Engine.Cancellables.CancellableOperationBase.InvokeWithTracker(Action action)
at RedGate.SQLSourceControl.Engine.Cancellables.MutexedCancellableOperation`1.Invoke()
at #eEc.#Qlg.Invoke()
at #JLc.#PLc.#t.#Jfb.#EJf()
at RedGate.SQLSourceControl.Engine.SmartAssembly.ExceptionReporting.ErrorReporterBase.Do(Action , Predicate`1 , Boolean )
at RedGate.SQLSourceControl.Engine.SmartAssembly.ExceptionReporting.ErrorReporterBase.DoWithObviousExceptionsRethrowAll(Action action)
at RedGate.SQLSourceControl.CommonUI.Forms.ErrorDialog.DoWithObviousExceptionsRethrowAll(Action action)
at #JLc.#PLc.#CTc(ICancellableOperation`1 , Object )

Any help is greatly appreciated.

Thanks!!

Comments

  • James BJames B Posts: 1,124 Silver 4
    Thanks for your post.

    I don't think the problem here is quite as simple as SQL Source Control not dealing with the case correctly. Certainly, if you're using a non-case-sensitive collation you'll get this kind of error, but I just created a new database using the same as you, with two tables (TABLE1 and table1) - this works fine; I can commit the objects, and also "Get Latest" back out to a new empty database.

    Another possible cause is if you have multiple files in your repository that refer to the same object. If, for instance, someone made a backup copy of some of the files using Tortoise, and these are held under the same folder you're linking to, it would trigger this error.

    If that's not relevant, can you please submit the error report to us, using the "Serious error? Send Report" link, ensuring you enter your email address so I can find it, as this should contain more information to help us troubleshoot the problem.

    If you want to mail me directly, we've got a ticket open for you, so mail support@red-gate.com quoting F0048083 in the subject line.

    Thanks!
    Systems Software Engineer

    Redgate Software

  • Thanks for responding. To my knowledge, I don't have multiple files which refer to the same object in the repository as this error occurs when I'm initially trying to add objects to the repository right after I link a database. Nothing seems to get committed because it errors on the "Calculating changes" step.

    I have tried submitting the error report, but I have been unsuccessful as I am encountering redirection errors in the dialog box. Can you tell me which files (and their locations) I can submit along with the email?
  • James BJames B Posts: 1,124 Silver 4
    Sounds like the report is sticking due to a proxy.

    If you get the box up where you enter your email address on the error dialog, and then disable/unplug your network connection, it should fail with an option to save the report.

    If you do that, you can mail it through to support@red-gate.com quoting the reference in my earlier message in the subjectline.

    Thanks!
    Systems Software Engineer

    Redgate Software

Sign In or Register to comment.