We have a problem with a query from a SQL Server 2008R2 - 64bit to an Oracle Linked Server.

We use the Oracle 64-bit driver for Windows.

When we query a certain table we get the following error:

Msg 7347, Level 16, State 1, Line 1 OLE DB provider 'OraOLEDB.Oracle' for linked server 'SERV_VISION2' returned data that does not match expected data length for column '[SERV_VISION2]..[VISION].[INV_M001].CUS_NM'. The (maximum) expected data length is 30, while the returned data length is 24.

The problem seems to be the data in the CUS_NM column. In the rows where he gives this error the data is like this:


So like a question mark but upside down. There doesn't seem to be a problem with the length of the column, for one reason he can't handle this data I guess.

Did anyone experience this problem? Anyone a clue how to solve this?

3 Answers 3


That's most likely an NLS (language) problem and you've got customer names with characters your database cannot handle. You'll need to determine the actual type of the CUS_NM column in the Oracle database.


Oracle object names are all uppercase by default. The linked-server query must exactly match the case of all referenced Oracle metadata, such as schema and table names.


Try below way-


here casting can vary as per your data type.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.