.NET Tutorials, Forums, Interview Questions And Answers
Welcome :Guest
Sign In
Win Surprise Gifts!!!

Top 5 Contributors of the Month
Gaurav Pal
Post New Web Links

How do I use a case-insensitive collation in SQL 2008?

Posted By:      Posted Date: April 10, 2011    Points: 0   Category :

I am testing Configuration Manager 2012 Beta 2 and there is a requiement for SQL:

You must use a case-insensitive collation (e.g. SQL_Latin1_General_CP1_CI_AS) and it must be consistent throughout your hierarchy

I wanted to find out step by step how and when I am to set this in SQL. I am not a DBA so it is not very clear to me how to do this.

Thanks, Brit



View Complete Post

More Related Resource Links

what's the right collation for sql server 2008 to ignore french accent?

I want to  sql server 2008 collation using english as default(in Canada). when search for text, french accent can be ignore. For example, À,Â,Ä, à, â, ä will be treated same as a or A, but the data still is stored as different(such as for key). so what is the right collation need to be selected when install sql server 2008?. If existing instance collation is not the right one, how to change it to the right one?

MSSQL 2008 R2: Change Server Collation Steps, with user DBs already of desired collation

On the default instance of SQL Server 2008 R2, I want to change the server collation from the usual US default SQL_Latin1_General_CP1_CI_AS to an application vendor's required collation, Latin1_General_BIN.  I understand that changing the server collation is essentially the same as changing the collation of databases master and model -- is that a fair statement? But my main question is, since there are user databases on the server that I would like to preserve, can I not simply detatch the user DBs prior to performing the server collation change, and then reattach?  The database collation of the user databases is already set to Latin1_General_BIN.  This article, Setting and Changing the Server Collation, at http://msdn.microsoft.com/en-us/library/ms179254.aspx says that to preserve the user databases, I should script all DB objects out, and bulk-copy all data out, because the DBs will have to be recreated and repopulated.  Can someone explain why I ought not simply detach and reattach the user DBs, given that they are already of the desired collation (i.e., the same collation that I will be changing the server collation to)? Your help much appreciated. -Tom

Error 15401 when adding AD logins in upper case to a sql 2008 server

We are repeatedly getting Error 15401 when adding couple AD logins in upper case(DOMAIN_NM\USR_NM) to a sql 2008 server with the latin1_general, binary sort collation.  Lower case (DOMAIN_NM\usr_nm) works fine.  All the other servers, even the ones with the same collation, it is the opposite, upper case works and not the lower case.  Looked for duplicate SIDs in the domain, on the sql server, did not find any.  Any idea what's going on?. 

SQL Server 2008 collation design techniques


Can anyone provide some insight into design techniques when multiple languages are required within SQL Server?

Let me tell you about our situation. We currently have a database that holds French content. New languages are going to be added (Chinese, Arabic etc.). We have to make a decision to determine what would be the best approach to deal with all those languages.


Here are the approaches we identified:


o   I database per language:

SQL Server 2008 R2 Setup: How to set Collation during interactive setup?



Did I miss something when running SQL 2008 R2 Setup.exe on Win2008 Server R2?  I did not notice my opportunity to set the server collation to something other than my regional default.  Was it on a tab that I missed?

Are my choices either (a) set collation at the OS level through Control Panel...Regional...Advanced, or (b) run setup.exe at the command prompt while specifying the desired server collation?  Because I get that impression from reading this: http://msdn.microsoft.com/en-us/library/ms144260.aspx

Have I read that correctly?




Cannot change the collation sequence of a Database in SQL Server 2008 R2


I tried two steps below separately: restricted user ran for 30 minutes then I stopped the execution; They obviously could not run simultaneously. I only want to operate at the database and not the server level. Our other key db is already in the desired collation. We'd like to have equijoins work on tables with the same collation sequences, and not have to use ETL or individual ALTERs for each table involved.

Second point: is CP1 below a 2000 only collation? That appears to be a patently false assumption in another forum posting. It appears to be a valid 2008 R2 collation is the point.




COLLATE SQL_Latin1_General_CP1_CI_AS ;


Many Regards,







i have 2 data bases source(2005), destination (2008). i took a back up of database from 2005(SQL_Latin1_General_CP1_CI_AS) and restored in 2008(Latin1_General_CI_AS). now while running sp's, or any other queries, i am getting this error.

Cannot resolve the collation conflict between "SQL_Latin1_General_CP1_CI_AS" and "Latin1_General_CI_AS" in the equal to operation.

