Collation: Correction -> Instance

Leave a comment

April 14, 2014 by Kenneth Fisher

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

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Enter your email address to follow this blog and receive notifications of new posts by email.

Join 3,755 other subscribers

Follow me on Twitter

ToadWorld Pro of the Month November 2013
%d bloggers like this: