serge (se****@nospam.ehmail.com) writes:
If I have to send a database to someone and that person can
be using a Case Sensitive or a Case Insensitive SQL Server 2000,
what do I do?
Should i create two databases: 1 CS and 1 CI?
Can't I simply work on 1 CS database all the time and whatever
the person's SQL Server Sensitivity is setup, my database would
work fine? I want to avoid having to have and work on two
databases for this particular purpose.
What happens if someone puts a CS db when their SQL Server
is setup as CI? Would they have a CS db inside a CI SQL Server
environment? Is there a way to convert the CS database to a CI
database by changing the database's properties or something?
It depends what you mean with "send a database". If you send the physical
database, or a backup thereof, you can work with whichever collation
you prefer. Just make sure that you use "COLLATE DATABASE_DEFAULT"
on all character columns in temp tables and table variables (including
return tables from user-defined functions). As an extra precaution,
you should test that database on a server with a different default
collation than the database.
If you instead send a script of the database, you don't need COLLATE
with your temp tables, as you can assume that the database will be
installed with the default collation of the target server. In this
case you should develop with a case-sensitive collation. Furthermore,
you should use only lowercase names. Or at very least you should
use a naming convention, so you don't have an object called "gadgets"
and another "GADGETS", which would cause errors on a case-insensitive
collation.
--
Erland Sommarskog, SQL Server MVP,
es****@sommarskog.se
Books Online for SQL Server SP3 at
http://www.microsoft.com/sql/techinf...2000/books.asp