473,765 Members | 2,057 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Special characters in MSSQL.

Hi,

I have a MSSQL Server communicating with an Oracle database through a
MSSQL linked server using a MS ODBC connection.

If I query the Oracle database through the Oracle ODBC 32Bit Test, the
result is fine:

select addrsurname from address where addrnr = 6666;
HKANSSON

If I do the same query within the SQL Query Analyzer (using the linked
server), I get:

select * from openquery(TESTS W, 'select addrsurname from address where
addrnr = 6666');
HKANSSON

I have tried to both check and uncheck the Automatic ANSI to OEM
conversion, but the result remains the same.

Does anyone know what to do to make the result display the special
characters in SQL Query Analyzer?
Thanks,
Kenneth

Mar 7 '06 #1
4 6020
Kenneth,

obviously your SQL server and the Oracle DB use a different collation.
In your linked server properties on the tab server_options you can
change the option "use remote collation" from True to False. That
should solve your problem.

Another option would be to convert the character values to
your(preferred) collation like this:
SELECT CAST(addrsurnam e AS varchar(25)) COLLATE French_CS_AS -- Fill in
your collation here
Good luck
Markus

Mar 7 '06 #2
Hi Markus, and thanks for your response.

I tried both your suggestions without any luck. Do I need to restart
the MSSQL Server service or something?

Thanks,
Kenneth

Mar 7 '06 #3
(ke************ ***@telenor.com ) writes:
I have a MSSQL Server communicating with an Oracle database through a
MSSQL linked server using a MS ODBC connection.

If I query the Oracle database through the Oracle ODBC 32Bit Test, the
result is fine:

select addrsurname from address where addrnr = 6666;
HKANSSON

If I do the same query within the SQL Query Analyzer (using the linked
server), I get:

select * from openquery(TESTS W, 'select addrsurname from address where
addrnr = 6666');
H?KANSSON

I have tried to both check and uncheck the Automatic ANSI to OEM
conversion, but the result remains the same.

Does anyone know what to do to make the result display the special
characters in SQL Query Analyzer?


Obviously there is a collation clash of some sort between Oracle and
SQL Server.

I don't know Oracle, but what data type is addrsurname? Is it varchar
or nvarchar (or whatever they may be called on the Oracle side)? If
it is some 8-bit data type, what is the code page for that column?

If I am to guess, I hold the ODBC driver as the prime suspect. Define
the linked server with the MSDAORA provider instead, or even better
Oracle's own OLE DB provider. (MSDAORA does not support Oracle 9 and
10, I believe.)

There are a few options to set for linked servers in SQL Server, but
I don't really think thees are the knobs to pull here.
--
Erland Sommarskog, SQL Server MVP, es****@sommarsk og.se

Books Online for SQL Server 2005 at
http://www.microsoft.com/technet/pro...ads/books.mspx
Books Online for SQL Server 2000 at
http://www.microsoft.com/sql/prodinf...ons/books.mspx
Mar 7 '06 #4
Hi,

Creating the linked server with Microsoft OLE DB Provider for ODBC
Drivers solved the problem. Thanks for your help.

Cheers,
Kenneth

Mar 8 '06 #5

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

7
9004
by: Roy W. Andersen | last post by:
I've been searching google about this for days but can't find anything, so I'm hoping someone here can help me out. I'm trying to create zip-files without needing the zip-file extension in PHP, mainly because I need the ability to both create and extract zip-files. I've tried a couple of classes found here and there, and they all seem to have the same problem. I'm currently using PclZip (http://phpconcept.net/pclzip/) but even the...
3
17206
by: Barry Olly | last post by:
Hi, I'm working on a mini content management system and need help with dealing with special characters. The input are taken from html form which are then stored into a varchar column in oracle database. When i retrieve the data, some of the special characters have been changed to ??? and also
4
5205
by: Ram | last post by:
We are trying to load text tab delimited files into SQL server using informatica 5.1 version. The text files are FTPed to a local server and then files are moved to applicable folder before loading. The problem is when we open the files after FTP the characters are already converted to something else. EX: got converted as . Now when we load them into SQL server we want to transfer as again.
4
3488
by: Kivanc Toker | last post by:
Hi, I've got a problem with displaying texts with turkish characters. There is a website administration system, which is developed using ASP (VBScript) and ADO. This system is being used for inserting product informations in to a ms-sql database. There is another webbased application, which is developed using ASP.NET and ADO.NET (C#). For this second application there is a separate ms-sql
5
8630
by: Sakharam Phapale | last post by:
Hi All, I am using an API function, which takes file path as an input. When file path contains special characters (@,#,$,%,&,^, etc), API function gives an error as "Unable to open input file". Same file path containing special characters works fine in one machine, but doesn't work in other. I am using following API function to get short file path. Declare Auto Function GetShortPathName Lib "kernel32" (ByVal lpszLongPath As
8
10563
by: eugenio | last post by:
Hi...not sure if this is the right group for this posting, but i'm don't know where else to post. I've got a simple problem...I have a linux box running apache 2.0 and php5. I'm trying to use the mssql functions in php to retreive data from a mssql server 2k. I'm pulling data from the customers table in the northwind db and i'm getting strange characters instead of special characters. Below is a sample output: (where the quotes are i...
1
4571
by: sonald | last post by:
Dear All, I am working on a module that validates the provided CSV data in a text format, which must be in a predefined format. We check for the : 1. Number of fields provided in the text file, 2. Text checks for max. length of the field & whether the field is mandatory or optional Example:
3
10197
KevinADC
by: KevinADC | last post by:
Purpose The purpose of this article is to discuss the difference between characters inside a character class and outside a character class and some special characters inside a character class. This is not a regular expression tutorial. Assumes you are already familiar with basic regular expression concepts and terminology. If not, you may want to read some regular expression tutorial. See the end of the article for links to online resources....
3
4360
by: Klaus Herzberg | last post by:
Hi, I come from the "dark side" php/mysql and there often problems with character sets (utf-8, latin...) and storing data in datebase. Exists in the world of dot.net and ms-sql-server similiar problems? To precise: I have to store xml-data in database. Maybe its better to encode (like base64) the strings? Perhaps there are some links to read?
0
9568
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, well explore What is ONU, What Is Router, ONU & Routers main usage, and What is the difference between ONU and Router. Lets take a closer look ! Part I. Meaning of...
0
9404
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10164
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
10007
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
9835
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
8833
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development projectplanning, coding, testing, and deploymentwithout human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
5277
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
1
3926
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
3532
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.