Sunday, March 25, 2012

Collation in SQL Server

Is there a way the collation can be changed just for a particular database
rather that on the whole Database Instance. If So, then how and would I be
able to do the same to any number of databases no matter what the collation
is at the Instance Level.
Regards
RV
You can set the collation for a database only on SQL Server 2000, it can't
be done on earlier versions.
If you have SQL Server 2000, you can change the collation for the database
with:
ALTER DATABASE <database name> COLLATE < collation_name >
Note that this will only change the default collation for new columns
created in the database with no explicit collation. All existing columns
will keep the collation they have already.
I have a script that can change the collation of existing columns (not a
trivial affair). I can post this here if you want or you can just Google
this group, as it has been posted before.
Jacco Schalkwijk
SQL Server MVP
"RV" <RV@.discussions.microsoft.com> wrote in message
news:F2E3C62A-0AC5-4EA9-8BA9-CB6866063C77@.microsoft.com...
> Is there a way the collation can be changed just for a particular database
> rather that on the whole Database Instance. If So, then how and would I be
> able to do the same to any number of databases no matter what the
> collation
> is at the Instance Level.
> Regards
> RV

No comments:

Post a Comment