Solved

SQL Server Collation Problem

Posted on 2010-11-22
9
639 Views
Last Modified: 2012-05-10
Hello experts,

I'm facing the following  problem:
I have a website wich uses a SQL Server DB. I had it in a server with SQL_Latin1_General_CP1253_CI_AS collation. I recently transferred it in another server with SQL_Latin1_General_CP1_CI_AS collation. In first I had problems with Greek text, but with changing collations I managed to see right data in SQL Server environment. The problem is when I see in browser Greek text coming from temporary tables results.
What I mean is that when I browse the data of my SQL DB, all are right. When I browse data from tempdb I have ????? instead of Greek text.

Any ideas??

Thank Sotiris
0
Comment
Question by:Soter13
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
  • 3
  • 2
  • +1
9 Comments
 
LVL 16

Accepted Solution

by:
EvilPostIt earned 250 total points
ID: 34186564
Within SQL Server the collation are applicable in 2 place.

The database and the instance. The instance itself has a collation (Master,model,msdb) If you create a new database with a different collation then when you build temp tables they will always be in the instance collation.

One option to fix this would be to specify the collation with the create table statements so that it is created correctly. The other would be to reinstall the instance with the correct collation.
0
 

Author Comment

by:Soter13
ID: 34186585
I' ve changed the collation within the table columns and the problem fixed when I see the results in the Management Studio environment.
The problem persists when I browse the data on IE or other browsers
0
 
LVL 15

Expert Comment

by:AmmarR
ID: 34186620
are you using codepage=1253 in your page

and CHARSET
<META HTTP-EQUIV="Content-Type"
  CONTENT="text/html; CHARSET=windows-1253">
0
Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
LVL 16

Expert Comment

by:EvilPostIt
ID: 34186623
Is the instance and the database the same collation now?
0
 

Author Comment

by:Soter13
ID: 34186639
To AmmarR: I use windows-1253

To EvilPostIt: No, I just changed the collation on table columns. The instance collation is dificult to change because I host the site in a shared hosting
0
 
LVL 15

Expert Comment

by:AmmarR
ID: 34186649
are you storing the values in an Nvarchar field
0
 

Author Comment

by:Soter13
ID: 34186666
I 've tried that too, but internet browsers insists on ?????
0
 
LVL 15

Expert Comment

by:AmmarR
ID: 34186695
Ok so you have
your field in Nvarchar
your table collation 1253
Your Database Collation 1253
your Code page 1253
your CHARSET = windows-1253
.

and you still getting ????

i suggest try removing one record and after having all the above set correctly insert a single record in your table using the N
and test it in you browser

like example

Insert into Table (Greekfield) Values (N'Greekvalue')

and try view this record.
0
 
LVL 6

Assisted Solution

by:subhashpunia
subhashpunia earned 250 total points
ID: 34187270
There is a precedence order of collation that I have explained here:

http://sqlreality.com/blog/ms-sql-server-2008/collation-precedence-rules/
0

Featured Post

Edgartown IT Case Study

Learn about Edgartown's quest to ensure the safety and security of the entire town's employee and citizen data. Read the case study!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
(sql serv16)ssis 2016 question/check 1 104
SSIS Standard Template for Reuse by Business Units 12 47
SQL to JSON 14 34
Database-Scoped Permissions 2 15
Naughty Me. While I was changing the database name from DB1 to DB_PROD1 (yep it's not real database name ^v^), I changed the database name and notified my application fellows that I did it. They turn on the application, and everything is working. A …
Use this article to create a batch file to backup a Microsoft SQL Server database to a Windows folder.  The folder can be on the local hard drive or on a network share.  This batch file will query the SQL server to get the current date & time and wi…
I've attached the XLSM Excel spreadsheet I used in the video and also text files containing the macros used below. https://filedb.experts-exchange.com/incoming/2017/03_w12/1151775/Permutations.txt https://filedb.experts-exchange.com/incoming/201…

749 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question