How can I find out if an instance of SQL Server 2005 allows case sensitive databases or not?
By case sensitive, I mean case sensitivity of the objects in the database, i.e. the following two statements are not equivalent:
SELECT * FROM TABLE
SELECT * FROM table
I've looked in the property pages of the server (in Management Studio) but I couldn't see it.
SELECT DATABASEPROPERTYEX('DatabaseNameHere', 'Collation') SQLCollation;
Returns "SQL_Latin1_General_CP1_CI_AS", the CI is what indicates case insensitivity
In Management studio, right click on Instance in the object explorer and then click on "properties" to see the server properties. In the "General" section look at the collation. The default case insensitive setting is SQL_Latin1_General_CP1_CI_AS. The case sensitive setting is Latin1_General_CS_AS.
The collation of a database can be different to the server collation. There is no restriction.
When you CREATE DATABASE, you specify it there or it assumes the collation of the model databases (which should be the server collation).
SELECT
DATABASEPROPERTYEX('MyDB', 'Collation'),
SERVERPROPERTY ('Collation')
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With