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


Default Server Collation for SQL - does it depend on the O/S version (standard vs. enterprise)?!


Default Server Collation for SQL - does it depend on the O/S version (standard vs. enterprise)?!

Author
Message
Marios Philippopoulos
Marios Philippopoulos
SSChampion
SSChampion (13K reputation)SSChampion (13K reputation)SSChampion (13K reputation)SSChampion (13K reputation)SSChampion (13K reputation)SSChampion (13K reputation)SSChampion (13K reputation)SSChampion (13K reputation)

Group: General Forum Members
Points: 13164 Visits: 3766
I'm having the following predicament.

I recently installed SQL 2008 SP1 on 2 servers; in both installations I left the collation settings unchanged to their default values.

Server1 is on O/S: Windows Server 2008 R2 Enterprise

Server2 is on O/S: Windows Server 2008 Standard SP2

I just discovered that:

- on Server1 the Server collation for SQL is: SQL_Latin1_General_CP1_CI_AS

- on Server2 the Server collation for SQL is: Latin1_General_CI_AS

As a result, I'm getting server-collation conflict errors in multi-server queries between Server2 and other servers in my environment.

How could the default collation for SQL have changed?

I never had to worry about this while installing SQL before...

Anyone have any ideas?

__________________________________________________________________________________
SQL Server 2016 Columnstore Index Enhancements - System Views for Disk-Based Tables
Persisting SQL Server Index-Usage Statistics with MERGE
Turbocharge Your Database Maintenance With Service Broker: Part 2
Marios Philippopoulos
Marios Philippopoulos
SSChampion
SSChampion (13K reputation)SSChampion (13K reputation)SSChampion (13K reputation)SSChampion (13K reputation)SSChampion (13K reputation)SSChampion (13K reputation)SSChampion (13K reputation)SSChampion (13K reputation)

Group: General Forum Members
Points: 13164 Visits: 3766
I actually tried a brand new installation of SQL 2008 SP1 Enterprise Ed. on the server with O/S Windows Server 2008 Standard SP2, and while attempting to set the SQL_Latin1_General_CP1_CI_AS collation setting, I was told by the SQL setup that this collation setting is provided for backward compatibility only! The Latin1_General_CI_AS collation setting was offered as the default!

When I run a query spanning 2 servers, each on one of the two collation settings I get this error:

Msg 468, Level 16, State 9, Line 11
Cannot resolve the collation conflict between "SQL_Latin1_General_CP1_CI_AS" and "Latin1_General_CI_AS" in the equal to operation.


Are collation settings being changed on Windows Server 2008, to the point that older collation settings may never be applicable?!

All the machines in my env are on collation setting SQL_Latin1_General_CP1_CI_AS, which means on any instance which is on collation Latin1_General_CI_AS multi-server queries will fail!

__________________________________________________________________________________
SQL Server 2016 Columnstore Index Enhancements - System Views for Disk-Based Tables
Persisting SQL Server Index-Usage Statistics with MERGE
Turbocharge Your Database Maintenance With Service Broker: Part 2
Marios Philippopoulos
Marios Philippopoulos
SSChampion
SSChampion (13K reputation)SSChampion (13K reputation)SSChampion (13K reputation)SSChampion (13K reputation)SSChampion (13K reputation)SSChampion (13K reputation)SSChampion (13K reputation)SSChampion (13K reputation)

Group: General Forum Members
Points: 13164 Visits: 3766
I found the culprit!

The Windows locale is different in Server2 from that everywhere else in my environment.

On Server2 it is English/Canada.

On the rest of my env it is English/US.

This affects the default SQL collation setting according to this link: http://msdn.microsoft.com/en-us/library/ms143508.aspx.

For English/Canada the default collation setting is Latin1_General_CI_AS.

For English/US the default collation setting is SQL_Latin1_General_CP1_CI_AS

