INF: Determining Case Sensitivity of a 1.x SQL Server

ID Number: Q72618

1.10 1.11

OS/2

Summary:

This article discusses three methods to determine the case sensitivity

of a version 1.1 or 1.11 SQL server:

1. Perform the following query:

SELECT count(*) FROM MASTER..SPT_VALUES WHERE TYPE = "x"

Please note that the lowercase "x" is very important. If the above

query returns a value greater than 0 (zero), the server is case

INSENSITIVE. Otherwise, the server is case SENSITIVE.

In the master database, there are three rows in the table

spt_values with a TYPE = "X". Checking for TYPE = "x" returns these

rows if the server is case INSENSITIVE, and returns zero rows if

the server is case SENSITIVE.

A client program or a stored procedure can easily use this method.

2. Check the SQL Server error log.

On line 16 of the SQL Server error log, a message is logged stating

if the database is case INSENSITIVE or SENSITIVE. For example, a

case insensitive server displays the following:

Jan 24 1991 11:24AM kernel: Master Database is Case Insensitive.

3. Execute the following commands from SAF:

DBCC TRACEON (3604)

DBCC RESOURCE

DBCC TRACEOFF (3604)

Enter the "results" window and page down to the bottom. At the

bottom of the left margin is a parameter called "ccaseless =". If

this value is 0, the server is case SENSITIVE. If this value is 1,

the server is case INSENSITIVE.