Click here to monitor SSC
SQLServerCentral is supported by Red Gate Software Ltd.
 
Log in  ::  Register  ::  Not logged in
 
 
 
        
Home       Members    Calendar    Who's On


Add to briefcase «««12345

IFF - 1 Expand / Collapse
Author
Message
Posted Wednesday, June 19, 2013 11:48 AM


SSCrazy Eights

SSCrazy EightsSSCrazy EightsSSCrazy EightsSSCrazy EightsSSCrazy EightsSSCrazy EightsSSCrazy EightsSSCrazy EightsSSCrazy EightsSSCrazy Eights

Group: General Forum Members
Last Login: Today @ 6:40 PM
Points: 8,743, Visits: 9,292
Hugo Kornelis (6/19/2013)
sqlnaive (6/19/2013)
In a normal scenario it should be considered as the default behaviour for the question which is CI (and not CS).

I disagree, and I'll tell you why.

In questions where collation is not a factor, using the consistent case throughout the question prevents ambiguity. If you ensure the question works okay onm a CS collation, it will also be okay on a CI collation. The reverse is not true. So writing the question for a CS collation is the best way to ensure that everyone has a fair chacne - including those who are aware that not all SQL Server instances in the world are installed on a CI collation.

And in questions where collation is a factor, the collation should always be included in the question, so there can never be a problem there.

Although I agree that it is probably a good idea to specify the collation when it is relevant (i.e. when it affects the answer to the question) I also have my doubts about it. After all, case-sensitive collations are an absolute pain for almost all purposes, so it might be a good idea to get people whose servers are set up with case-sensitive collations to suffer a little extra pain in QOTD in the hope that this might encourage them not to use the horrible things in the future.


Tom
Post #1465314
Posted Wednesday, June 19, 2013 2:53 PM


SSCertifiable

SSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiable

Group: General Forum Members
Last Login: Today @ 10:24 AM
Points: 5,977, Visits: 8,239
L' Eomot Inversé (6/19/2013)
After all, case-sensitive collations are an absolute pain for almost all purposes, so it might be a good idea to get people whose servers are set up with case-sensitive collations to suffer a little extra pain in QOTD in the hope that this might encourage them not to use the horrible things in the future.

A production server should be installed with the collation that best fits the application(s) it will support. If that means case sensitive, than that is the best collation, and not a horrible thing at all.
A dev server that is used to develop for deployment on a specific server should be installed with the same collation as where the code will eventually be deployed.

And dev servers that are used to develop code that may be deployed "anywhere" should always be installed with case sensitive collations, as that avoids making mistakes taht can be very costly (and a royal pain in the backside) to fix later. If your dev server is case sensitive, you'll get slapped immediately when messing up the case of object names, and you'll soon learn not to make those mistakes. If your dev server is case insensitive, you will, eventually, get sloppy with upper- and lowercase. And you will not notice that, not even get a warning, during any of your tests. Even your first deployments may go right - until your database is sold to a customer who is running SQL on a case sensitive collation, and he reports errors all the time. Fun! (not!)

So, I guess I do not agree with you.



Hugo Kornelis, SQL Server MVP
Visit my SQL Server blog: http://sqlblog.com/blogs/hugo_kornelis
Post #1465392
Posted Thursday, June 20, 2013 1:01 AM


SSCrazy

SSCrazySSCrazySSCrazySSCrazySSCrazySSCrazySSCrazySSCrazy

Group: General Forum Members
Last Login: Today @ 1:23 AM
Points: 2,509, Visits: 2,386
Hugo Kornelis (6/19/2013)
L' Eomot Inversé (6/19/2013)
After all, case-sensitive collations are an absolute pain for almost all purposes, so it might be a good idea to get people whose servers are set up with case-sensitive collations to suffer a little extra pain in QOTD in the hope that this might encourage them not to use the horrible things in the future.

A production server should be installed with the collation that best fits the application(s) it will support. If that means case sensitive, than that is the best collation, and not a horrible thing at all.
A dev server that is used to develop for deployment on a specific server should be installed with the same collation as where the code will eventually be deployed.

And dev servers that are used to develop code that may be deployed "anywhere" should always be installed with case sensitive collations, as that avoids making mistakes taht can be very costly (and a royal pain in the backside) to fix later. If your dev server is case sensitive, you'll get slapped immediately when messing up the case of object names, and you'll soon learn not to make those mistakes. If your dev server is case insensitive, you will, eventually, get sloppy with upper- and lowercase. And you will not notice that, not even get a warning, during any of your tests. Even your first deployments may go right - until your database is sold to a customer who is running SQL on a case sensitive collation, and he reports errors all the time. Fun! (not!)

So, I guess I do not agree with you.

The only advantage of case-sensitive collation is that programmers should write statements with the right case. But changing a collation for an application never is a good idea. Swithing CI with CS or viceversa leads to many problems.
I work with both: old thirdy-part application uses CI and the new one CS.
I prefer case INSENSITIVE.
Post #1465478
Posted Tuesday, July 2, 2013 1:56 AM
SSC Veteran

SSC VeteranSSC VeteranSSC VeteranSSC VeteranSSC VeteranSSC VeteranSSC VeteranSSC Veteran

Group: General Forum Members
Last Login: Monday, April 14, 2014 1:11 AM
Points: 216, Visits: 273
L' Eomot Inversé (6/6/2013)
michlimes (6/6/2013)
default collation is choosen at installation process - so imo it could be CS_AS.

You can override the installation defaults when doing the installation. Then you don't have a default installation any more, you have a non-default one. So the word "default" is a bit ambiguous - the server default in your instance is not the installation default.

However, I think you are right to suggest that the collation should always be specified in a QotD when it is relevant.


Here here!
Post #1469327
Posted Friday, July 12, 2013 6:32 AM
Ten Centuries

Ten CenturiesTen CenturiesTen CenturiesTen CenturiesTen CenturiesTen CenturiesTen CenturiesTen Centuries

Group: General Forum Members
Last Login: Wednesday, July 23, 2014 3:24 AM
Points: 1,144, Visits: 299
an easy one and so much explanations for a so little problematic
Post #1472987
Posted Wednesday, July 17, 2013 5:48 AM
SSCrazy

SSCrazySSCrazySSCrazySSCrazySSCrazySSCrazySSCrazySSCrazy

Group: General Forum Members
Last Login: Thursday, July 3, 2014 2:45 AM
Points: 2,531, Visits: 536
Easy question, as long as I ignore the fact that some instances may require case sensitivity because of the applications using the db (well... not written by me, but probably a bought application that is converted from Oracle where it's more common to use case sensitivity) .

/Håkan Winther
MCITP:Database Developer 2008
MCTS: SQL Server 2008, Implementation and Maintenance
Post #1474512
« Prev Topic | Next Topic »

Add to briefcase «««12345

Permissions Expand / Collapse