Sunday, March 25, 2012

collation issue

Hi,
I am trying to change the collation of a database
from TblA of ServerA , i look at the field's collation which says "database
default" and i looked into it which says "SQL Collation"
SQL_Latin1_General_CP1_CI_AS
so i issued this statement
ALTER DATABASE dbA COLLATION LATIN_General_BIN --> this shld be a windows
collation ?
after that statment , shldn't it be changed to Windows Collation -->
LATIN_General_BIN ?
kindly advise
tks & rdgs
after i have issued the statement i looked in TblA but the collation is now
also "SQL_Latin1_General_CP1_CI_AS"No. That changes the database collation and any new objects (provided you
don't explicitely declare a different collation when you create them) will
have that default. You have to issue ALTER statements for every character
column though and change each of them. Don't forget about the indexes, which
you also have to change.
--
MeanOldDBA
derrickleggett@.hotmail.com
http://weblogs.sqlteam.com/derrickl
When life gives you a lemon, fire the DBA.
"maxzsim" wrote:
> Hi,
> I am trying to change the collation of a database
> from TblA of ServerA , i look at the field's collation which says "database
> default" and i looked into it which says "SQL Collation"
> SQL_Latin1_General_CP1_CI_AS
> so i issued this statement
> ALTER DATABASE dbA COLLATION LATIN_General_BIN --> this shld be a windows
> collation ?
> after that statment , shldn't it be changed to Windows Collation -->
> LATIN_General_BIN ?
> kindly advise
> tks & rdgs
> after i have issued the statement i looked in TblA but the collation is now
> also "SQL_Latin1_General_CP1_CI_AS"|||Hi ,
i c but how do i actually change the collation for the indexes now ?
apprecite ur advice
tks & rdgs
"MeanOldDBA" wrote:
> No. That changes the database collation and any new objects (provided you
> don't explicitely declare a different collation when you create them) will
> have that default. You have to issue ALTER statements for every character
> column though and change each of them. Don't forget about the indexes, which
> you also have to change.
> --
> MeanOldDBA
> derrickleggett@.hotmail.com
> http://weblogs.sqlteam.com/derrickl
> When life gives you a lemon, fire the DBA.
>
> "maxzsim" wrote:
> > Hi,
> >
> > I am trying to change the collation of a database
> >
> > from TblA of ServerA , i look at the field's collation which says "database
> > default" and i looked into it which says "SQL Collation"
> > SQL_Latin1_General_CP1_CI_AS
> >
> > so i issued this statement
> > ALTER DATABASE dbA COLLATION LATIN_General_BIN --> this shld be a windows
> > collation ?
> >
> > after that statment , shldn't it be changed to Windows Collation -->
> > LATIN_General_BIN ?
> >
> > kindly advise
> >
> > tks & rdgs
> >
> > after i have issued the statement i looked in TblA but the collation is now
> > also "SQL_Latin1_General_CP1_CI_AS"|||> i c but how do i actually change the collation for the indexes now ?
You don't. Drop the index. Change collation for the columns. Create the index.
--
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://www.solidqualitylearning.com/
Blog: http://solidqualitylearning.com/blogs/tibor/
"maxzsim" <maxzsim@.discussions.microsoft.com> wrote in message
news:BA2027F4-F137-4014-918F-E9045C55B63F@.microsoft.com...
> Hi ,
> i c but how do i actually change the collation for the indexes now ?
> apprecite ur advice
> tks & rdgs
> "MeanOldDBA" wrote:
>> No. That changes the database collation and any new objects (provided you
>> don't explicitely declare a different collation when you create them) will
>> have that default. You have to issue ALTER statements for every character
>> column though and change each of them. Don't forget about the indexes, which
>> you also have to change.
>> --
>> MeanOldDBA
>> derrickleggett@.hotmail.com
>> http://weblogs.sqlteam.com/derrickl
>> When life gives you a lemon, fire the DBA.
>>
>> "maxzsim" wrote:
>> > Hi,
>> >
>> > I am trying to change the collation of a database
>> >
>> > from TblA of ServerA , i look at the field's collation which says "database
>> > default" and i looked into it which says "SQL Collation"
>> > SQL_Latin1_General_CP1_CI_AS
>> >
>> > so i issued this statement
>> > ALTER DATABASE dbA COLLATION LATIN_General_BIN --> this shld be a windows
>> > collation ?
>> >
>> > after that statment , shldn't it be changed to Windows Collation -->
>> > LATIN_General_BIN ?
>> >
>> > kindly advise
>> >
>> > tks & rdgs
>> >
>> > after i have issued the statement i looked in TblA but the collation is now
>> > also "SQL_Latin1_General_CP1_CI_AS"|||Hi,
tks for ur reply
rdgs,
"Tibor Karaszi" wrote:
> > i c but how do i actually change the collation for the indexes now ?
> You don't. Drop the index. Change collation for the columns. Create the index.
> --
> Tibor Karaszi, SQL Server MVP
> http://www.karaszi.com/sqlserver/default.asp
> http://www.solidqualitylearning.com/
> Blog: http://solidqualitylearning.com/blogs/tibor/
>
> "maxzsim" <maxzsim@.discussions.microsoft.com> wrote in message
> news:BA2027F4-F137-4014-918F-E9045C55B63F@.microsoft.com...
> > Hi ,
> >
> > i c but how do i actually change the collation for the indexes now ?
> >
> > apprecite ur advice
> >
> > tks & rdgs
> >
> > "MeanOldDBA" wrote:
> >
> >> No. That changes the database collation and any new objects (provided you
> >> don't explicitely declare a different collation when you create them) will
> >> have that default. You have to issue ALTER statements for every character
> >> column though and change each of them. Don't forget about the indexes, which
> >> you also have to change.
> >> --
> >> MeanOldDBA
> >> derrickleggett@.hotmail.com
> >> http://weblogs.sqlteam.com/derrickl
> >>
> >> When life gives you a lemon, fire the DBA.
> >>
> >>
> >> "maxzsim" wrote:
> >>
> >> > Hi,
> >> >
> >> > I am trying to change the collation of a database
> >> >
> >> > from TblA of ServerA , i look at the field's collation which says "database
> >> > default" and i looked into it which says "SQL Collation"
> >> > SQL_Latin1_General_CP1_CI_AS
> >> >
> >> > so i issued this statement
> >> > ALTER DATABASE dbA COLLATION LATIN_General_BIN --> this shld be a windows
> >> > collation ?
> >> >
> >> > after that statment , shldn't it be changed to Windows Collation -->
> >> > LATIN_General_BIN ?
> >> >
> >> > kindly advise
> >> >
> >> > tks & rdgs
> >> >
> >> > after i have issued the statement i looked in TblA but the collation is now
> >> > also "SQL_Latin1_General_CP1_CI_AS"
>

No comments:

Post a Comment