Welcome to dbFreaks.com!
FAQFAQ    SearchSearch      ProfileProfile    Private MessagesPrivate Messages   Log inLog in

Problem with 'case sensitive' after changing collation

 
   Database Help (Home) -> General Discussions RSS
Next:  sqlserver: requested operation is not supported o..  
Author Message
dbizier

External


Since: Feb 26, 2009
Posts: 2



(Msg. 1) Posted: Thu Feb 26, 2009 12:39 pm
Post subject: Problem with 'case sensitive' after changing collation
Archived from groups: comp>databases>ms-sqlserver (more info?)

Hi,

the collation of my database was: "Latin1_General_CI_AI".

I changed it for "Chinese_PRC_90_BIN" because I want to store chinese
and english stuff.

I used this SQL command:

=======================
USE myDataBase

alter database myDataBase collate Chinese_PRC_90_BIN
=======================

Now I have many errors when I browse my web application because the
database is now case-sensitive.

How to disable "case-sensitive" and keep my new collation ?

Server: Windows Server 2003
BD: Sql Server 2005 Express Edition

Thanks for your help!

David

 >> Stay informed about: Problem with 'case sensitive' after changing collation 
Back to top
Login to vote
dbizier

External


Since: Feb 26, 2009
Posts: 2



(Msg. 2) Posted: Thu Feb 26, 2009 7:23 pm
Post subject: Re: Problem with 'case sensitive' after changing collation [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

On Feb 26, 5:41 pm, Erland Sommarskog wrote:
> ( ) writes:
> > the collation of my database was: "Latin1_General_CI_AI".
>
> > I changed it for "Chinese_PRC_90_BIN" because I want to store chinese
> > and english stuff.
>
> > I used this SQL command:
>
> >=======================
> > USE myDataBase
>
> > alter database myDataBase collate Chinese_PRC_90_BIN
> >=======================
>
> > Now I have many errors when I browse my web application because the
> > database is now case-sensitive.
>
> > How to disable "case-sensitive" and keep my new collation ?
>
> > Server: Windows Server 2003
> > BD: Sql Server 2005 Express Edition
>
> The obvious choice seems to be:
>
>    ALTER DATABASE myDataBase COLLATE Chinese_PRC_90_CI_AI
>
> A few comments:
>
> As long as you use Unicode, you can store Chinese text with
> Latin1_General_CI_AI as well, but obviously the Chinese data may not
> be sorted correctly. If you store Chinese text in varchar columns,
> you must use a Chinese collation.
>
> Beware that changing the collation, only updates the system table.
> If you have existing tables, you need to change the collation of
> their character columns separately, one at a time.
>
> --
> Erland Sommarskog, SQL Server MVP, esq....DeleteThis@sommarskog.se
>
> Links for SQL Server Books Online:
> SQL 2008:http://msdn.microsoft.com/en-us/sqlserver/cc514207.aspx
> SQL 2005:http://msdn.microsoft.com/en-us/sqlserver/bb895970.aspx
> SQL 2000:http://www.microsoft.com/sql/prodinfo/previousversions/books.mspx

Thank you very much. I will read carefully these informations and I
will re-configure my BD.

 >> Stay informed about: Problem with 'case sensitive' after changing collation 
Back to top
Login to vote
Erland Sommarskog2

External


Since: May 30, 2004
Posts: 2061



(Msg. 3) Posted: Thu Feb 26, 2009 7:26 pm
Post subject: Re: Problem with 'case sensitive' after changing collation [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

( ) writes:
> the collation of my database was: "Latin1_General_CI_AI".
>
> I changed it for "Chinese_PRC_90_BIN" because I want to store chinese
> and english stuff.
>
> I used this SQL command:
>
>=======================
> USE myDataBase
>
> alter database myDataBase collate Chinese_PRC_90_BIN
>=======================
>
> Now I have many errors when I browse my web application because the
> database is now case-sensitive.
>
> How to disable "case-sensitive" and keep my new collation ?
>
> Server: Windows Server 2003
> BD: Sql Server 2005 Express Edition

The obvious choice seems to be:

ALTER DATABASE myDataBase COLLATE Chinese_PRC_90_CI_AI

A few comments:

As long as you use Unicode, you can store Chinese text with
Latin1_General_CI_AI as well, but obviously the Chinese data may not
be sorted correctly. If you store Chinese text in varchar columns,
you must use a Chinese collation.

Beware that changing the collation, only updates the system table.
If you have existing tables, you need to change the collation of
their character columns separately, one at a time.


--
Erland Sommarskog, SQL Server MVP, esquel DeleteThis @sommarskog.se

Links for SQL Server Books Online:
SQL 2008: http://msdn.microsoft.com/en-us/sqlserver/cc514207.aspx
SQL 2005: http://msdn.microsoft.com/en-us/sqlserver/bb895970.aspx
SQL 2000: http://www.microsoft.com/sql/prodinfo/previousversions/books.mspx
 >> Stay informed about: Problem with 'case sensitive' after changing collation 
Back to top
Login to vote
Display posts from previous:   
Related Topics:
Problem With View and Changing Field Length - I had a strange situation with a view in SQL 7, that I could use some input on. I had a very simple view -- select a, b, c from table1 where x=y and z=q. Field a in table1 originally was varchar 70. A long time ago I changed it to varchar 95. I used...

case-when error - hello i am learning how to write stored procedures in sql server, i would like to know what's wrong with the following statement? please help the management studio gives me the following error: Msg 156, Level 15, State 1, Procedure spDealMasterSearch,...

Using Case within Select - Hello, I'm working on a DB on which I can run only SELECT commands, so I'd like to modify this UPDATE command, which makes use of CASE: update Table set field2 = case when (SUBSTR(field,1,2) in ('01','02','05')) then 1 when (SUBSTR(field,1,2) in..

Bizarre case behavior. - I'm doing a select which includes the following: case when (rtrim(ltrim(T464.COMMENT_4)) = '' or T464.COMMENT_4 is null) then '' else convert(datetime,left(replace(replace(T464.COMMENT_4,' QTR: ',''),' - ',''),10)) end as QuarterStartDate The COMMENT_...

Select CASE returning NULL value - I have the following CASE statement in a view: (SELECT CASE WHEN ISNULL([dbo].[tblContact].[JobTitleID], NULL) = NULL THEN [dbo].[f_ContactNameFL]([dbo].[tblContact].[ContactID]) ELSE [dbo].[f_ContactNameFL]([dbo].[tblContact].[ContactID]) + ', ' +..
   Database Help (Home) -> General Discussions All times are: Pacific Time (US & Canada)
Page 1 of 1

 
You can post new topics in this forum
You can reply to topics in this forum
You can edit your posts in this forum
You can delete your posts in this forum
You can vote in polls in this forum



[ Contact us | Terms of Service/Privacy Policy ]