Home > Archive > SQL Server Programming > December 2005 > Changing the collation
You are viewing an archived Text-only version of the thread.
To view this thread in it's original format and/or if you want to reply to
this thread please [click here]
| Author |
Changing the collation
|
|
|
| Dear gurus,
I am pursuing for a statement or function which allow me change the
collation at database level.
Thanks in advance and regards,
Enric
| |
| Jose G. de Jesus Jr MCP, MCDBA 2005-12-16, 7:59 am |
| hi enric,
I think you can change collation on database level using "alter database
collate command "
ALTER DATABASE database
{ ADD FILE < filespec > [ ,...n ] [ TO FILEGROUP filegroup_name ]
| ADD LOG FILE < filespec > [ ,...n ]
| REMOVE FILE logical_file_name
| ADD FILEGROUP filegroup_name
| REMOVE FILEGROUP filegroup_name
| MODIFY FILE < filespec >
| MODIFY NAME = new_dbname
| MODIFY FILEGROUP filegroup_name {filegroup_property | NAME =
new_filegroup_name }
| SET < optionspec > [ ,...n ] [ WITH < termination > ]
| COLLATE < collation_name >
}
--
thanks,
------------------------------------
Jose de Jesus Jr. Mcp,Mcdba
MCP #2324787
"Enric" wrote:
> Dear gurus,
>
> I am pursuing for a statement or function which allow me change the
> collation at database level.
>
> Thanks in advance and regards,
> Enric
| |
| Tibor Karaszi 2005-12-16, 7:09 pm |
| Yes, but that will not change collation for the existing tables. For that, you need to do ALTER
TABLE ... ALTER COLUMN for each table and each column in the database. And it also require you to
drop indexes (and probably a few more things). Not fun...
--
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://www.solidqualitylearning.com/
Blog: http://solidqualitylearning.com/blogs/tibor/
"Jose G. de Jesus Jr MCP, MCDBA" <Email me> wrote in message
news:2CA8C84A-C24A-4F58-8860-4C3F3D454037@microsoft.com...[color=darkred]
> hi enric,
> I think you can change collation on database level using "alter database
> collate command "
>
>
> ALTER DATABASE database
> { ADD FILE < filespec > [ ,...n ] [ TO FILEGROUP filegroup_name ]
> | ADD LOG FILE < filespec > [ ,...n ]
> | REMOVE FILE logical_file_name
> | ADD FILEGROUP filegroup_name
> | REMOVE FILEGROUP filegroup_name
> | MODIFY FILE < filespec >
> | MODIFY NAME = new_dbname
> | MODIFY FILEGROUP filegroup_name {filegroup_property | NAME =
> new_filegroup_name }
> | SET < optionspec > [ ,...n ] [ WITH < termination > ]
> | COLLATE < collation_name >
> }
>
> --
> thanks,
>
> ------------------------------------
> Jose de Jesus Jr. Mcp,Mcdba
> MCP #2324787
>
>
> "Enric" wrote:
>
|
|
|
|
|