Re: Collation in SQL Server

Tech-Archive recommends: Repair Windows Errors & Optimize Windows Performance

From: Jacco Schalkwijk (jacco.please.reply_at_to.newsgroups.mvps.org.invalid)
Date: 11/25/04


Date: Thu, 25 Nov 2004 12:20:34 -0000

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 


Relevant Pages

  • Turkish character problem in SQL Server 2000
    ... I'm trying to migrate a Sybase SQL Anywhere database to SQL server 2000. ... have a problem when I choose "Turkish_CI_AS" as the database collation: ... When I use lowercase Ithere's no error. ...
    (microsoft.public.sqlserver.programming)
  • Re: Change field collation
    ... constraints and statistics on the columns before you can alter ... There are quite a lot of caveats and you use this script at your own risk. ... Changing the collation of the existing tables is unfortunately not very ... You might consider using SEM to script out the objects in the database, ...
    (microsoft.public.sqlserver.programming)
  • Re: Changing collation -- URGENT
    ... You can use the following script to change the collations of your columns, ... duplicate primary key constraints create statements, ... Changing the collation of the existing tables is unfortunately not very ... You might consider using SEM to script out the objects in the database, ...
    (microsoft.public.sqlserver.server)
  • Re: Database collation error after moving to a remote sql server
    ... > I've recently my SMS 2003 database to a remote sql server (it was ... > Server]Cannot resolve collation conflict for equal to operation. ... The char, varchar, text, nchar, nvarchar, or ntext system data types, ...
    (microsoft.public.sms.setup)
  • Re: Different collations in a database
    ... The SQL Server itself is correctly setup to use Finnish_Swedish_CI_AS, ... the fields back to database default. ... database with the correct collation. ... Books Online for SQL Server 2005 at ...
    (comp.databases.ms-sqlserver)