Red Gate forums :: View topic - Case sensitivity for objects
Return to www.red-gate.com RSS Feed Available

Search  | Usergroups |  Profile |  Messages |  Log in  Register 
Go to product documentation
SQL Source Control 2
SQL Source Control 2 forum

Case sensitivity for objects

Search in SQL Source Control 2 forum
Post new topic   Reply to topic
Jump to:  
Author Message
jjwynn



Joined: 20 May 2011
Posts: 2

PostPosted: Fri May 20, 2011 10:03 pm    Post subject: Case sensitivity for objects Reply with quote

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!!
Back to top
View user's profile Send private message
james.billings



Joined: 16 Jun 2010
Posts: 1116
Location: My desk.

PostPosted: Mon May 23, 2011 1:26 pm    Post subject: Reply with quote

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!
Back to top
View user's profile Send private message
jjwynn



Joined: 20 May 2011
Posts: 2

PostPosted: Wed May 25, 2011 1:45 pm    Post subject: Reply with quote

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?
Back to top
View user's profile Send private message
james.billings



Joined: 16 Jun 2010
Posts: 1116
Location: My desk.

PostPosted: Wed May 25, 2011 1:55 pm    Post subject: Reply with quote

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!
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic All times are GMT + 1 Hour
Page 1 of 1

 
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group