You are here

How to change MSSQL collation setting without reinstalling the server


You can go into the situation that after installation of MSSQL Server you found that you forgot to set colation to parameters that you need. You can change that parameter in two ways - 1) completely reinstall MSSQL, whitch is time consuming operation. 2) Change collation with command entered in command prompt, whitch takes far less time and effort.You can see my collation setting on screenshot:

To change it first of all make a backup of all databases, including system databases. Then stop MSSQL service.

After that in command prompt go to binn folder, in folder where mssql installed. In my case path is C:\Program Files\Microsoft SQL Server\MSSQL12.SQLEXPRESS\MSSQL\Binn

And in that folder you shoud run the command:

sqlservr -m -T4022 -T3659 -s"SQLEXPRESS" -q"Cyrillic_General_CI_AS"

Where  SQLEXPRESS should be your name of mssql instance . You can see it in MSSQL service properties. For the place of Cyrillic_General_CI_AS you must set collation that you need.

After command will finish its work leave command prompt and start MSSQL service. After that check in server and databases properties that collation was changed and everything is working fine.

0 0

Share the article with your friends in social networks, maybe it will be useful to them.


If the article helped you, you can >>thank the author<<