How can I find out if an instance of SQL Server 2005 allows case sensitive databases or not?
如何确定SQL Server 2005的实例是否允许区分大小写的数据库?
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.
我查看了服务器的属性页(在Management Studio中),但我看不到它。
3 个解决方案
#1
10
SELECT DATABASEPROPERTYEX('DatabaseNameHere', 'Collation') SQLCollation;
Returns "SQL_Latin1_General_CP1_CI_AS", the CI is what indicates case insensitivity
返回“SQL_Latin1_General_CP1_CI_AS”,CI表示不区分大小写
#2
2
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.
在Management studio中,右键单击对象资源管理器中的Instance,然后单击“属性”以查看服务器属性。在“常规”部分中查看排序规则。默认不区分大小写的设置是SQL_Latin1_General_CP1_CI_AS。区分大小写的设置是Latin1_General_CS_AS。
#3
1
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')
#1
10
SELECT DATABASEPROPERTYEX('DatabaseNameHere', 'Collation') SQLCollation;
Returns "SQL_Latin1_General_CP1_CI_AS", the CI is what indicates case insensitivity
返回“SQL_Latin1_General_CP1_CI_AS”,CI表示不区分大小写
#2
2
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.
在Management studio中,右键单击对象资源管理器中的Instance,然后单击“属性”以查看服务器属性。在“常规”部分中查看排序规则。默认不区分大小写的设置是SQL_Latin1_General_CP1_CI_AS。区分大小写的设置是Latin1_General_CS_AS。
#3
1
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')