SQL Server caring about case sensitivity

I'm in the process of setting up a load testing environment for my current app.  As I'm moving my database over via T-SQL scripts and command files from my database project I've been running into really strange issues.  It appears that some of our scripts don't have the same casing as the parameters and/or column names do and as I'm running my scripts on the database server (Windows 2003) my scripts are failing because of the mis-match.  As an example I had a stored procedure that was doing a join to another table which had an alias set to "D", however, below in the query it referred to this alias as "d".  When running the command file I was getting an error saying that the "d" alias was invalid.  I've run these scripts hundreds of times on other databases and never received this error, what gives?  Why would SQL Server start caring about case sensitivity in column names, aliases, and parameters?

# re: SQL Server caring about case sensitivity

Thursday, March 17, 2005 1:11 AM by Luis F.    
It depends on how you installed SQL Server, you can tell it to be case sensitive during installation, by default it is not, but if on that server someone selected it ...

# re: SQL Server caring about case sensitivity

Thursday, March 17, 2005 4:47 PM by Uncle G    
In particular check the collation on the testing server and database against your development box.

# re: SQL Server caring about case sensitivity

Friday, March 18, 2005 6:13 AM by d.code    
To determine whether your particular SQL Server instance was installed with case sensitivity or not, run the following stored proc:

sp_server_info

. . . and look at Row 18.


# re: SQL Server caring about case sensitivity

Friday, March 18, 2005 6:14 AM by Steve    
Thanks all, that was indeed the problem. It's been so long that I've run into a server configured this way that I forgot that people even set them up with case sensitivity enabled.

Post a Comment

 
 
Prove you're not a spammer: 
4 + 4 =