SQL collation and System Center

What is SQL collation? SQL collation refers to a set of rules that determine how data is sorted and compared. Character data is sorted using rules that define the correct character sequence, with options for specifying case-sensitivity, accent marks, kana character types and character width.

SQL collation knows to be pretty annoying thing, especially if you chose wrong one.

I find out that on hard way. After I was install SCCM 2012 RC and I was try to „upgrade“ to RC2.

Where is the catch? Catch is when you going to install SQL server, by default it picks up collation from regional settings (in my case Croatian). You can change collation during installation but if you are not careful enough you could face with serious problem (like me). Why? Because RC will work fine but upgrade to RTM will be almost impossible.

Here are few pictures how to choose right collation

Collation 1Collation 2Collation 3Collation 4

Microsoft supports upgrade System Center 2012 products from RC to RTM. RTM (or RC2) will asks for SQL_Latin1_General_CP1_CI_AS collation on your SQL. Now you have problem if you pick wrong collation before or you didn’t pick it at all (you have default created on regional settings bases).

Only way to resolve the problem is to uninstall SQL and install it again with correct collation.

But if you are using existing SQL you need to (can) change collation before installing SCCM 2012.

How can you do that? You can do that using a script: “Setup /QUIET /ACTION=REBUILDDATABASE /INSTANCENAME=
MSSQLSERVER /SQLSYSADMINACCOUNTS=demo\administrator /SAPWD= Pa$$w0rd /SQLCOLLATION=SQL_Latin1_General_CP1_CI_AS“

Collation 5

You must do that before starting setup SCCM 2012, or setup will fail with error message about wrong collation. If you have right collation, setup will create CM_xxx database (where xxx is site code)

And for last thing, you can’t change collation on existing CM_xxx database. Why? CM_xxx database is really complex, and collation change will fail. Colleague of mine Luka Gros tried but he didn’t make it. He received error every time.

I show this on demo on my presentation on Windays12 and this was one of tricks which I presented for SCCM 2012

Advertisements