SQL Server - is there a way to mass resolve collation conflicts?

Generally, use "COLLATE DATABASE_DEFAULT" on temp table, table variables etc.

Generally, use "COLLATE DATABASE_DEFAULT" on temp table, table variables etc Collation conflicts usually happen you have server vs database collation conflicts, server in this case being tempdb. Frankly, I would make an effort to align your collations and have them all one per database. If you have mix and match across servers, databases and columns then there is no magic bullet.

You could start by looking for all COLLATE clauses in code (see above) followed by ensuring all columns have collation removed....

Thanks, I'm actually not the admin of these servers and for some reason the DBAs have not synced the collations between tables on the dev and prod servers to be the same :-/ I'll use the COLLATE DATBASE_DEFAULT to get around it in most cases, but it would be nice to not have to do that at all, to have the schemas be the same. – edmicman Jul 2 '10 at 17:03.

Your first step is probably deciding on your standard for what collation you should be using. If you are going to be supporting multiple collations due to international requirements for your application then decide which ones you will support and how you plan to test for all collations. The first step here is deciding operationally what you'll be doing, not the technical solution.

Once you've done that, you're going to have to bite the bullet and go through all of your tables, stored procedures, etc. And get all of them in sync on ALL of your servers and in any source code that you have in your source control system. Ideally your queries will work without referring to any collation or doing any conversions to wrestle things into working.To help you find all of your collation issues, you can start looking at this in all of your databases: SELECT * FROM INFORMATION_SCHEMA.COLUMNS.

I have had great success using this tool codeproject.com/KB/database/ChangeCollat....

I cant really gove you an answer,but what I can give you is a way to a solution, that is you have to find the anglde that you relate to or peaks your interest. A good paper is one that people get drawn into because it reaches them ln some way.As for me WW11 to me, I think of the holocaust and the effect it had on the survivors, their families and those who stood by and did nothing until it was too late.

Related Questions