ve.
Thanks
AjayHi,
You can do it using ALter database statement, Sample is shown below to
convert to Case sentive, Accent sensitive.
Alter Database adm collate Latin1_General_CS_AS
Note:
No user should be accessing the database during this time.
Thanks
Hari
MCDBA
"Ajay" <anonymous@.discussions.microsoft.com> wrote in message
news:91ACBF73-7821-4B33-A055-AA703ED2FA8C@.microsoft.com...
quote:
> Is there a way in sql server 2k, of making an existing database case
sensitive.
quote:|||Hari,
> Thanks
> Ajay
I executed this command but even after restarting the database, it is case i
nsensitive. I am trying the following in QA to verify case sensitivity.
declare @.p int
select @.P
Thanks
Ajay|||Ajay,
I believe that the case-sensitivity of variable names depends on the
collation of the SQL Server instance. You can check the database
collation with a table column identifier. Just in case it's a
consideration, changing the database collation will not change the
collation of existing varchar, char, text, or ntext columns, even if
they were declared with COLLATE database_default. Here's a repro that
shows both that changing the collation works, but that it doesn't change
column collations:
create database testAlterCollation collate Latin1_General_CI_AS
GO
use testAlterCollation
GO
create table t(i char(1) collate database_default primary key )
GO
insert into t values ('a')
insert into t values ('A')
GO
select I from t
GO
alter database testAlterCollation collate Latin1_General_CS_AS
GO
insert into t values ('A')
GO
select I from t
GO
use master
GO
drop database testAlterCollation
-- Steve Kass
-- Drew University
-- Ref: 55AC66F6-4FE2-43E1-9CCE-3536D7D7BA45
Ajay wrote:
quote:|||Hi Ajay,
>Hari,
>I executed this command but even after restarting the database, it is case
insensitive. I am trying the following in QA to verify case sensitivity.
>declare @.p int
>select @.P
>Thanks
>Ajay
>
I agree with Steve. Just check with table column, there you can see the
difference.
Thanks
Hari
MCDBA
"Steve Kass" <skass@.drew.edu> wrote in message
news:uz1d22v6DHA.488@.TK2MSFTNGP12.phx.gbl...
quote:
> Ajay,
> I believe that the case-sensitivity of variable names depends on the
> collation of the SQL Server instance. You can check the database
> collation with a table column identifier. Just in case it's a
> consideration, changing the database collation will not change the
> collation of existing varchar, char, text, or ntext columns, even if
> they were declared with COLLATE database_default. Here's a repro that
> shows both that changing the collation works, but that it doesn't change
> column collations:
> create database testAlterCollation collate Latin1_General_CI_AS
> GO
> use testAlterCollation
> GO
> create table t(i char(1) collate database_default primary key )
> GO
> insert into t values ('a')
> insert into t values ('A')
> GO
> select I from t
> GO
> alter database testAlterCollation collate Latin1_General_CS_AS
> GO
> insert into t values ('A')
> GO
> select I from t
> GO
> use master
> GO
> drop database testAlterCollation
> -- Steve Kass
> -- Drew University
> -- Ref: 55AC66F6-4FE2-43E1-9CCE-3536D7D7BA45
> Ajay wrote:
>
case insensitive. I am trying the following in QA to verify case
sensitivity.[QUOTE]
>
No comments:
Post a Comment