__________________________________________________________________________________
SQL Server 2016 Columnstore Index Enhancements - System Views for Disk-Based Tables
Persisting SQL Server Index-Usage Statistics with MERGE
Turbocharge Your Database Maintenance With Service Broker: Part 2
mphilippopoulos
mphilippopoulos
SSC-Enthusiastic
SSC-Enthusiastic (129 reputation)SSC-Enthusiastic (129 reputation)SSC-Enthusiastic (129 reputation)SSC-Enthusiastic (129 reputation)SSC-Enthusiastic (129 reputation)SSC-Enthusiastic (129 reputation)SSC-Enthusiastic (129 reputation)SSC-Enthusiastic (129 reputation)

Group: General Forum Members
Points: 129 Visits: 104
I was able to switch the server collation on my SQL instance with help from this link:

http://social.msdn.microsoft.com/forums/en-US/sqldatabaseengine/thread/ab266beb-5618-4f3a-bd4b-b9fdc7f02344/

In the directory where the SQL installation setup.exe was located, I opened a command prompt window and entered:

Setup /QUIET /ACTION=REBUILDDATABASE /INSTANCENAME="instanceName" /SQLSYSADMINACCOUNTS="domainName\acctName" /SAPWD="XXXXXXXX" /SQLCOLLATION="SQL_Latin1_General_CP1_CI_AS"


I had to check this file for possible errors:

C:\Program Files\Microsoft SQL Server\100\Setup Bootstrap\Log\Summary.txt

The switch worked, so I don't have to re-install the SQL...

BIG RELIEF... :-D

Just thought I would share this here, in case other people find it useful.
Perry Whittle
Perry Whittle
SSC Guru
SSC Guru (56K reputation)SSC Guru (56K reputation)SSC Guru (56K reputation)SSC Guru (56K reputation)SSC Guru (56K reputation)SSC Guru (56K reputation)SSC Guru (56K reputation)SSC Guru (56K reputation)

Group: General Forum Members
Points: 56083 Visits: 17729
Correct, SQL Server setup inspects the server locale during install and selects a collation based on the regional settings. It is important to set these correctly during OS deployment!

-----------------------------------------------------------------------------------------------------------

"Ya can't make an omelette without breaking just a few eggs" ;-)
mphilippopoulos
mphilippopoulos
SSC-Enthusiastic
SSC-Enthusiastic (129 reputation)SSC-Enthusiastic (129 reputation)SSC-Enthusiastic (129 reputation)SSC-Enthusiastic (129 reputation)SSC-Enthusiastic (129 reputation)SSC-Enthusiastic (129 reputation)SSC-Enthusiastic (129 reputation)SSC-Enthusiastic (129 reputation)

Group: General Forum Members
Points: 129 Visits: 104
Perry Whittle (8/16/2010)
Correct, SQL Server setup inspects the server locale during install and selects a collation based on the regional settings. It is important to set these correctly during OS deployment!


Unfortunately I'm paying for the mistakes made by the systems admin... Life's not fair...Angry
Perry Whittle
Perry Whittle
SSC Guru
SSC Guru (56K reputation)SSC Guru (56K reputation)SSC Guru (56K reputation)SSC Guru (56K reputation)SSC Guru (56K reputation)SSC Guru (56K reputation)SSC Guru (56K reputation)SSC Guru (56K reputation)

Group: General Forum Members
Points: 56083 Visits: 17729
mphilippopoulos (8/16/2010)
Perry Whittle (8/16/2010)
Correct, SQL Server setup inspects the server locale during install and selects a collation based on the regional settings. It is important to set these correctly during OS deployment!


Unfortunately I'm paying for the mistakes made by the systems admin... Life's not fair...Angry


That's why I always insist that I carry out my own server builds. If I can't I check them rigorously them throw them back if they're wrong!

-----------------------------------------------------------------------------------------------------------

"Ya can't make an omelette without breaking just a few eggs" ;-)
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