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

Collation: Correction -> Instance

I had a recent run in with collation problems and it got me started reading about them. As I read I started to realize that for a seemingly simple subject there was a lot to it. So I thought I would go over some of what I found out.

You’ve installed your instance, created your database, created your tables even started running your queries. And then you realize that at some level or another you’ve made a mistake and now you need to change your collation. This gets more complicated the farther up the chain you go. In particular changing the collation of an instance is a big pain. In fact it is such a big pain I highly recommend not doing it. Plan ahead carefully so that you never have to mess with this. However, since life happens:


There is no easy way to do this I’m afraid.

  1. Goes without saying but back up all user and system databases
  2. Detach all of your user databases
  3. Script out all of your server principals (logins, user defined roles, certificates etc) and any jobs.
  4. Back up any DTS packages (hopefully none) and any SSIS packages
  5. List out any configurations
  6. Script out any changes to the model database
  7. Any other changes that you might have made to the original system databases that I might have forgotten. Microsoft has a good list of what to do here: Rebuild System Databases
  8. Rebuild the system databases using setup and the new collation. See the above link
    /SQLSYSADMINACCOUNTS=accounts [ /SAPWD= StrongPassword ] 
  10. Reattach all of the user databases
  11. Use the methods I mentioned in the previous post to change the collation for each of the databases


Over a number of different posts I’m going to discuss some of the surprisingly deep subject of collation.

As a start listen to Rob Farley’s hilarious talk on collation
Collation: Definition
Collation: Location
Collation: Expression
Collation: Correction -> Expression, Column, Database
Collation: Temporary objects & variables: Demonstration
Collation: Confusion

Filed under: Collation, Microsoft SQL Server, SQLServerPedia Syndication, System Databases Tagged: code language, collation, language sql, microsoft sql server, system databases


My name is Kenneth Fisher and I am Senior DBA for a large (multi-national) insurance company. I have been working with databases for over 20 years starting with Clarion and Foxpro. I’ve been working with SQL Server for 12 years but have only really started “studying” the subject for the last 3. I don’t have any real "specialities" but I enjoy trouble shooting and teaching. Thus far I’ve earned by MCITP Database Administrator 2008, MCTS Database Administrator 2005, and MCTS Database Developer 2008. I’m currently studying for my MCITP Database Developer 2008 and should start in on the 2012 exams next year. My blog is at www.sqlstudies.com.


Leave a comment on the original post [sqlstudies.com, opens in a new window]

Loading comments...