Home > Alter, SQL Queries, SQL Server, T-SQL > Changing the collation of a database

Changing the collation of a database

You can change the collation by using SSMS.

Right click on database, click on properties. click on options on the left hand pane. Select the collation from the drop down list.

you can alternatively use the script

ALTER DATABASE <<db_name>>
COLLATE <<collation_name>>

example:
ALTER DATABASE TEST_DATABASE
COLLATE SQL_Latin1_General_CP1_CI_AS

it will be better if you change the database to single user mode before changing the collation. You can use the scripts given below for that

ALTER  DATABASE <<db_name>>  SET SINGLE_USER  WITH NO_WAIT
EXEC   SP_DBOPTION   ‘<<db_name>>’,’SINGLE USER’,’TRUE’

Advertisements
  1. October 1, 2009 at 2:51 am

    Hey, I read a lot of blogs on a daily basis and for the most part, people lack substance but, I just wanted to make a quick comment to say GREAT blog!…..I”ll be checking in on a regularly now….Keep up the good work! :)

  2. Tijo
    October 5, 2009 at 5:32 am

    @ Tnelson
    Thanks. Its really encouraging to hear that post was useful.. :)

  3. March 12, 2013 at 8:22 am

    I’ve been exploring for a little bit for any high-quality articles or weblog posts in this kind of house . Exploring in Yahoo I finally stumbled upon this web site. Studying this information So i am glad to convey that I have a very good uncanny feeling I came upon just what I needed. I most definitely will make certain to do not forget this site and provides it a look on a continuing basis. Meghan

  4. April 10, 2013 at 3:42 am

    I’m amazed, I have to admit. Seldom do I encounter a blog that’s
    equally educative and entertaining, and without a doubt, you have hit the nail on the head.

    The problem is something that not enough people are speaking intelligently about.

    Now i’m very happy that I found this during my search for something regarding this.

  5. July 22, 2013 at 5:35 pm

    If you desire to take a good deal from this post then you have to apply these strategies
    to your won website.

  6. August 7, 2013 at 6:46 pm

    Thanks for every other informative blog. Where else may just I
    am getting that type of information written in such
    an ideal manner? I have a undertaking that I am simply now working on,
    and I’ve been at the glance out for such information.

  1. February 8, 2010 at 4:11 pm

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

%d bloggers like this: