SQL Server: TSQL or safe steps needed: Change collation en masse for group of tables
I had to do this recently and it was a big pain. I ended up doing a write up on changing collations: Collation: Correction -> Expression, Column, Database
My personal preference for method in your situation would probably be to
- Create a new database (with the correct collation if needed)
- Script out the old database
- Do a search and replace on the script file to change the collation from one to another
- Run the script on the new database
- Move the data across
- Do a rename swap to put the new database in place of the old
Your other options are to either create a script that generates alters for each column or to use the GUI. The GUI is going to be slower but more certain. The script method generates the risk of making changes you didn't intend if your script isn't letter perfect.
The script method also has the problem that you have to drop any constraints, indexes etc that touch the column before you can alter it to change the collation. You might be able to generate a script to do that for you but it wouldn't be easy.
If you decide to go the script method I can probably help you generate one to create the alters but for dropping and re-creating indexes/constraints you would be on your own. Like I said I would go with the re-create the database method. It's easy and relatively fast unless you have a huge amount of data. The only real drawback is that it requires there to be double or even triple (space for logs) the size of your database free.