x

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, 2011 at 08:27 AM in Default

avatar image

Manikreddy
414 25 26 31

(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, 2011 at 08:51 AM

avatar image

Shawn_Melton
6.4k 21 25 34

(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, 2011 at 08:54 AM

avatar image

Kev Riley ♦♦
64.2k 48 62 81

(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

SQL Server Central

Need long-form SQL discussion? SQLserverCentral.com is the place.

Topics:

x24

asked: Apr 13, 2011 at 08:27 AM

Seen: 878 times

Last Updated: Apr 13, 2011 at 08:27 AM

Copyright 2016 Redgate Software. Privacy Policy