|
database
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
Changing the collationDear gurus,
I am pursuing for a statement or function which allow me change the collation at database level. Thanks in advance and regards, Enric 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 ] Show quote | 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 > } -- Show quotethanks, ------------------------------------ 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 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... -- Show quoteTibor 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... > 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 |
|||||||||||||||||||||||