Case sensitivity is controlled by sorting the database — check this by querying the views of the system catalog:
select name, collation_name from sys.databases
The sort name will look something like this: Latin1_General_CI_AS
The _CI_ part tells me that this is a case insensitive sort. If you see _CS_ , then this is case sensitive sorting.
You can change the default database setting using:
ALTER DATABASE AdventureWorks COLLATE .......
and select any valid sort here - use one with _CI_ to get case insensitive sort.
Problem: even if you change the setting at the database level, some tables may still have a separate column that had the specific sorting defined when the table was created. You could also change all this, but it will be a larger event. See this article for more information and a script for checking and possibly changing individual columns in your tables.
The reason intellisense might not work properly is because the case sensitivity of database objects is itself controlled by server sorting, which can again be different from any default database.
To find out what server sorting is, use:
SELECT SERVERPROPERTY('Collation')
Changing the server system configuration is a rather messy process and requires that you use the original setup.exe as described here .
marc_s
source share