Change the Server Collation of SQL Server 2005

Posted on October 11, 2008
Filed Under SQL |

I installed my SQL Server 2005 wit the default options and found out that my db collation and the server collation were different that caused my application to throw a collation mismatch exception when comparing.

I tried my options, but couldn’t get it working with out changing the server collation to be the same as the database collection option. I still believe that there should be a way to do it with out doing so, but I don’t have much time to put in to find out how.

Changing the Server Collation is bit tricky, basically we will have to reinstall the SQL server instance, with the new Server Collation, you can do it with the setup.exe in the “C:\Program Files\Microsoft SQL Server\90\Setup Bootstrap” folder.

1
2
3
4
5
6
start /wait setup.exe /qb 
	INSTANCENAME=MSSQLSERVER 
	REINSTALL=SQL_Engine 
	REBUILDDATABASE=1 
	SAPWD=test 
	SQLCOLLATION=Finnish_Swedish_CS_AS

Warning: When you reinstall the SQL Engine, you will loose all your user databases so please take a back up of all your user databases before you do this.

Comments

2 Responses to “Change the Server Collation of SQL Server 2005”

  1. Ranga on October 29th, 2008 9:42 pm

    What :O !!!!!!!!!!!!!! you are working with SQL 2005 ? what the heck is that ? I never thought that you will become a MS slave ;)

    he he he he

    Cheers !
    Ranga

  2. Ramesh Thiruchelvam on October 30th, 2008 10:30 am

    Yeah man, our back end if MS SQL :( what to do it’s our clients choice.

Leave a Reply




  • About

    This is an area on your website where you can add text. This will serve as an informative location on your website, where you can talk about your site.