Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2000 Forums
 SQL Server Administration (2000)
 SQL Server DB Installation

Author  Topic 

AskSQLTeam
Ask SQLTeam Question

0 Posts

Posted - 2002-05-27 : 11:44:33
Santosh writes "Hello Sir,
I have a question regarding DB installation in SQL Server.
Afrer our S/W development, we generated SQL Scripts of our Database to give it to client for installation.
SQL Script has all Create Table and Insert SQL Statements.
As we assumed that SQL Server is Case Insensitive, we did'nt take care while developing our Application.
Now the client is saying, there SQL Server is case sensitive(As they installed it in Binary mode.. I dont know about this),
and application is giving error as
"There is column called History not history"
That means column name is History exactly.
But in our Application we used it as 'history'.
So now we have to change all our code to solve this problem.
Is there any way to make that SQL Server Case Insensitive?
Why is this problem?
And how to make SQL Server Case Sensitive/Insensitive?
Please provide me the solution As soon As possible.
Thanks in advance..

Thanks and Regrds,
Santosh"

graz
Chief SQLTeam Crack Dealer

4149 Posts

Posted - 2002-05-27 : 11:47:24
Can you tell me what version of SQL Server you're using? SQL7 and SQL2000 handle this very differently.

===============================================
Creating tomorrow's legacy systems today.
One crisis at a time.
Go to Top of Page

santoshchebbi
Starting Member

1 Post

Posted - 2002-05-28 : 01:18:26
I am using SQL Server 2000 for deployment and Sql Server 7.0 for development.
Please solve this problem.

Thank you

quote:

Can you tell me what version of SQL Server you're using? SQL7 and SQL2000 handle this very differently.

===============================================
Creating tomorrow's legacy systems today.
One crisis at a time.



Go to Top of Page

ttcrissy
Starting Member

8 Posts

Posted - 2002-05-28 : 03:19:14
Hi

The best way to deal this is to first read carefully BOL, especially the "Installing SQL Server/Collation Options for International Support" section.

Another section that I found interestin is an excerpt from the "Microsoft SQL Server 2000 System Administration":
--//--
Finally, by default, each new database inherits the default collation setting from the model database. The default collation for the model database is the same as for all system databases (the default collation is defined during setup). The default collation for system databases cannot be changed easily—you must have access to all scripts and information needed to recreate the user databases and their objects, all user data must be exported, all user databases must be dropped, the system databases must be rebuilt, and all user data must be reloaded. In international environments, having user databases with collation settings that are different from each other's settings and from the system databases' settings can be quite useful. To change the default collation for a new user database, specify a different collation when you create the new database. It is also possible to change the default collation after you have created a user database, loaded data, and created objects, but this is not an easy task. To change the default collation at that stage, you must first export all user data, recreate all database objects, and reload all user data.
--//--

After reading this entirely, I can also try to suggest a create database script that specifies a certain collation, different from the default collation of the SQL Server 2000 instance:

CREATE DATABASE Sales
ON
( NAME = Sales_dat,
FILENAME = 'D:\Data_SQL\MSSQL\Data\saledat.mdf',
SIZE = 10,
MAXSIZE = 50,
FILEGROWTH = 5 )
LOG ON
( NAME = 'Sales_log',
FILENAME = 'D:\Data_SQL\MSSQL\Data\salelog.ldf',
SIZE = 5MB,
MAXSIZE = 25MB,
FILEGROWTH = 5MB )
COLLATE Latin1_General_CI_AS

As you can see in the above excerpt, it is a bit more dificult to change the collation of an existing database, rather than specifying one at the creation moment.

Appart from this:
"You can execute the system function fn_helpcollations to retrieve a list of all the valid collation names for Windows collations and SQL collations:

SELECT *
FROM ::fn_helpcollations()" (BOL)

Best luck and hope this helps,
Cristina

Go to Top of Page
   

- Advertisement -