0

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.

Álvaro García
  • 18,114
  • 30
  • 102
  • 193
  • 2
    possible duplicate http://stackoverflow.com/questions/3296428/changing-sql-server-collation-to-case-insensitive-from-case-sensitive – Gonzalo.- May 16 '13 at 14:42
  • also, read this http://social.msdn.microsoft.com/forums/en-US/transactsql/thread/f5cd6d91-0a0e-41be-8801-97d5b7bef98b – Gonzalo.- May 16 '13 at 14:43

1 Answers1

2

You can change it in Database Explorer -> Select any DB -> Properties

DB Properties

  • If I go to the property of the database as you say, I can see that the collation of the database es Modern_Spanish_CS_AS. – Álvaro García May 16 '13 at 17:14
  • I edit my fisrt post because is in the seleciton when the database has not in count the case sensitive, in the unique constraints it does it. – Álvaro García May 16 '13 at 17:29