SQL Case Sensitivity
-
Hi! I am using sql server 2000. How do I make my DB case sensitive without reinstalling sql server 2k? Please help me on this. "To teach is to learn twice"
-
Hi! I am using sql server 2000. How do I make my DB case sensitive without reinstalling sql server 2k? Please help me on this. "To teach is to learn twice"
If you just want to change a single database, you need to run an
ALTER DATABASE
query, e.g.ALTER DATABASE mydb
COLLATE SQL_Latin1_General_CS_ASThis only alters the new default and how object names are interpreted; you'll need to alter any existing tables as well. If you need to change the default collation of the database server (including the
tempdb
database), you should run therebuildm
tool. See also KB article 273572[^] about a problem with this tool when the source files are read-only.rebuildm
lives in the80\Tools\binn
directory under the SQL Server install directory. Note thatrebuildm
and setup use 'friendly' names for the collations, whereas Enterprise Manager and queries use a different naming convention. The names used in setup are listed in Selecting a SQL Collation[^], while the names used in queries may be found under SQL Collation Names[^]. There are two types of collations: those implemented using the Windows national language support functions (Windows collations) and those implemented independently by SQL Server (SQL collations). SQL collations have names beginningSQL
.