How to change SQL Server collation

After installation of SQL Server If you need to change collation, you can do using the below commands.

This code may harmful for your environment Please test on separate environment.

--->> Server collation change
sqlservr -m -T4022 -T3659 -s"SQL2017" -q"SQL_Latin1_General_CP1_CI_AI"
/*
[-m] single user admin mode
[-T] trace flag turned on at startup
[-s] sql server instance name
[-q] new collation to be applied
In this example, we used two trace flags:
T4022: Trace Flag 4022: Bypass startup procedures in SQL Server.
T3569: Trace Flag 3569: Enables logging all errors to errorlog during server startup.
*/

Spread the love

Leave a Comment