I am trying to run this on SQL Server 2008 R2.
SELECT * FROM
OPENQUERY(linked_oracle_server, 'SELECT A.Column1, A.Column2 from A')
This used to work before. We started facing the problem when the A.Column1
was altered to nvarchar2(4000)
on the Oracle side.
Now it fails with the following error:
Cannot create a column accessor for OLE DB provider "OraOLEDB.Oracle" for "linked_oracle_server"
I was playing around a bit, if I do SUBSTR(A.Column1,1,2000)
it works! And if I change it to SUBSTR(A.Column1,1,2001)
it gives the same error as above. Does this have to do with NVARCHAR
having a maximum limit of 4000 on the SQL Server side? Is there no way to import an Oracle column of size greater then NVARCHAR2(2000)
, even though NVARCHAR(MAX)
is capable of supporting much bigger data on SQL Server?