Quantcast
Channel: SQL Server Migration forum
Viewing all articles
Browse latest Browse all 1700

Migration from SQL2008SP2 to SQL2012SP2: Linked Server returns Error 7347

$
0
0

Hi Experts,

I'm trying to migrate an existing DB from SQL2008R2 on Win2003R2 to SQL2012 on Win2008R2.
Everything has gone smoothly except for a linked server, which returns an error given below.
Could anyone give a solution or any hints?

Query:
SELECT * FROM OPENQUERY ([LinkedServerXXX], 'SELECT AAAAA, … FROM table1 WHERE ・・・’)

Error Msg:
Msg 7347, Level 16, State 1, Line 2
"OLE DB provider 'OraOLEDB.Oracle' for linked server 'LinkedServerXXX' returned data that does not match expected data length for column '[OraOLEDB.Oracle].ColumnAAA'. The (maximum) expected data length is 20, while the returned data length is 10."

ColumnAAA is defined as NCHAR(5 CHAR) in Oracle. I can't understand why "expected data length for " ColumnAAa is 20.

Environment:
Old:SQLServer 2008SP2(10.0.4000) on Windows 2003R2 Enterprise x64 SP2 /Oracle Client 10g
New:SQLServer 2012SP2(11.0.5058) on Windows 2008R2 Datacenter SP1 /Oracle Client 11g
Provider: Oracle Provider for OLE DB("Allow Inprocess" is enabled)

Note:
-The column which the err msg refers to is defined as NCHAR in Oracle.
-The server property "Language" is "Japanese" for old SQL2008 and "English(US)" for the new SQL2012 env, which is the only difference I'm aware of.
-"Allow InProcess" is enabled for OraOLEDB.Oracle provider on both of the servers.
-I don't want to add To_CHAR() or anything to the SQL as it is embedded in the existing SSIS and I would like to use it without any revision if possible.

I would greatly appreciate your help!



Viewing all articles
Browse latest Browse all 1700

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>