x
login about faq Site discussion (meta-askssc)

can we change collation of the DB after it has filled with some data?

Can we change collation of the db after it has filled with some data..?

more ▼

asked Apr 13 '11 at 08:27 AM in Default

Manikreddy gravatar image

Manikreddy
414 19 26 28

(comments are locked)
10|1200 characters needed characters left

2 answers: sort voted first

Yes you can. There are some things to check prior to doing it. This link has the information: ALTER DATABASE (Transact-SQL) See the section "Changing the Database Collation"

more ▼

answered Apr 13 '11 at 08:51 AM

Shawn_Melton gravatar image

Shawn_Melton
4.7k 13 18 27

(comments are locked)
10|1200 characters needed characters left

You can change the collation of a database at any time, but only new objects will have the new collation. To change existing objects you would need to script out each column of each object that has the collation (i.e. character fields) for example:

ALTER TABLE MyTable
ALTER COLUMN MyCol VARCHAR(10)
COLLATE NewCollation 

MSDN link

more ▼

answered Apr 13 '11 at 08:54 AM

Kev Riley gravatar image

Kev Riley ♦♦
46.1k 39 43 69

(comments are locked)
10|1200 characters needed characters left
Your answer
toggle preview:

Up to 2 attachments (including images) can be used with a maximum of 524.3 kB each and 1.0 MB total.

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments



Facebook logo Follow Ask SSC on Facebook
Find Ask SSC on Google+
linkedin logo Find us on LinkedIn

Topics:

x19

asked: Apr 13 '11 at 08:27 AM

Seen: 428 times

Last Updated: Apr 13 '11 at 08:27 AM

Copyright © 2002-2012 Simple Talk Publishing. All Rights Reserved. If you have any queries, please contact the site administrators.
Ask SQL Server Central is a community service provided by Red Gate.