I have installed SQL Server 2008 Express R2 and in the istallation wizard I selected the Modern_Spabish_CS_AS collation because I want all the databases in the server are case sesitive.
However, when I restore a backup, although in the properties of the server and the database the collation is Modern_CS_AS, when I query the databse is not case sensitive.
When I use this query:
SELECT DATABASEPROPERTYEX(DB_NAME(), 'Collation') DBCollation,collation_name FROM sys.columns WHERE object_id=OBJECT_ID('[dbo].[Users]') AND name = 'User'
I get this result:
DB_COllation: Modern_Spanish_CS_AS
CollationName: Modern_Spanish_CI_AS
So although the collation of the DB is CS (case sensitive) it seems that collation is not case sensitive.
What is db collation and what is collation name? In the installation I did not not see the posibility to set de collation name, only the collation, so I don't know what I did wrong.
I would like that the new databases are case sensitive and change the collation at the existing database. Is it possible?
Thanks.