2

I have an Oracle DB that I'm accessing through a linked server in SQL Server using OPENQUERY. There are some Portuguese accented characters stored in the Oracle DB that when I view them in the query results have incorrect characters placed in front of the accented ones. I've tried multiple versions of CASTing and CONVERTing in both the Oracle query and the SQL results and I've played with the collation setting on the linked server as well. Nothing I've tried has worked.

The column in the Oracle DB is defined as NVARCHAR2(240), and the NLS_NCHAR_CHARACTERSET is AL16UTF16.

I'm not sure what other info would be helpful, if I missed something let me know.

Thanks in advance for any help!

dsvick
  • 41
  • 5
  • You must set your NLS_LANG variable according to your character setting of your SQL Server. Have a look at this answer: http://stackoverflow.com/questions/33783902/odbcconnection-returning-chinese-characters-as/33790600#33790600 – Wernfried Domscheit Mar 17 '16 at 08:01
  • I tried setting the NLS_LANG to AMERICAN_AMERICA.AL16UTF8 and several other variations (it was originally set as AMERICAN_AMERICA.WE8MSWIN1252), but nothing has made any difference. The results I see in SSMS always have the incorrect characters in them. If it makes a difference the correct character is also shown but there are several characters in front of them that shouldn't be there. – dsvick Mar 17 '16 at 13:46

0 Answers0