Last week one of the support team member contacted me for help how to change the collation without re-installing sql server. Team has installed and configured sql server but forgot to change the collation as per the customer application needs. Good thing about this , it was a brand new install
Here is how we can change the collation of sql server instance without re-installing.
- Backup any user databases, jobs (In this case Only one database configured, no jobs yet)
- Detach user databases
- Determine the Sql server instance collation (In this case Latin1_General_100_CI_AS)
- Rebuild the system databases by using the below command
Setup /QUIET /ACTION=REBUILDDATABASE /INSTANCENAME=MSSQLSERVER
/SQLSYSADMINACCOUNTS=accuntname /[ SAPWD= accountpwd ]
5. Once the rebuild operation is complete, check the collation to verify whether this change is successful or not. There you go!
6. Attach all user databases if any which were detached in step 2
7. Change the collation of user databases if any (ALTER DATABASE DBName collate SQL_Latin1_General_CP1_CI_AI)
Now we have new instance with new collation setting.
Hope you enjoyed the post!
Linkedin: Linkedin Profile