Solved

SQL Server Collation Problem

Posted on 2010-11-22
9
640 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
Enterprise Mobility and BYOD For Dummies

Like “For Dummies” books, you can read this in whatever order you choose and learn about mobility and BYOD; and how to put a competitive mobile infrastructure in place. Developed for SMBs and large enterprises alike, you will find helpful use cases, planning, and implementation.

 
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

Comprehensive Backup Solutions for Microsoft

Acronis protects the complete Microsoft technology stack: Windows Server, Windows PC, laptop and Surface data; Microsoft business applications; Microsoft Hyper-V; Azure VMs; Microsoft Windows Server 2016; Microsoft Exchange 2016 and SQL Server 2016.

Question has a verified solution.

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

Suggested Solutions

Have you ever needed to get an ASP script to wait for a while? I have, just to let something else happen. Or in my case, to allow other stuff to happen while I was murdering my MySQL database with an update. The Original Issue This was written…
Ever needed a SQL 2008 Database replicated/mirrored/log shipped on another server but you can't take the downtime inflicted by initial snapshot or disconnect while T-logs are restored or mirror applied? You can use SQL Server Initialize from Backup…

751 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