alekoo73
alekoo73

Reputation: 925

Linked connection between MS SQL SERVER and Sybase ,Unicode problem

I added linked server on MS SQL SERVER 2008 with Sybase ASE 12.5 databases, everything works fine, but i've got problem with unicode strings.

from MS SQL when i'am running "SELECT * FROM OPENQUERY ( SYTEST ,'SELECT Name FROM PRODUCT')" and the result set contains wrong characters

a?›a??a??a? a?”
a??a??a?¬a??a? a??

Name column in Sybase is of nvarchar type , names are written in unicode.

Problem occurs only when ms sql server is running on windows server operating system, There is no problem on ms sql-servers running on Windows 7 and XP, where I got correct result.

Upvotes: 1

Views: 1529

Answers (3)

gonatee
gonatee

Reputation: 101

There is a case like this in my company I've created a linked server from SQL Server 2014 to the IBM AS/400 (i series) and faced with the same problem.

I'm not sure about the different between 2014 and 2008 handle the unicode chars but I think it not much, if any.

How to
1. login to the SQL studio
2. right click the linked server then select "properties"
3. select "Server options" in left pane
4. set "Use remote collation" to "True"
5. in "Collation name", choose your unicode (here is the basic list - https://technet.microsoft.com/en-us/library/ms180175%28v=sql.105%29.aspx"

My problems solved this way! (I played a lot with connection strings with no desired results)

Upvotes: 0

deepak
deepak

Reputation: 141

try to use N@parameter when making query

Upvotes: 1

gbn
gbn

Reputation: 432210

If it works on 2 separate installs, you compare and check the linked server settings using sp_serveroption, especially collation compatible and collation name

If these are the same, check any DSN and Sybase driver settings in the OS

Upvotes: 0

Related Questions