SQL Clone
SQLServerCentral is supported by Redgate
 
Log in  ::  Register  ::  Not logged in
 
 
 


IFF - 1


IFF - 1

Author
Message
Tom Thomson
Tom Thomson
One Orange Chip
One Orange Chip (26K reputation)One Orange Chip (26K reputation)One Orange Chip (26K reputation)One Orange Chip (26K reputation)One Orange Chip (26K reputation)One Orange Chip (26K reputation)One Orange Chip (26K reputation)One Orange Chip (26K reputation)

Group: General Forum Members
Points: 26319 Visits: 12506
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. Hehew00tHehe

Tom

Hugo Kornelis
Hugo Kornelis
SSCoach
SSCoach (19K reputation)SSCoach (19K reputation)SSCoach (19K reputation)SSCoach (19K reputation)SSCoach (19K reputation)SSCoach (19K reputation)SSCoach (19K reputation)SSCoach (19K reputation)

Group: General Forum Members
Points: 19051 Visits: 12426
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. Hehew00tHehe

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. Cool


Hugo Kornelis, SQL Server MVP
Visit my SQL Server blog: http://sqlblog.com/blogs/hugo_kornelis
Carlo Romagnano
Carlo Romagnano
SSCertifiable
SSCertifiable (7.6K reputation)SSCertifiable (7.6K reputation)SSCertifiable (7.6K reputation)SSCertifiable (7.6K reputation)SSCertifiable (7.6K reputation)SSCertifiable (7.6K reputation)SSCertifiable (7.6K reputation)SSCertifiable (7.6K reputation)

Group: General Forum Members
Points: 7598 Visits: 3401
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. Hehew00tHehe

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. Cool

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.

I run on tuttopodismo
Andrew Diniz
Andrew Diniz
Mr or Mrs. 500
Mr or Mrs. 500 (562 reputation)Mr or Mrs. 500 (562 reputation)Mr or Mrs. 500 (562 reputation)Mr or Mrs. 500 (562 reputation)Mr or Mrs. 500 (562 reputation)Mr or Mrs. 500 (562 reputation)Mr or Mrs. 500 (562 reputation)Mr or Mrs. 500 (562 reputation)

Group: General Forum Members
Points: 562 Visits: 293
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!
jfgoude
jfgoude
UDP Broadcaster
UDP Broadcaster (1.5K reputation)UDP Broadcaster (1.5K reputation)UDP Broadcaster (1.5K reputation)UDP Broadcaster (1.5K reputation)UDP Broadcaster (1.5K reputation)UDP Broadcaster (1.5K reputation)UDP Broadcaster (1.5K reputation)UDP Broadcaster (1.5K reputation)

Group: General Forum Members
Points: 1462 Visits: 299
an easy one and so much explanations for a so little problematic
hakan.winther
hakan.winther
Hall of Fame
Hall of Fame (3.3K reputation)Hall of Fame (3.3K reputation)Hall of Fame (3.3K reputation)Hall of Fame (3.3K reputation)Hall of Fame (3.3K reputation)Hall of Fame (3.3K reputation)Hall of Fame (3.3K reputation)Hall of Fame (3.3K reputation)

Group: General Forum Members
Points: 3335 Visits: 612
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
MCITPBigGrinatabase Developer 2008
MCTS: SQL Server 2008, Implementation and Maintenance
MCSE: Data Platform
Go


Permissions

You can't post new topics.
You can't post topic replies.
You can't post new polls.
You can't post replies to polls.
You can't edit your own topics.
You can't delete your own topics.
You can't edit other topics.
You can't delete other topics.
You can't edit your own posts.
You can't edit other posts.
You can't delete your own posts.
You can't delete other posts.
You can't post events.
You can't edit your own events.
You can't edit other events.
You can't delete your own events.
You can't delete other events.
You can't send private messages.
You can't send emails.
You can read topics.
You can't vote in polls.
You can't upload attachments.
You can download attachments.
You can't post HTML code.
You can't edit HTML code.
You can't post IFCode.
You can't post JavaScript.
You can post emoticons.
You can't post or upload images.

Select a forum

































































































































































SQLServerCentral


Search