How To Change SQL Server Instance Collation After Installation

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.

  1. Backup any user databases, jobs (In this case Only one database configured, no jobs yet)
  2. Detach user databases
  3. Determine the Sql server instance collation (In this case Latin1_General_100_CI_AS)
  4. Rebuild the system databases by using the below command

Setup /QUIET /ACTION=REBUILDDATABASE /INSTANCENAME=MSSQLSERVER

/SQLSYSADMINACCOUNTS=accuntname /[ SAPWD= accountpwd ]

/SQLCOLLATION=Latin1_General_100_CI_AS

 

Reference: https://msdn.microsoft.com/en-us/library/ms179254.aspx

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!

Cheers

Ramasankar Molleti

Linkedin: Linkedin Profile

Twitter: Twitter

 

Advertisements

About Ramasankar

My name is Ramasankar Molleti, and I have been working on sql server over 10 years, primarily focusing on Database Administration, Architect , Development and Business intelligence of sql server. I also hold various Microsoft certifications (Microsoft Certified Information Technology Professional, Microsoft Certified Technology Specialist, and Microsoft Certified Solution Associate). Disclaimer The views expressed on this website/blog are mine alone and do not reflect the views of my company. All postings on this blog are provided “AS IS” with no warranties, and confers no rights. The owner of https://sqlram.wordpress.com will not be liable for any errors or omissions in this information nor for the availability of this information. The owner will not be liable for any losses, injuries, or damages from the display or use of this information.
This entry was posted in Uncategorized. Bookmark the permalink.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s