This linked server worked fine before we upgraded from SQL Server 2005 to 2008R2, but now it throws this error when querying from certain tables (it still works for other tables):
"linked server "PROD" reported an error. The provider did not give any information about the error...Cannot fetch a row from OLE DB provider "OraOLEDB.Oracle" for linked server "PROD".
I can narrow the problem to one row and when I run this query for that row I get a different error:
select * from openquery( PROD, 'SELECT ID, NAME FROM ITEMS WHERE ID = 5437')
Error:
OLE DB provider "OraOLEDB.Oracle" for linked server "PROD" returned message "01".
OLE DB provider "OraOLEDB.Oracle" for linked server "PROD" returned message "ORA-29275: partial multibyte character".
And I can query the offending NAME column as a DUMP, like this:
select * from openquery( PROD, 'SELECT DUMP(NAME) FROM ITEMS WHERE ID = 5437')
Which returns:
Typ=1 Len=16: 77,73,88,84,69,67,79,32,68,69,32,84,73,68,65,193
then rebuild using SELECT CHAR(77) + CHAR(73) + ..., and I get "MIXTECO DE TIDAÁ". Bottom line, it seems, is that CHAR(193) in the Oracle data is causing my query to fail. But how to fix?
Oracle (https://forums.oracle.com/forums/thread.jspa?threadID=551784) provides this mysterious clue:
ORA-29275: partial multibyte character
Cause: The requested read operation could not complete because a partial multibyte character was found at the end of the input.
Action: Ensure that the complete multibyte character is sent from the remote server and retry the operation. Or read the partial multibyte character as RAW.
However, I don't know how to "Ensure..." and I don't know how to "read... as RAW".
SQL Server is a 64-bit version running on a 64-bit windows server 2008R2 system and has the 64-bit Oracle 11gR2 client installed.
column in SQL: NAME nvarchar(60) NULL column in Oracle: NAME varchar2(60)
In SQL, sp_helpsort returns:
Latin1-General, case-insensitive, accent-sensitive, kanatype-insensitive, width-insensitive for Unicode Data, SQL Server Sort Order 52 on Code Page 1252 for non-Unicode Data
In Oracle, the NLS_CHARACTERSET is: AL32UTF8
Any help re: why this is not working or how to get this working? Let me know if need further info.