Wednesday, March 7, 2012

Alter Dabatase Collation

ALTER DATABASE <database name>
COLLATE SQL_Latin1_General_Cp1_CI_AS

Can anyone tell me the implication of using the above SQL statement against a database. I am running a third party financial planning software application that communicates with an SQL2000 database component. The database vendor has specified a collation setting of : charset=iso_1 sort_order=nocase_iso charset_num=1 sort_order_num=52 My SQL Server default instance is case insensitive. Will an alter database command adequately change all elements required or may i still encounter operating problems with the software due to conflicting collation issues?This would change the default collation for the database. Any objects created after this would take up this collation unless otherwise stated.

All of your previously created objects will retain their collation(s) however. I suggest you take a look at "collate" in sql book online for some details on handling multi collations.|||Thanks Oj

If I wanted all future databases to inherit the new collation setting using the ALTER DATABASE command, could i safely alter the model database from which all other databases inherit collation settings?

Would this be a safe method as there is no data in there as yet?|||Sure. That is what Model is intended to be used.

Do be aware that you could specify the desired collation when creating the database (whether or not it's the same as model). Take a look at 'collate' option of the 'create database' in sql book online.

No comments:

Post a Comment