I donot want to re install my server as it is a big task , and i already restored DB's which are also a lot . so can anyone please sugegst a solution apart from the above two(reinstalling SQL, re-restoring DB's).




Lookup Transformation: Fails to match in full cache mode both fields same case and collation


Hi All

I am at wits end trying to resolve a lookup transformation issue where lookups fail to match in full cache mode. 


1. BIDS 2008

2. Both tables are in the same db with the same collation (Latin1_General_CI_AI)

3. Both columns have the same collation (Latin1_General_CI_AI)

4. Both values are the same case

5. Both columns are varchar(9)

I'm not sure what else there is to check. I would prefer to understand what is causing the lookups to fail vs using partial cache.

Any suggestions welcome!


On SQL_Latin1_General_CP1_CI_AS SQL Server 2008 Default Collation


Collation is one of the most confusing features of SQL Server. BOL 2008 states that backward compatibility is the only reason to go with SQL collation. I thought previously it is just smart to stay with the default Microsoft offers unless there is a real good reason to choose a different collation.

So is the default SQL_Latin1_General_CP1_CI_AS  (Case Insensitive, Accent Sensitive) a good choice? (Assume the installation is brand new SQL Server 2008)

Related links:

SQL Server offers the SQL_Latin1_General_CP1_CI_AS collation as the default collation for server installations.

For backward compatibility, the default English-language (US) collation is SQL_Latin1_General*.

Kalman Toth, SQL Server & Business Intelligence Training; SQL 2008 GRAND SLAM

Case insensitive string comparison using Like


Consider this code;


		Dim Var1, Var2 As String

		Var1 = "TEST"
		Var2 = "es"

		If Var1 Like "*" & Var2 & "*" Then
			'No Match
		End If


It returns no match because it is case sensitive. I need it to return a match (so case insensitive) and it needs to be fast because i am using it to filter records on the fly as the user types. Using .ToLower is slow when you are dealing with 1000's of repetitions.

Is there a more efficient way to do what i want without the performance penalties of converting them both to lower case every time?

String.Compare doesnt seem to cater for it.

SQL 2008 master database has wrong collation


I'm pretty new to SQL, so excuse me for landing in this situation in the first place.  Never again!

I had an old Windows 2003/SQL 2000 server which I wanted to retire, so installed a nice new Windows 2008 R2/SQL 2008 server to host all the databases.  I detached all the databases, copied them over, and attached them to the new server.  Everything appeared to be running OK.  However, the application is now complaining that I have different collations between the master database, and all the other ones.  the master (and other system databases) is Latin1_General_CI_AS and all the user ones are SQL_Latin1_General_CP1_CI_AS.

What I need to do is change the master to SQL_Latin1_General_CP1_CI_AS and ensure that any new databases which the application creates in future are also SQL_Latin1_General_CP1_CI_AS.  I have no idea how to do this!

I suppose one option wiould be to reinstall and start again, but I'm sure there must be an easier way.  Musn't there?  Help!



Process Update does not reflect change in case of dimension member in SSAS 2008.


Process Update does not reflect change in case of dimension member in SSAS 2008. We can replicated this issue in Adventure Works 2008 with below steps.


1.  Customer Name Aaron Allen is in Title case both in Adventure Works SQL 2008 Data Mart as well as in SSAS 2008.


2.  Change Customer Name Aaron Allen to Upper case in Adventure Works SQL Data Mart.


Giving syntax error for CASE statement using VS (SSAS) 2008 designer


Hi All,

I am writing following CASE statement in Data Source View-> Righ click measure table "xyz" -> and select "Edit Named Query"








Visual Case Tool - UML Tutorial

The Class Diagram

The class diagram is core to object-oriented design. It describes the types of objects in the system and the static relationships between them.

Use Case Diagram

The use case diagram shows the functionality of the system from an outside-in viewpoint.

Actors (stick men) are anything outside the system that interacts with the system.

Using Conditional Split data Transfer in SSIS 2008

This article uses the Integration Services Conditional Split Data Transformation element to filter and transfer data from a set of flat text files to SQL Server database table. The concept can be easily extended to apply to any other source or destination such as Microsoft Excel. This scenario is useful in creating denormalized database tables in a reporting and analysis situation.

Sql Server 2008 Tutorials

This Link Provides total Sql Server 2008 Tutorials
ASP.NetWindows Application  .NET Framework  C#  VB.Net  ADO.Net  
Sql Server  SharePoint  Silverlight  Others  All   

Hall of Fame    Twitter   Terms of Service    Privacy Policy    Contact Us    Archives   Tell A Friend